Exemplo 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
Exemplo 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
Exemplo 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
Exemplo 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