aboutsummaryrefslogtreecommitdiff
path: root/gn3/api/general.py
diff options
context:
space:
mode:
authorMunyoki Kilyungi2022-10-12 15:50:33 +0300
committerBonfaceKilz2022-11-02 17:36:22 +0300
commit6e58cb5ffe3b145aa6ba9b7a54672e7a7f18a0b7 (patch)
tree0a7d5d2bbd5774b91188cf90f3c58c9be1d77c31 /gn3/api/general.py
parent2e85b5c7c4be181182f263fcb644abd173be83c1 (diff)
downloadgenenetwork3-6e58cb5ffe3b145aa6ba9b7a54672e7a7f18a0b7.tar.gz
Re-implement RDF related code to use monads in its own module
* gn3/api/general.py: Replace gn3.db.datasets import with gn3.db.rdf. (dataset_metadata) <jsonify>: Replace datasets.dataset_metadata with rdf.get_dataset_metadata. * gn3/db/datasets.py: Remove unused imports. (sparql_query, dataset_metadata): Delete. * gn3/db/rdf.py: (sparql_query, get_dataset_metadata): New functions.
Diffstat (limited to 'gn3/api/general.py')
-rw-r--r--gn3/api/general.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/gn3/api/general.py b/gn3/api/general.py
index e0bfc81..68b128b 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
+from gn3.db import rdf
general = Blueprint("general", __name__)
@@ -72,4 +72,4 @@ def run_r_qtl(geno_filestr, pheno_filestr):
@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))
+ return jsonify(rdf.get_dataset_metadata(accession_id).data)