Пример #1
0
    def __init__(self, records="", name=None, alphabet=default_codon_alphabet):

        MultipleSeqAlignment.__init__(self, records, alphabet=alphabet)

        # check the type of the alignment to be nucleotide
        for rec in self:
            if not isinstance(rec.seq, CodonSeq):
                raise TypeError("CodonSeq objects are expected in each " "SeqRecord in CodonAlignment")

        assert self.get_alignment_length() % 3 == 0, "Alignment length is not a triple number"
Пример #2
0
    def __init__(self, records='', name=None, alphabet=default_codon_alphabet):

        MultipleSeqAlignment.__init__(self, records, alphabet=alphabet)

        # check the type of the alignment to be nucleotide
        for rec in self:
            if not isinstance(rec.seq, CodonSeq):
                raise TypeError("CodonSeq objects are expected in each "
                                "SeqRecord in CodonAlignment")

        assert self.get_alignment_length() % 3 == 0, \
            "Alignment length is not a triple number"
Пример #3
0
    def __init__(self, records='', name=None, alphabet=default_codon_alphabet):
        """Initialize the class."""
        MultipleSeqAlignment.__init__(self, records, alphabet=alphabet)

        # check the type of the alignment to be nucleotide
        for rec in self:
            if not isinstance(rec.seq, CodonSeq):
                raise TypeError("CodonSeq objects are expected in each "
                                "SeqRecord in CodonAlignment")

        if self.get_alignment_length() % 3 != 0:
            raise ValueError("Alignment length is not a multiple of "
                             "three (i.e. a whole number of codons)")
Пример #4
0
    def __init__(self, records='', name=None, alphabet=default_codon_alphabet):
        """Initialize the class."""
        MultipleSeqAlignment.__init__(self, records, alphabet=alphabet)

        # check the type of the alignment to be nucleotide
        for rec in self:
            if not isinstance(rec.seq, CodonSeq):
                raise TypeError("CodonSeq objects are expected in each "
                                "SeqRecord in CodonAlignment")

        if self.get_alignment_length() % 3 != 0:
            raise ValueError("Alignment length is not a multiple of "
                             "three (i.e. a whole number of codons)")
Пример #5
0
 def __init__(self, records,
         # CMA-specific attributes here
         # one=1,
         level=0,
         name=None,
         params=None,
         query_length=None,
         query_chars=None,
         ):
     # NB: alphabet is always protein; X is OK
     MultipleSeqAlignment.__init__(self, records, extended_protein)
     self.level = level
     self.name = name
     self.params = params
     self.query_length = query_length
     self.query_chars = query_chars
Пример #6
0
 def __init__(
     self,
     records,
     # CMA-specific attributes here
     # one=1,
     level=0,
     name=None,
     params=None,
     query_length=None,
     query_chars=None,
 ):
     # NB: alphabet is always protein; X is OK
     MultipleSeqAlignment.__init__(self, records, extended_protein)
     self.level = level
     self.name = name
     self.params = params
     self.query_length = query_length
     self.query_chars = query_chars
Пример #7
0
 def __init__(self, records, alphabet=None, annotations=None):
     MultipleSeqAlignment.__init__(self, records, alphabet, annotations)
     self._db = dict((self[i].id, i) for i in xrange(len(self)))
Пример #8
0
 def __init__(self, records, alphabet=None, annotations=None):
     MultipleSeqAlignment.__init__(self, records, alphabet, annotations)
     self._db = dict((self[i].id, i) for i in xrange(len(self)))