aboutsummaryrefslogtreecommitdiff
path: root/gn3/api/metadata.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-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-12Correct publication function docstringMunyoki Kilyungi
* gn3/api/metadata.py (publication): Update docstring. 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-07Remove trait_metadata endpointMunyoki Kilyungi
* gn3/api/metadata.py: Remove get_trait_metadata import. (trait_metadata): Delete. Signed-off-by: Munyoki Kilyungi <me@bonfacemunyoki.com>
2023-06-06Rename dataset_metadata -> datasetMunyoki Kilyungi
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-01Create API endpoint for fetching trait metadataMunyoki Kilyungi
* gn3/api/metadata.py (dataset_metadata): New function and endpoint. (jsonify_dataset_metadata): Rename to dataset_metadata. Signed-off-by: Munyoki Kilyungi <me@bonfacemunyoki.com>
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-28Catch a URLError when virtuoso isn't running at allMunyoki Kilyungi
* gn3/api/metadata.py: Import URLError. (jsonify_dataset_metadata): Add URLError in except block.
2022-11-28Fix pylint errorsMunyoki Kilyungi
* gn3/api/general.py: Delete rdf import. Delete trailing white spaces. * gn3/api/metadata.py: Delete trailing white spaces.
2022-11-28Fail gracefully when virtuoso is not accessibleMunyoki Kilyungi
* gn3/api/metadata.py: import RemoteDisconnected. (jsonify_dataset_metadata): Wrap get_dataset_metadata in try block.
2022-11-23Create a new REST endpoint for fetching a phenotype's metadataMunyoki Kilyungi
* gn3/api/general.py: (dataset_metadata) Delete. * gn3/api/metadata.py: Import Blueprint, jsonify, current_app, SPARQLWrapper and get_dataset_metadata. (metadata): New Blueprint (jsonify_dataset_metadata): New function/end-point. * gn3/app.py: Import metadata (create_app): Register metadata blueprint.