Code
import requests
import urllib3
urllib3.disable_warnings()
def fetch_uniprot_data(uniprot_id):
= f"https://rest.uniprot.org/uniprotkb/{uniprot_id}.json"
url = requests.get(url, verify=False) # Disable SSL verification
response # Raise an error for bad status codes
response.raise_for_status() return response.json()
def display_uniprot_data(data):
= data.get('primaryAccession', 'N/A')
primary_accession = data.get('proteinDescription', {}).get('recommendedName', {}).get('fullName', {}).get('value', 'N/A')
protein_name = data.get('gene', [{'geneName': {'value': 'N/A'}}])[0]['geneName']['value']
gene_name = data.get('organism', {}).get('scientificName', 'N/A')
organism
= next((comment for comment in data.get('comments', []) if comment['commentType'] == "FUNCTION"), None)
function_comment = function_comment['texts'][0]['value'] if function_comment else 'N/A'
function
# Printing the data
print(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 fetch
= "O00206"
uniprot_id = fetch_uniprot_data(uniprot_id)
data display_uniprot_data(data)
UniProt ID: O00206
Protein Name: Toll-like receptor 4
Organism: Homo sapiens
Function: Transmembrane receptor that functions as a pattern recognition receptor recognizing pathogen- and damage-associated molecular patterns (PAMPs and DAMPs) to induce innate immune responses via downstream signaling pathways (PubMed:10835634, PubMed:15809303, PubMed:16622205, PubMed:17292937, PubMed:17478729, PubMed:20037584, PubMed:20711192, PubMed:23880187, PubMed:27022195, PubMed:29038465). At the plasma membrane, cooperates with LY96 to mediate the innate immune response to bacterial lipopolysaccharide (LPS) (PubMed:27022195). Also involved in LPS-independent inflammatory responses triggered by free fatty acids, such as palmitate, and Ni(2+) (PubMed:20711192). Mechanistically, acts via MYD88, TIRAP and TRAF6, leading to NF-kappa-B activation, cytokine secretion and the inflammatory response (PubMed:10835634, PubMed:21393102, PubMed:27022195, PubMed:36945827, PubMed:9237759). Alternatively, CD14-mediated TLR4 internalization via endocytosis is associated with the initiation of a MYD88-independent signaling via the TICAM1-TBK1-IRF3 axis leading to type I interferon production (PubMed:14517278). In addition to the secretion of proinflammatory cytokines, initiates the activation of NLRP3 inflammasome and formation of a positive feedback loop between autophagy and NF-kappa-B signaling cascade (PubMed:32894580). In complex with TLR6, promotes inflammation in monocytes/macrophages by associating with TLR6 and the receptor CD86 (PubMed:23880187). Upon ligand binding, such as oxLDL or amyloid-beta 42, the TLR4:TLR6 complex is internalized and triggers inflammatory response, leading to NF-kappa-B-dependent production of CXCL1, CXCL2 and CCL9 cytokines, via MYD88 signaling pathway, and CCL5 cytokine, via TICAM1 signaling pathway (PubMed:23880187). In myeloid dendritic cells, vesicular stomatitis virus glycoprotein G but not LPS promotes the activation of IRF7, leading to type I IFN production in a CD14-dependent manner (PubMed:15265881, PubMed:23880187). Required for the migration-promoting effects of ZG16B/PAUF on pancreatic cancer cells