cliffgao的个人博客分享 http://blog.sciencenet.cn/u/cliffgao 兴趣:生物信息学、统计、概率

博文

Biopython 从蛋白质结构得到序列

已有 4482 次阅读 2020-3-22 19:54 |个人分类:python|系统分类:科研笔记

中文教程网站:

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



https://blog.sciencenet.cn/blog-468005-1224773.html

上一篇:SPOT-1D 安装-II
下一篇:删除软链接
收藏 IP: 111.165.23.*| 热度|

0

该博文允许注册用户评论 请点击登录 评论 (0 个评论)

数据加载中...

Archiver|手机版|科学网 ( 京ICP备07017567号-12 )

GMT+8, 2024-3-28 21:52

Powered by ScienceNet.cn

Copyright © 2007- 中国科学报社

返回顶部