From e88e1caf807cab091ef3482bbfe8a6e7349f455c Mon Sep 17 00:00:00 2001
From: Pjotr Prins
Date: Sun, 20 Aug 2023 10:00:46 +0200
Subject: Add SPARQL instructions by Bonz
---
api/sparql-endpoint.md | 139 +++++++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 139 insertions(+)
create mode 100644 api/sparql-endpoint.md
(limited to 'api')
diff --git a/api/sparql-endpoint.md b/api/sparql-endpoint.md
new file mode 100644
index 0000000..fd3df3b
--- /dev/null
+++ b/api/sparql-endpoint.md
@@ -0,0 +1,139 @@
+- list_species() - List available species.
+
+ PREFIX gn:
+ PREFIX gnc:
+ PREFIX owl:
+ PREFIX gnt:
+ PREFIX skos:
+ PREFIX rdf:
+ PREFIX rdfs:
+ PREFIX taxon:
+
+ SELECT DISTINCT * WHERE {
+ ?s rdf:type gnc:species .
+ ?s ?p ?o .
+ }
+
+
+- list_groups("drosophila") - List available groups of datasets
+
+ PREFIX gn:
+ PREFIX gnc:
+ PREFIX owl:
+ PREFIX gnt:
+ PREFIX skos:
+ PREFIX rdf:
+ PREFIX rdfs:
+ PREFIX taxon:
+
+ SELECT ?inbredSet WHERE {
+ ?species rdf:type gnc:species .
+ ?species skos:altLabel "drosophila" .
+ ?inbredSet rdf:type gnc:inbredSet .
+ ?inbredSet gnt:belongsToSpecies ?species .
+ }
+
+
+- list_datasets("BXD") - List available datasets for a given group (here, "BXD").
+
+ PREFIX v:
+ PREFIX foaf:
+ PREFIX gdmt:
+ PREFIX skos:
+ PREFIX geoSeries:
+ PREFIX gnt:
+ PREFIX gn:
+ PREFIX gnc:
+ PREFIX rdf:
+ PREFIX owl:
+ PREFIX rdfs:
+ PREFIX taxon:
+ PREFIX dct:
+ PREFIX gdmt:
+
+ SELECT DISTINCT ?datasetName WHERE {
+ ?dataset rdf:type/rdfs:subClassOf gnc:dataset .
+ ?dataset rdfs:label ?datasetName .
+ ?dataset gnt:belongsToInbredSet ?inbredSet .
+ ?inbredSet skos:altLabel "BXD" .
+ }
+
+- info_dataset("CB_M_1004_P") - Get meta information about a data set.
+
+ PREFIX v:
+ PREFIX foaf:
+ PREFIX gdmt:
+ PREFIX skos:
+ PREFIX geoSeries:
+ PREFIX gnt:
+ PREFIX gn:
+ PREFIX gnc:
+ PREFIX rdf:
+ PREFIX owl:
+ PREFIX rdfs:
+ PREFIX taxon:
+ PREFIX dct:
+
+ SELECT DISTINCT * WHERE {
+ ?s rdfs:label "CB_M_1004_P" .
+ ?s ?p ?o .
+ }
+
+
+- info_datasets("B6D2F2") - Get meta information about all data sets for a group.
+
+ PREFIX v:
+ PREFIX foaf:
+ PREFIX gdmt:
+ PREFIX skos:
+ PREFIX geoSeries:
+ PREFIX gnt:
+ PREFIX gn:
+ PREFIX gnc:
+ PREFIX rdf:
+ PREFIX owl:
+ PREFIX rdfs:
+ PREFIX taxon:
+ PREFIX dct:
+
+ SELECT DISTINCT * WHERE {
+ ?s rdf:type/rdfs:subClassOf gnc:dataset .
+ ?s gnt:belongsToInbredSet ?inbredSet .
+ ?inbredSet skos:altLabel "B6D2F2" .
+ ?s ?p ?o .
+ }
+
+- info_pheno("BXD", "10038") - Get summary information for a phenotype
+
+ PREFIX dct:
+ PREFIX gn:
+ PREFIX owl:
+ PREFIX gnc:
+ PREFIX gnt:
+ PREFIX skos:
+ PREFIX rdf:
+ PREFIX rdfs:
+ PREFIX xsd:
+ PREFIX pubmed:
+ PREFIX fabio:
+
+ SELECT DISTINCT * WHERE {
+ ?s rdf:type gnc:phenotype .
+ ?inbredSet skos:altLabel "BXD" .
+ ?s gnt:belongsToInbredSet ?inbredSet.
+ ?s gnt:traitName "10001" .
+ ?s ?p ?o .
+ OPTIONAL {
+ ?pub fabio:hasPubMedId ?pmid .
+ ?s dct:isReferencedBy ?pmid .
+ ?pub ?pubTerms ?pubResult .
+ }
+ }
+
+> - get_pheno("BXD", "10646") - Get phenotype values for a classical trait.
+
+> - get_geno("BXD") - Get genotypes for a group.
+
+> - run_gemma("BXDPublish", "10015") - Perform a genome scan with gemma
+> - run_rqtl("BXDPublish", "10015") - Perform a genome scan with R/qtl
+> - run_correlation("HC_M2_0606_P", "BXDPublish", "1427571_at") - Finds traits that are correlated with a given trait.
--
cgit v1.2.3