小编Gab*_*Cia的帖子

Biopython:有没有一种方法可以从 PDB 文件中提取特定链的氨基酸序列?

我想从一堆 PDB 文件中提取特定链的单字母氨基酸序列。

我可以使用 SeqIO.parse() 来做到这一点,但在我看来,它感觉很不Pythonic:

PDB_file_path = '/full/path/to/some/pdb' 

# Is there a 1-liner for this ?
query_seqres = SeqIO.parse(PDB_file_path, 'pdb-seqres')

for chain in query_seqres:
    if chain.id == query_chain_id:
        query_chain = chain.seq
#
Run Code Online (Sandbox Code Playgroud)

有没有更简洁、更清晰的方法来做到这一点?

python bioinformatics biopython

3
推荐指数
1
解决办法
4484
查看次数

标签 统计

bioinformatics ×1

biopython ×1

python ×1