How to loop through to get the polypeptide sequences of multiple structures using Biopython Bio.PDB module.
structureA = PDBParser().get_structure("2rheH", " 2rheH")
PolypeptideBuilder = PPBuilder()
for pp in PolypeptideBuilder.build_peptides(structureA):
print(pp.get_sequence())
>>> ESVLTQPPSASGTPGQRVTISCTGSATDIGSNSVIWYQQVPGKAPKLLIYYNDLLPSGVSDRFSASKSGTSASLAISGLESEDEADYYCAAWNDSLDEPGFGGGTKLTVLGQPK
structureB = PDBParser().get_structure("3ebxH", "3ebxH")
PolypeptideBuilder = PPBuilder()
for pp in PolypeptideBuilder.build_peptides(structureB):
print(pp.get_sequence())
>>> RICFNHQSSQPQTTKTCSPGESSCYHKQWSDFRGTIIERGCGCPTVKPGIKLSCCESEVCNN
structureC = PDBParser().get_structure("1fxdH", " 1fxdH")
PolypeptideBuilder = PPBuilder()
for pp in PolypeptideBuilder.build_peptides(structureC):
print(pp.get_sequence())
>>> PIEVNDDCMACEACVEICPDVFEMNEEGDKAVVINPDSDLDCVEEAIDSCPAEAIVRS
I am using Biopython's Bio.PDB to get the protein sequences of PDB files.
This is the code that I have used in order to get three sequences.
I would like to find out if there is a way that I could loop this operation in order to get all three sequences printed out from the three different files at once?
• 2,591 views
•
link
0 answers
No answers yet.
Log in to answer this question.
Do you actual need peptide chain sequences or do you want the full protein sequence?
The easy way to loop your IDs is just to throw the whole thing inside a loop of names:
You might want to check out this previous thread.