aboutsummaryrefslogtreecommitdiff
path: root/gn3/db/rdf.py
AgeCommit message (Collapse)Author
2023-06-15Fetch genotypes from virtuosoMunyoki Kilyungi
* gn3/api/metadata.py: Import get_genotype_metadata. (genotype): New end-point. * gn3/db/rdf.py (get_phenotype_metadata): New function. Signed-off-by: Munyoki Kilyungi <me@bonfacemunyoki.com>
2023-06-12Delete unused importMunyoki Kilyungi
Signed-off-by: Munyoki Kilyungi <me@bonfacemunyoki.com>
2023-06-12Fetch phenotypes from virtuosoMunyoki Kilyungi
* gn3/api/metadata.py: Import get_phenotype_metadata. (phenotype): New end-point. * gn3/db/rdf.py (get_phenotype_metadata): New function. Signed-off-by: Munyoki Kilyungi <me@bonfacemunyoki.com>
2023-06-12Delete unused get_trait_metadata functionMunyoki Kilyungi
Signed-off-by: Munyoki Kilyungi <me@bonfacemunyoki.com>
2023-06-07Add publication end-pointMunyoki Kilyungi
* gn3/api/metadata.py: Import get_publication_metadata (publication): New endpoint. * gn3/db/rdf.py (get_dataset_metadata): New function. Signed-off-by: Munyoki Kilyungi <me@bonfacemunyoki.com>
2023-06-07Nest duplicate entries into a list from a sparql resultMunyoki Kilyungi
Signed-off-by: Munyoki Kilyungi <me@bonfacemunyoki.com>
2023-06-06Pass geoSeries as a URLMunyoki Kilyungi
Signed-off-by: Munyoki Kilyungi <me@bonfacemunyoki.com>
2023-06-06Rename gn:geoPlatform -> gn:geoPlatformUrlMunyoki Kilyungi
Signed-off-by: Munyoki Kilyungi <me@bonfacemunyoki.com>
2023-06-06Match how dataset metadata is fetched with GN1Munyoki Kilyungi
* gn3/db/rdf.py (sparql_query): Parse CONSTRUCTS and SELECTS differently. (strip_url): Rename to ... (get_url_local_name): ... this. (get_dataset_metadata): Fetch extra fields in RDF. Signed-off-by: Munyoki Kilyungi <me@bonfacemunyoki.com>
2023-06-06Replace taxon prefix with ncbiTaxon which references NCBIMunyoki Kilyungi
Signed-off-by: Munyoki Kilyungi <me@bonfacemunyoki.com>
2023-06-02Replace SELECT with CONSTRUCT when fetching a dataset's metadataMunyoki Kilyungi
* gn3/db/rdf.py: Importh pymonad.Nothing. (get_dataset_metadata): Replace SELECT with CONSTRUCT. Signed-off-by: Munyoki Kilyungi <me@bonfacemunyoki.com>
2023-06-02Create a function for stripping the last bit from a URLMunyoki Kilyungi
* gn3/db/rdf.py: Import unquote and urlparse. (strip_url): New function. Signed-off-by: Munyoki Kilyungi <me@bonfacemunyoki.com>
2023-04-17Create new endpoint for fetching GeneRIF entriesMunyoki Kilyungi
* gn3/api/metadata.py: Import Template, sparql_query and RDF_PREFIXES. (get_genewiki_entries): New endpoint. * gn3/db/rdf.py: Add new constant for storing rdf prefixes. Signed-off-by: Munyoki Kilyungi <me@bonfacemunyoki.com>
2023-03-01Fetch trait metadata from RDFMunyoki Kilyungi
* gn3/db/rdf.py (get_dataset_metadata): New function. Signed-off-by: Munyoki Kilyungi <me@bonfacemunyoki.com>
2022-12-08Remove unused importFrederick Muriuki Muriithi
2022-12-06Use a dataset's name to fetch it's metadata from RDFMunyoki Kilyungi
* gn3/api/metadata.py (jsonify_dataset_metadata): Rewrite metadata end-point to use a dataset's name instead of it's accession_id. * gn3/db/rdf.py (get_dataset_metadata): Replace accession_id with name. Use one single RDF query instead of multiple queries.
2022-11-16Inject SPARQLWrapper as a parameterMunyoki Kilyungi
* gn3/db/rdf.py: Delete gn3.setting.SPARQL_ENDPOINT import. (sparql_query): Inject SPARQLWrapper. (get_dataset_metadata): Ditto.
2022-11-02Re-implement RDF related code to use monads in its own moduleMunyoki Kilyungi
* 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.