aboutsummaryrefslogtreecommitdiff
path: root/api/sparql-endpoint.md
blob: e1447a5baef74a4c839b0f9acaef2d897c788d1f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
- list_species() - List available species.

        PREFIX gn: <http://genenetwork.org/id/>
        PREFIX gnc: <http://genenetwork.org/category/>
        PREFIX owl: <http://www.w3.org/2002/07/owl#>
        PREFIX gnt: <http://genenetwork.org/term/>
        PREFIX skos: <http://www.w3.org/2004/02/skos/core#>
        PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
        PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
        PREFIX taxon: <http://purl.uniprot.org/taxonomy/>

        SELECT DISTINCT * WHERE {
            ?s rdf:type gnc:species .
            ?s ?p ?o .
        }


- list_groups("drosophila") - List available groups of datasets

        PREFIX gn: <http://genenetwork.org/id/>
        PREFIX gnc: <http://genenetwork.org/category/>
        PREFIX owl: <http://www.w3.org/2002/07/owl#>
        PREFIX gnt: <http://genenetwork.org/term/>
        PREFIX skos: <http://www.w3.org/2004/02/skos/core#>
        PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
        PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
        PREFIX taxon: <http://purl.uniprot.org/taxonomy/>

        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: <http://www.w3.org/2006/vcard/ns#>
        PREFIX foaf: <http://xmlns.com/foaf/0.1/>
        PREFIX gdmt: <http://vocab.fairdatacollective.org/gdmt/>
        PREFIX skos: <http://www.w3.org/2004/02/skos/core#>
        PREFIX geoSeries: <http://www.ncbi.nlm.nih.gov/geo/query/acc.cgi?acc=>
        PREFIX gnt: <http://genenetwork.org/term/>
        PREFIX gn: <http://genenetwork.org/id/>
        PREFIX gnc: <http://genenetwork.org/category/>
        PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
        PREFIX owl: <http://www.w3.org/2002/07/owl#>
        PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
        PREFIX taxon: <http://purl.uniprot.org/taxonomy/>
        PREFIX dct: <http://purl.org/dc/terms/>
        PREFIX gdmt: <http://vocab.fairdatacollective.org/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: <http://www.w3.org/2006/vcard/ns#>
        PREFIX foaf: <http://xmlns.com/foaf/0.1/>
        PREFIX gdmt: <http://vocab.fairdatacollective.org/gdmt/>
        PREFIX skos: <http://www.w3.org/2004/02/skos/core#>
        PREFIX geoSeries: <http://www.ncbi.nlm.nih.gov/geo/query/acc.cgi?acc=>
        PREFIX gnt: <http://genenetwork.org/term/>
        PREFIX gn: <http://genenetwork.org/id/>
        PREFIX gnc: <http://genenetwork.org/category/>
        PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
        PREFIX owl: <http://www.w3.org/2002/07/owl#>
        PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
        PREFIX taxon: <http://purl.uniprot.org/taxonomy/>
        PREFIX dct: <http://purl.org/dc/terms/>

        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: <http://www.w3.org/2006/vcard/ns#>
        PREFIX foaf: <http://xmlns.com/foaf/0.1/>
        PREFIX gdmt: <http://vocab.fairdatacollective.org/gdmt/>
        PREFIX skos: <http://www.w3.org/2004/02/skos/core#>
        PREFIX geoSeries: <http://www.ncbi.nlm.nih.gov/geo/query/acc.cgi?acc=>
        PREFIX gnt: <http://genenetwork.org/term/>
        PREFIX gn: <http://genenetwork.org/id/>
        PREFIX gnc: <http://genenetwork.org/category/>
        PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
        PREFIX owl: <http://www.w3.org/2002/07/owl#>
        PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
        PREFIX taxon: <http://purl.uniprot.org/taxonomy/>
        PREFIX dct: <http://purl.org/dc/terms/>

        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: <http://purl.org/dc/terms/>
        PREFIX gn: <http://genenetwork.org/id/>
        PREFIX owl: <http://www.w3.org/2002/07/owl#>
        PREFIX gnc: <http://genenetwork.org/category/>
        PREFIX gnt: <http://genenetwork.org/terms/>
        PREFIX skos: <http://www.w3.org/2004/02/skos/core#>
        PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
        PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
        PREFIX xsd: <http://www.w3.org/2001/XMLSchema#>
        PREFIX pubmed: <http://rdf.ncbi.nlm.nih.gov/pubmed/>
        PREFIX fabio: <http://purl.org/spar/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.

lmdb

> - get_geno("BXD") - Get genotypes for a group.

lmdb

> - 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.

NA