Skip to content

Commit

Permalink
rna_pdb_fetch_header.py: handle pdbid_chain
Browse files Browse the repository at this point in the history
  • Loading branch information
mmagnus committed Dec 4, 2024
1 parent 3924a56 commit 4bfdbc8
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions rna_tools/rna_pdb_fetch_header.py
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,8 @@ def fetch_pdb_header(pdb_id):
args.file = args.file

for pdb_id in [f.replace('.pdb', '').replace('.cif', '') for f in args.file]:
if '_' in pdb_id:
pdb_id, chain = pdb_id.split('_')
header_info = fetch_pdb_header(pdb_id)
title = header_info.get('entry', {}).get('struct', {}).get('title', 'Title not found')
# Print the extracted title
Expand Down

0 comments on commit 4bfdbc8

Please sign in to comment.