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
= "Q6ZQN7"
uniprot_id = fetch_uniprot_data(uniprot_id)
data display_uniprot_data(data)
UniProt ID: Q6ZQN7
Protein Name: Solute carrier organic anion transporter family member 4C1
Organism: Homo sapiens
Function: Mediates the transport of organic anions such as steroids (estrone 3-sulfate, chenodeoxycholate, glycocholate) and thyroid hormones (3,3',5-triiodo-L-thyronine (T3), L-thyroxine (T4)), in the kidney (PubMed:14993604, PubMed:19129463, PubMed:20610891). Capable of transporting cAMP and pharmacological substances such as digoxin, ouabain and methotrexate (PubMed:14993604). Transport is independent of sodium, chloride ion, and ATP (PubMed:14993604). Transport activity is stimulated by an acidic extracellular environment due to increased substrate affinity to the transporter (PubMed:19129463). The driving force for this transport activity is currently not known (By similarity). The role of hydrogencarbonate (HCO3(-), bicarbonate) as the probable counteranion that exchanges for organic anions is still not well defined (PubMed:19129463). Functions as an uptake transporter at the apical membrane, suggesting a role in renal reabsorption (By similarity). Involved in the renal secretion of the uremic toxin ADMA (N(omega),N(omega)-dimethyl-L-arginine or asymmetrical dimethylarginine), which is associated to cardiovascular events and mortality, and the structurally related amino acids L-arginine and L-homoarginine (a cardioprotective biomarker) (PubMed:30865704). Can act bidirectionally, suggesting a dual protective role of this transport protein; exporting L-homoarginine after being synthesized in proximal tubule cells, and mediating uptake of ADMA from the blood into proximal tubule cells where it is degraded by the enzyme dimethylarginine dimethylaminohydrolase 1 (DDAH1) (PubMed:30865704, PubMed:32642843). May be involved in sperm maturation by enabling directed movement of organic anions and compounds within or between cells (By similarity). This ion-transporting process is important to maintain the strict epididymal homeostasis necessary for sperm maturation (By similarity). May have a role in secretory functions since seminal vesicle epithelial cells are assumed to secrete proteins involved in decapacitation by modifying surface proteins to facilitate the acquisition of the ability to fertilize the egg (By similarity)