Beispiel #1
0
    def loadSequence(self, sequence):
        """load sequence properties from a sequence."""

        if len(sequence) % 3:
            raise "sequence %s is not multiples of 3: length=%i!" % (
                cur_record.title, len(sequence))

        SequenceProperties.loadSequence(self, sequence)

        # uppercase all letters and count codons
        self.mCodonCounts = Genomics.CountCodons(sequence.upper())
Beispiel #2
0
    def loadSequence(self, sequence, seqtype="na"):
        """load sequence properties from a sequence."""

        if len(sequence) % 3:
            raise ValueError('''sequence length is not a multiple of 3
                (length=%i)''' % (len(sequence)))

        SequencePropertiesLength.loadSequence(self, sequence, seqtype)

        # uppercase all letters and count codons
        self.mCodonCounts = Genomics.CountCodons(sequence.upper())