functionlab / giant-api Goto Github PK
View Code? Open in Web Editor NEWRESTful API for Functional Genomics
RESTful API for Functional Genomics
It appears the parameter name for POST resource /networks is "genes", which is not clear from the documentation.
Following the documentation here, as well as on pages http://giant-api.princeton.edu/static/index.html and https://github.com/FunctionLab/giant-api/wiki/Examples, I've tried submitting a NetWAS job with the API, using:
curl http://giant-api.princeton.edu/netwas/jobs
-F title="NetWAS cURL demo"
-F email=my_email_address
-F gwas_file="@bmi-2012.vegas.txt"
-F tissue="adipose_tissue"
-F p_value=0.01
-F gwas_format="vegas"
The job is then queued, and I get a job id back.
When trying to start the job using:
curl -X POST http://giant-api.princeton.edu/netwas/jobs/${JOB_ID}/start
I get the following message: โ{"job.status":"Job status must be 'not_started'. Current job status: queued."}โ
The job also remains on status 'queued'.
Hello,
I am trying to run NetWAS from API. I am using Python 2.7.17 for running the program. But getting following error. Can anyone help me on this.
$python demo.py
Started demo.py at 2021-09-13 19:49:43.098685.
This script uses the GIANT API to run a NetWAS job in demo mode, which is
invoked by the setting "tissue=api-demo". This simulates a short SVM training,
which completes in under 2 minutes. In order to run NetWAS on actual tissues,
please replace "api-demo" with one of the 144 tissue choices supported by the
API. Valid options are listed at http://giant-api.princeton.edu/tissues. Note
that non-demo NetWAS tasks may take up to 30 minutes to complete.
Step 1: Create new NetWAS job..
Done. Job details (prior to submission to GIANT server):
{
"id": null,
"created": null,
"title": "GIANT API NetWAS Example in Python",
"email": "",
"gwas_file": "./bmi-2012.out",
"tissue": "api-demo",
"p_value": 0.01,
"log_file": null,
"results_file": null,
"status": null
}
<<<
Step 2: Submit NetWAS job to GIANT server and start SVM training..
Traceback (most recent call last):
File "demo.py", line 37, in
nj1.start()
File "/mnt/d/COVID_work_sujoy/COVID_work_release_6/analysis/NetWAS/giant-api/client/python/giantapi.py", line 97, in start
self.init()
File "/mnt/d/COVID_work_sujoy/COVID_work_release_6/analysis/NetWAS/giant-api/client/python/giantapi.py", line 85, in init
json = r.json()
File "/home/monalisa6hota/.local/lib/python2.7/site-packages/requests/models.py", line 910, in json
return complexjson.loads(self.text, **kwargs)
File "/usr/lib/python2.7/json/init.py", line 339, in loads
return _default_decoder.decode(s)
File "/usr/lib/python2.7/json/decoder.py", line 364, in decode
obj, end = self.raw_decode(s, idx=_w(s, 0).end())
File "/usr/lib/python2.7/json/decoder.py", line 382, in raw_decode
raise ValueError("No JSON object could be decoded")
ValueError: No JSON object could be decoded
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.