aboutsummaryrefslogtreecommitdiff
path: root/gn3/api
diff options
context:
space:
mode:
authorFrederick Muriuki Muriithi2021-12-06 14:06:13 +0300
committerFrederick Muriuki Muriithi2021-12-06 14:06:13 +0300
commit0cfcea15c56e4ccd4379599076aabd13715cd873 (patch)
treef94ef7c5f5d12be76abaaf5d92d4a0e5d3863a64 /gn3/api
parent66406115f41594ba40e3fbbc6f69aace2d11800f (diff)
parent63923aee24a5f605961821ea31e64213f885db74 (diff)
downloadgenenetwork3-0cfcea15c56e4ccd4379599076aabd13715cd873.tar.gz
Merge branch 'main' of github.com:genenetwork/genenetwork3
Diffstat (limited to 'gn3/api')
-rw-r--r--gn3/api/general.py7
1 files changed, 6 insertions, 1 deletions
diff --git a/gn3/api/general.py b/gn3/api/general.py
index 69ec343..e0bfc81 100644
--- a/gn3/api/general.py
+++ b/gn3/api/general.py
@@ -7,7 +7,7 @@ from flask import request
from gn3.fs_helpers import extract_uploaded_file
from gn3.commands import run_cmd
-
+from gn3.db import datasets
general = Blueprint("general", __name__)
@@ -68,3 +68,8 @@ def run_r_qtl(geno_filestr, pheno_filestr):
cmd = (f"Rscript {rqtl_wrapper} "
f"{geno_filestr} {pheno_filestr}")
return jsonify(run_cmd(cmd)), 201
+
+@general.route("/dataset/<accession_id>")
+def dataset_metadata(accession_id):
+ """Return info as JSON for dataset with ACCESSION_ID."""
+ return jsonify(datasets.dataset_metadata(accession_id))