我想从一堆 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)
有没有更简洁、更清晰的方法来做到这一点?