aboutsummaryrefslogtreecommitdiff
path: root/gn3/db
diff options
context:
space:
mode:
authorMunyoki Kilyungi2023-10-19 11:33:36 +0300
committerBonfaceKilz2023-10-27 13:45:32 +0300
commit8be0865e940a0e642b6a1bfb4d266dd7b5c79d69 (patch)
tree7ad22b077151cb7251d53f82e353ff45a1d45744 /gn3/db
parentf8e5a04d5e7c340657ae69fb95884f00d68ac7c1 (diff)
downloadgenenetwork3-8be0865e940a0e642b6a1bfb4d266dd7b5c79d69.tar.gz
Delete get_dataset_metadata.
* gn3/db/rdf.py (get_dataset_metadata): Delete. Signed-off-by: Munyoki Kilyungi <me@bonfacemunyoki.com>
Diffstat (limited to 'gn3/db')
-rw-r--r--gn3/db/rdf.py43
1 files changed, 0 insertions, 43 deletions
diff --git a/gn3/db/rdf.py b/gn3/db/rdf.py
index 2f80aa2..ae0ec29 100644
--- a/gn3/db/rdf.py
+++ b/gn3/db/rdf.py
@@ -87,49 +87,6 @@ def get_url_local_name(string: str) -> str:
return string
-def get_dataset_metadata(
- sparql_conn: SPARQLWrapper, name: str
-) -> MonadicDict:
- """Return info about dataset with a given NAME"""
- response: MonadicDict = MonadicDict()
- for key, value in sparql_query(
- sparql_conn,
- Template("""
-$prefix
-
-CONSTRUCT {
- ?dataset ?predicate ?term .
- ?dataset gnt:classifiedUnder ?inbredSetName .
- ?dataset gnt:usesNormalization ?normalizationLabel .
- ?typePredicate ex:DatasetType ?typeName .
-} WHERE {
- ?dataset rdf:type dcat:Dataset .
- ?dataset ?predicate ?term .
- ?dataset xkos:classifiedUnder ?inbredSet .
- gnc:Set skos:member ?inbredSet .
- ?dataset (rdfs:label|dct:identifier) "$name" .
- ?inbredSet rdfs:label ?inbredSetName .
- OPTIONAL {
- ?dataset xkos:classifiedUnder ?type .
- gnc:DatasetType skos:member ?type .
- ?type ?typePredicate ?typeName .
- ?type (skos:altLabel|skos:prefLabel) ?typeName .
- } .
- OPTIONAL {
- ?dataset gnt:usesNormalization ?normalization .
- ?normalization rdfs:label ?normalizationLabel .
- }
- FILTER (!regex(str(?predicate), '(classifiedUnder|usesNormalization)','i')) .
-}""")
- .substitute(
- prefix=RDF_PREFIXES,
- name=name
- )
- )[0].items():
- response[key] = value
- return response
-
-
def get_phenotype_metadata(
sparql_conn: SPARQLWrapper, name: str
):