有没有办法在 PDB 文件中分离属于每个生物组装的链?(python 脚本)

Is there a way to separate the chains belong to each Biological assembly in a PDB file?(python Script)

我想在 PDB 文件中分离属于特定生物组件的链 ID。 例如 PDB ID 1BRS 有 3 个生物组件 生物装配 1 : - 链 A 和 D 生物组装 2:- 链 B 和 E 生物组装 3 : - 链 C 和 F

有没有办法(python 脚本)将属于每个生物组件的链 ID 分开,如下所示 1BRS_A:D 1BRS_B:E 1BRS_C:F 无需提取链坐标。如果我得到连锁名称,那就足够了。 提前致谢

PDBx/mmCIF 文件格式包含 _pdbx_struct_assembly_gen 类别中的信息。

loop_
_pdbx_struct_assembly_gen.assembly_id 
_pdbx_struct_assembly_gen.oper_expression 
_pdbx_struct_assembly_gen.asym_id_list 
1 1 A,D,G,J 
2 1 B,E,H,K 
3 1 C,F,I,L 

可以读取这些文件,例如使用 Biotite (https://www.biotite-python.org/),这是我正在开发的一个包。 类别可以像字典一样阅读:

import biotite.database.rcsb as rcsb
import biotite.structure as struc
import biotite.structure.io.pdbx as pdbx

ID = "1BRS"

# Download structure
file_name = rcsb.fetch(ID, "pdbx", target_path=".")

# Read file
file = pdbx.PDBxFile()
file.read(file_name)
# Get 'pdbx_struct_assembly_gen' category as dictionary
assembly_dict = file["pdbx_struct_assembly_gen"]
for asym_id_list in assembly_dict["asym_id_list"]:
    chain_ids = asym_id_list.split(",")
    print(f"{ID}_{':'.join(chain_ids)}")

输出为

1BRS_A:D:G:J
1BRS_B:E:H:K
1BRS_C:F:I:L

链 G-L 只包含水分子。

编辑:

仅包括属于聚合物的链 ID,例如蛋白质或核苷酸,您可以使用 entity_poly 类别:

loop_
_entity_poly.entity_id 
_entity_poly.type 
_entity_poly.nstd_linkage 
_entity_poly.nstd_monomer 
_entity_poly.pdbx_seq_one_letter_code 
_entity_poly.pdbx_seq_one_letter_code_can 
_entity_poly.pdbx_strand_id 
_entity_poly.pdbx_target_identifier 
1 'polypeptide(L)' no no 
;AQVINTFDGVADYLQTYHKLPDNYITKSEAQALGWVASKGNLADVAPGKSIGGDIFSNREGKLPGKSGRTWREADINYTS
GFRNSDRILYSSDWLIYKTTDHYQTFTKIR
;
;AQVINTFDGVADYLQTYHKLPDNYITKSEAQALGWVASKGNLADVAPGKSIGGDIFSNREGKLPGKSGRTWREADINYTS
GFRNSDRILYSSDWLIYKTTDHYQTFTKIR
;
A,B,C ? 
2 'polypeptide(L)' no no 
;KKAVINGEQIRSISDLHQTLKKELALPEYYGENLDALWDALTGWVEYPLVLEWRQFEQSKQLTENGAESVLQVFREAKAE
GADITIILS
;
;KKAVINGEQIRSISDLHQTLKKELALPEYYGENLDALWDALTGWVEYPLVLEWRQFEQSKQLTENGAESVLQVFREAKAE
GADITIILS
;
D,E,F ? 

这是更新后的 Python 代码:

import biotite.database.rcsb as rcsb
import biotite.structure as struc
import biotite.structure.io.pdbx as pdbx

ID = "1BRS"

# Download structure
file_name = rcsb.fetch(ID, "pdbx", target_path=".")

# Read file
file = pdbx.PDBxFile()
file.read(file_name)

# Get 'entity_poly' category as dictionary
# to find out which chains are polymers
poly_chains = []
for chain_list in file["entity_poly"]["pdbx_strand_id"]:
    poly_chains += chain_list.split(",")

# Get 'pdbx_struct_assembly_gen' category as dictionary
for asym_id_list in file["pdbx_struct_assembly_gen"]["asym_id_list"]:
    chain_ids = asym_id_list.split(",")
    # Filter chains that belong to a polymer
    chain_ids = [chain_id for chain_id in chain_ids if chain_id in poly_chains]
    print(f"{ID}_{':'.join(chain_ids)}")

这是输出:

1BRS_A:D
1BRS_B:E
1BRS_C:F