sifts
SIFTS mmCIF helpers.
These helpers operate on _pdbx_sifts_unp_segments category in mmCIF files,
which are used to map PDB chains to UniProt accessions and residue ranges.
uniprot_chain_mappings_from_cif(block, best_only=True, strip_isoform=True)
¶
Extract UniProt chain mappings from raw _pdbx_sifts_unp_segments rows.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
block
|
Block
|
mmCIF block containing |
required |
best_only
|
bool
|
If True, only return rows where |
True
|
strip_isoform
|
bool
|
If True, strip isoform suffixes from UniProt accessions (e.g. |
True
|
Returns:
| Type | Description |
|---|---|
UniprotChainMappings
|
Set of UniProt chain mappings with ranges per chain. Empty if no SIFTS |
UniprotChainMappings
|
segment data is found. Returned chains use label system. |
uniprot_chain_mappings_to_cif(mappings, block)
¶
Write minimal _pdbx_sifts_unp_segments rows to an mmCIF block.
The emitted category only contains the subset consumed by
uniprot_chain_mappings_from_cif().
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
mappings
|
UniprotChainMappings
|
UniProt chain mappings in label chain-id system. |
required |
block
|
Block
|
mmCIF block to update. |
required |