Skip to content

Commit 2f68349

Browse files
authored
Merge pull request #344 from bigict/data
fix: filter not supported chain type when creating dataset
2 parents 7e9bdc4 + d110678 commit 2f68349

1 file changed

Lines changed: 9 additions & 0 deletions

File tree

tools/dataset_from_pdb.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,13 @@
2424
logger = logging.getLogger(__file__)
2525

2626

27+
CHAIN_TYPE_DICT = {
28+
'mol:protein': residue_constants.PROT,
29+
'mol:dna': residue_constants.DNA,
30+
'mol:rna': residue_constants.RNA
31+
}
32+
33+
2734
def output_get_basename(filename):
2835
filename = os.path.basename(filename)
2936
if filename.endswith('.gz'):
@@ -175,6 +182,8 @@ def _make_domain(start, end, delta=0):
175182
chain_type = chain_type_dict.get(chain_id)
176183
if not exists(chain_type): # FIX: 146d
177184
continue
185+
if CHAIN_TYPE_DICT.get(chain_type) not in residue_constants.restype_list:
186+
continue
178187

179188
int_resseq = label_seq_id_list[i]
180189
residue_id = residue_id_list[i]

0 commit comments

Comments
 (0)