import requestsimport urllib3urllib3.disable_warnings()def fetch_uniprot_data(uniprot_id): url =f"https://rest.uniprot.org/uniprotkb/{uniprot_id}.json" response = requests.get(url, verify=False) # Disable SSL verification response.raise_for_status() # Raise an error for bad status codesreturn response.json()def display_uniprot_data(data): primary_accession = data.get('primaryAccession', 'N/A') protein_name = data.get('proteinDescription', {}).get('recommendedName', {}).get('fullName', {}).get('value', 'N/A') gene_name = data.get('gene', [{'geneName': {'value': 'N/A'}}])[0]['geneName']['value'] organism = data.get('organism', {}).get('scientificName', 'N/A') function_comment =next((comment for comment in data.get('comments', []) if comment['commentType'] =="FUNCTION"), None) function = function_comment['texts'][0]['value'] if function_comment else'N/A'# Printing the dataprint(f"UniProt ID: {primary_accession}")print(f"Protein Name: {protein_name}")print(f"Organism: {organism}")print(f"Function: {function}")# Replace this with the UniProt ID you want to fetchuniprot_id ="P13747"data = fetch_uniprot_data(uniprot_id)display_uniprot_data(data)
UniProt ID: P13747
Protein Name: HLA class I histocompatibility antigen, alpha chain E
Organism: Homo sapiens
Function: Non-classical major histocompatibility class Ib molecule involved in immune self-nonself discrimination. In complex with B2M/beta-2-microglobulin binds nonamer self-peptides derived from the signal sequence of classical MHC class Ia molecules (VL9 peptides - VMAPRT[V/L][L/V/I/F]L) (PubMed:18083576, PubMed:18339401, PubMed:35705051, PubMed:37264229, PubMed:9754572). Peptide-bound HLA-E-B2M heterotrimeric complex primarily functions as a ligand for natural killer (NK) cell inhibitory receptor KLRD1-KLRC1, enabling NK cells to monitor the expression of other MHC class I molecules in healthy cells and to tolerate self (PubMed:17179229, PubMed:18083576, PubMed:37264229, PubMed:9486650, PubMed:9754572). Upon cellular stress, preferentially binds signal sequence-derived peptides from stress-induced chaperones and is no longer recognized by NK cell inhibitory receptor KLRD1-KLRC1, resulting in impaired protection from NK cells (PubMed:12461076). Binds signal sequence-derived peptides from non-classical MHC class Ib HLA-G molecules and acts as a ligand for NK cell activating receptor KLRD1-KLRC2, likely playing a role in the generation and effector functions of adaptive NK cells and in maternal-fetal tolerance during pregnancy (PubMed:30134159, PubMed:37264229, PubMed:9754572). Besides self-peptides, can also bind and present pathogen-derived peptides conformationally similar to VL9 peptides to alpha-beta T cell receptor (TCR) on unconventional CD8-positive cytotoxic T cells, ultimately triggering antimicrobial immune response (PubMed:16474394, PubMed:20195504, PubMed:30087334, PubMed:34228645). Presents HIV gag peptides (immunodominant KAFSPEVIPMF and subdominant KALGPAATL epitopes) predominantly to CD8-positive T cell clones expressing a TRAV17-containing TCR, triggering HLA-E-restricted T cell responses (PubMed:34228645). Presents mycobacterial peptides to HLA-E-restricted CD8-positive T cells eliciting both cytotoxic and immunoregulatory functions (PubMed:20195504, PubMed:35705051)
More information:
AlphaFold model
Surface representation - binding sites
The computed point cloud for pLDDT > 0.6. Each atom is sampled on average by 10 points.
To see the predicted binding interfaces, you can choose color theme “uncertainty”.
Go to the “Controls Panel”
Below “Components”, to the right, click on “…”
“Set Coloring” by “Atom Property”, and “Uncertainty/Disorder”