haf
New Member
Posts: 1
|
Post by haf on Nov 26, 2021 5:49:45 GMT -5
Hi, I am trying to use David tools for pathway analysis and I am very new to bioinformatics  . The API links do not give me any data when I run them on python, infact i get an error: [Errno 8] nodename nor servname provided, or not known'. Also, clicking on the link takes me to a broken website. Can someone please help? This is the code I used to see if the links were working: # import requests module import requests # Making a get request response = requests.get('http://david.abcc.ncifcrf.gov/api.jsp?type=ENTREZ_GENE_ID&ids=2919,6347,6348,6364&tool=chartReport&annot=GOTERM_BP_FAT,GOTERM_CC_FAT,GOTERM_MF_FAT,INTERPRO,PIR_SUPERFAMILY,SMART,BBID,BIOCARTA,KEGG_PATHWAY,COG_ONTOLOGY,SP_PIR_KEYWORDS,UP_SEQ_FEATURE,GENETIC_ASSOCIATION_DB_DISEASE,OMIM_DISEASE') # print response print(response) response.content Thanks a lot!
|
|
|
Post by help on Feb 15, 2023 12:27:56 GMT -5
Hi, I'm using David tools for GO Enrichment analysis and I am very new to bioinformatics. I tried to call one of the API links and it does not give me any data when I run them on python. I am trying to retrieve a json object or a .txt file from the response, like when you download it from the website. But when I print the content, I get an HTML script:
<html> <head> </head> <body> <form name="apiForm" method="POST"> <input type="hidden" name="rowids"> <input type="hidden" name="annot">
<script type="text/javascript"> document.apiForm.rowids.value="936853,938571,938380,936852,938378,938377,936846,937037,939329,937991,936653,936843,937415,938370,936841,936840,938367,939321,938365,937217,938360,936832,936639,939695,938357,939311,937972,936824,938351,938349,938348,939303,939302,938347,936817,939682,938345,938343,938340,938339,938912,938337,938335,938333,938331,938518,936799,938327,938326,937179,938322,938321,939847,938318,938317,938315,938888,936977,938313,938311,938309,936590,938881,938498,939259,936967,936584,938303,939254,938299,939444,936576,938291,937144,937525,937141,936949,936372,939994,935983,936555,936362,935970,935968,936540,936919,936532,937868,935957,936145,936144,936524,936904,935948,935946,936519,938620,936514,938615,939949,935936,938419,938610,935935,938417,936506,936504,939940,938411,936883,938409,939362,936876,939359,938211,938402,937064,939356,937063,936107,938778,938012,936865,938393,936863,938389,936479,938387,938383"; document.apiForm.annot.value="26"; document.apiForm.action = "chartReport.jsp"; document.apiForm.submit(); </script>
</form> </body> </html> : 9
My code is the following:
import requests, sys import json
essential_uniprot = df.loc[df['Essentiality'] == 1]['GOA number'].to_string(index=False).split('\n')
ids = ','.join(essential_uniprot) _type = "UNIPROT_ACCESSION" annot = "GOTERM_BP_ALL, GOTERM_CC_ALL, GOTERM_MF_ALL" tool = "chartReport"
requestURL = "https://david.ncifcrf.gov/api.jsp?type=" + _type + "&ids=" + ids +"&tool=" + tool + "&annot=" + annot r = requests.get(requestURL)
if not r.ok: r.raise_for_status() sys.exit()
print(r.content)
|
|
|
Post by Stephen on Jul 21, 2023 11:16:39 GMT -5
|
|
|
Post by Stephen on Jul 21, 2023 11:18:44 GMT -5
|
|