||
中文教程网站:
https://biopython-cn.readthedocs.io/zh_CN/latest/index.html
从PDB文件中获取 蛋白质序列有以下两种形式:
1.一种以C-N 模式; 2. 一种是CA-CA模式。
from Bio import PDB
# Using C-N
ppb = PDB.PPBuilder()
for pp in ppb.build_peptides(structure):
print(pp.get_sequence())
# Using CA-CA
ppb = PDB.CaPPBuilder()
for pp in ppb.build_peptides(structure):
print(pp.get_sequence())
得到的序列是这种格式:
(序列本身,Alphabet()),其实如果用print打印 就只是序列本身。
如果向获得序列本身, 需要用 str()
>>> from Bio.Seq import Seq >>> my_seq = Seq("AGTACACTGGT") >>> my_seq Seq('AGTACACTGGT', Alphabet())
参考:
https://biopython.org/wiki/The_Biopython_Structural_Bioinformatics_FAQ
参考:https://biopython-cn.readthedocs.io/zh_CN/latest/en/chr03.html
Archiver|手机版|科学网 ( 京ICP备07017567号-12 )
GMT+8, 2024-9-21 12:38
Powered by ScienceNet.cn
Copyright © 2007- 中国科学报社