tcr_pmhc_interface_analysis.histo_fyi_utils module
- tcr_pmhc_interface_analysis.histo_fyi_utils.fetch_structure(pdb_id: str, assembly_number: int = 1, domain: str = 'all') str
Fetch a structure from the histo.fyi api
- Parameters:
pdb_id – pdb id of the structure
assembly_number – number if there are multiple of the same structure in the pdb file (Default: 1)
domain – can be either ‘abd’ or ‘peptide’ or ‘all’ (Default: ‘all’)
- Returns:
pdb file text
- Raises:
ValueError – if a non-valid domain is given
- tcr_pmhc_interface_analysis.histo_fyi_utils.retrieve_data_from_api(url: str) DataFrame
Get pMHC from API end point.
- Parameters:
url – Either ‘TCR_PMHC_CLASS_I_URL’ or ‘PMHC_CLASS_I_URL’.
- Returns:
dataframe with (tcr-)pmhc pdb_ids, peptide sequences, mhc allel information, and complex ids.
- Eg:
pdb_id peptide_sequence mhc_slug antigen_chain mhc_chain1 mhc_chain2 chains assembly_number resolution
0 7s7f LPASPAHQL hla_b_07_02 C A B A-B-C-D 1 1.88 1 7s8f EPRSPSHSM hla_b_07_02 C A B A-B-C 1 1.80 2 7s8e EPRSPSHSM hla_b_07_02 E A B A-B-E 1 1.60 3 7rzd EPRSPSHSM hla_b_07_02 C A B A-B-C 1 1.82 4 7s7d EPRSPSHSM hla_b_07_02 E A B A-B-E 1 1.56