Commit 665ebc30 authored by Augustin Zidek's avatar Augustin Zidek Committed by Copybara-Service
Browse files

Make `_chem_comp.type` logic case-insensitive.

The specification http://mmcif.rcsb.org/dictionaries/mmcif_pdbx.dic/Items/_chem_comp.type.html says this is case-insensitive and AFDB files use capitalised "PEPTIDE".

PiperOrigin-RevId: 506266651
Change-Id: I2f16d729e41c722c74f94a3b308c7159b289a5c3
parent 18e12d61
...@@ -374,7 +374,7 @@ def _get_protein_chains( ...@@ -374,7 +374,7 @@ def _get_protein_chains(
chain_ids = entity_to_mmcif_chains[entity_id] chain_ids = entity_to_mmcif_chains[entity_id]
# Reject polymers without any peptide-like components, such as DNA/RNA. # Reject polymers without any peptide-like components, such as DNA/RNA.
if any(['peptide' in chem_comps[monomer.id]['_chem_comp.type'] if any(['peptide' in chem_comps[monomer.id]['_chem_comp.type'].lower()
for monomer in seq_info]): for monomer in seq_info]):
for chain_id in chain_ids: for chain_id in chain_ids:
valid_chains[chain_id] = seq_info valid_chains[chain_id] = seq_info
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment