Esempio n. 1
0
    def get_length(self):
        """ Returns the length of the protein.
        """
        length = 0
        for residue in self._chain:
            if is_aa(residue):
                length += 1

        return length
Esempio n. 2
0
    def get_length(self):
        """ Returns the length of the protein.
        """
        length = 0
        for residue in self._chain:
            if is_aa(residue):
                length += 1

        return length
Esempio n. 3
0
    def _get_sequence_from_chain(self, chain):
        """ Extracts the amino acid sequence from a Bio.PDB chain object """
        sequence = ""

        for residue in chain:
            if is_aa(residue):
                sequence += three_to_one(residue.get_resname())
            else:
                break

        return sequence
Esempio n. 4
0
    def _get_sequence_from_chain(self, chain):
        """ Extracts the amino acid sequence from a Bio.PDB chain object """
        sequence = ""

        for residue in chain:
            if is_aa(residue):
                sequence += three_to_one(residue.get_resname())
            else: 
                break

        return sequence