Example SPARQL queries for RegenBase
We have developed SPARQL queries to show the kinds of questions SCI researchers can ask using RegenBase. Click on a question to see it as a SPARQL query! Try them out for yourself at the RegenBase SPARQL endpoint .
QUESTIONS 1-3: ABOUT SMALL MOLECULES THAT IMPROVE FUNCTION AFTER INJURY AND THEIR EFFECTS ON KINASE ACTIVITY
QUESTIONS 4-6: ABOUT GENES WITH CHANGES IN mRNA EXPRESSION AFTER NERVE INJURY
QUESTIONS 4-6: ABOUT GENES WITH CHANGES IN mRNA EXPRESSION AFTER NERVE INJURY
QUESTION 1 - What are the kinase targets of perturbagens that have been observed to increase BBB/BMS score and inhibit kinase activity with either a % inhibition of at least 50% at a perturbagen concentration of 0.1 μM or a pKd of at least 7?
PREFIX bao: <https://www.bioassayontology.org/bao#>
PREFIX bibtex: <https://purl.org/net/nknouf/ns/bibtex#>
PREFIX hyque: <https://semanticscience.org/ontology/hyque.owl#>
PREFIX regenbase: <https://regenbase.org/ontology#>
PREFIX sio: <https://semanticscience.org/resource/>
PREFIX uo: <https://purl.org/obo/owl/UO#>
# return distinct compound and protein identifier pairs
SELECT DISTINCT ?pubchem_id ?uniprot_id
WHERE {
# retrieve event, agent, target and effect
?event hyque:HYPOTHESIS_0000015 ?agent .
?event bibtex:hasKey ?article .
?agent sio:SIO_000671 ?identifier .
?event hyque:HYPOTHESIS_0000016 ?target .
# filter agent to be a small molecule
?agent rdf:type regenbase:RB_0000125 .
?agent ?effect ?target .
?effect rdfs:label ?effect_label .
# filter effect to be only “increase”
FILTER(?effect_label = "increase")
# filter target to be a BBB or BMS score
{ ?target rdf:type regenbase:RB_0008017 }
UNION { ?target rdf:type regenbase:RB_0008018 }
UNION { ?target rdf:type regenbase:RB_0008019 }
UNION { ?target rdf:type regenbase:RB_0008020 }.
BIND(IRI(?identifier) AS ?pubchem_id)
{
# filter assay to be a kinase activity assay
?assay rdf:type bao:BAO_0002005 .
?compound bao:BAO_0000383 ?pubchem_id .
?assay bao:BAO_0000185 ?compound .
?assay bao:BAO_0000209 ?measuregroup .
?measuregroup bao:BAO_0000208 ?endpoint .
# filter endpoint to be a ‘percent response’
?endpoint rdf:type bao:BAO_0001103 .
?endpoint bao:BAO_0000195 ?value .
?endpoint bao:BAO_0000338 ?conc .
?conc bao:BAO_0000183 ?conc_unit .
# filter concentration unit to be micromolar
?conc_unit rdf:type uo:UO_0000064 .
?conc bao:BAO_0002666 ?conc_value .
# filter concentration value to be 0.1 micromolar
FILTER (?conc_value = 0.1) .
# filter endpoint value to be at or above threshold of 50
FILTER(?value >= 50).
# retrieve assay target
?measuregroup bao:BAO_0000211 ?kinase_target .
?kinase_target bao:BAO_0000383 ?uniprot_id .
} UNION {
# filter assay to be a ‘selectivity assay’
?assay rdf:type bao:BAO_0000478 .
?compound bao:BAO_0000383 ?pubchem_id .
?assay bao:BAO_0000185 ?compound .
?assay bao:BAO_0000209 ?measuregroup .
?measuregroup bao:BAO_0000208 ?endpoint .
# filter endpoint to be a ‘binding constant’
?endpoint rdf:type bao:BAO_0000587 .
?endpoint bao:BAO_0095007 ?value .
# filter endpoint value to be at or above threshold of 7
FILTER(?value >=7)
# retrieve assay target
?measuregroup bao:BAO_0000211 ?kinase_target .
?kinase_target bao:BAO_0000383 ?uniprot_id .
} UNION {
# filter assay to be a ‘selectivity assay’
?assay rdf:type bao:BAO_0000478 .
?compound bao:BAO_0000383 ?pubchem_id .
?assay bao:BAO_0000185 ?compound .
?assay bao:BAO_0000209 ?measuregroup .
?measuregroup bao:BAO_0000208 ?endpoint .
# filter endpoint to be a ‘computational endpoint’
?endpoint rdf:type bao:BAO_0002137 .
?endpoint bao:BAO_0095000 ?endpoint2 .
?endpoint2 rdf:type bao:BAO_0002137 .
?endpoint bao:BAO_0095007 ?value .
# filter endpoint value to be at or above threshold of 7
FILTER(?value >=7)
# retrieve assay target
?measuregroup bao:BAO_0000211 ?kinase_target .
?kinase_target bao:BAO_0000383 ?uniprot_id .
}
} ORDER BY ?pubchem_id ?uniprot_id
See results for QUESTION 1 here.
QUESTION 2 - What perturbagens have been observed to improve behavioral outcomes following injury?
PREFIX hyque: <https://semanticscience.org/ontology/hyque.owl#>
PREFIX regenbase: <https://regenbase.org/ontology#>
PREFIX sio: <https://semanticscience.org/resource/>
# return distinct agent PubChem compound identifiers
SELECT DISTINCT ?pubchem_id
WHERE {
# retrieve agent, target, and effect
?event hyque:HYPOTHESIS_0000015 ?agent .
?agent sio:SIO_000671 ?pubchem_id .
?event hyque:HYPOTHESIS_0000016 ?target .
# filter agent to be a small molecule
?agent rdf:type regenbase:RB_0000125 .
?agent ?effect ?target .
?effect rdfs:label ?effect_label .
# filter effect to be ‘increase’
FILTER(?effect_label = "increase") .
# filter target to be an outcome measure or any subclass
?target rdf:type/rdfs:subClassOf* regenbase:RB_0008016 .
}
QUESTION 3 - What perturbagens have been observed to improve BBB or BMS score following injury and also to increase neurite outgrowth? How many assay results report the neurite outgrowth effect? How many articles report the BBB/BMS score effect?
PREFIX bao: <https://www.bioassayontology.org/bao#>
PREFIX bibtex: <https://purl.org/net/nknouf/ns/bibtex#>
PREFIX hyque: <https://semanticscience.org/ontology/hyque.owl#>
PREFIX regenbase: <https://regenbase.org/ontology#>
PREFIX sio: <https://semanticscience.org/resource/>
SELECT DISTINCT ?pubchem_id COUNT(DISTINCT ?assay) AS ?num_assays COUNT(DISTINCT ?article) AS ?num_articles
WHERE {
?event hyque:HYPOTHESIS_0000015 ?agent .
?event bibtex:hasKey ?article .
?agent sio:SIO_000671 ?identifier .
?event hyque:HYPOTHESIS_0000016 ?target .
?agent rdf:type regenbase:RB_0000125 .
?agent ?effect ?target .
?effect rdfs:label ?effect_label .
FILTER(?effect_label = "increase")
{ ?target rdf:type regenbase:RB_0008017 }
UNION { ?target rdf:type regenbase:RB_0008018 }
UNION { ?target rdf:type regenbase:RB_0008019 }
UNION { ?target rdf:type regenbase:RB_0008020 }.
BIND(IRI(?identifier) AS ?pubchem_id).
?compound bao:BAO_0000383 ?pubchem_id .
?assay bao:BAO_0000185 ?compound .
?assay rdf:type bao:BAO_0002803.
?assay bao:BAO_0000208 ?endpoint .
?endpoint bao:BAO_0000195 ?value .
FILTER(?value >= 120)
}
See results for QUESTION 3 here.
QUESTIONS ABOUT GENES THAT ARE DIFFERENTIALLY EXPRESSED AFTER INJURY
QUESTION 4 - What genes that are significantly differentially expressed in DRGs after a peripheral nerve injury have a protein product with an RNA-recognition motif?
PREFIX bao: <https://www.bioassayontology.org/bao#>
PREFIX regenbase: <https://regenbase.org/ontology#>
SELECT DISTINCT STR(?label) AS ?geneSymbol xsd:float(?foldchange_value) AS ?foldChange xsd:float(?pval) AS ?pVal xsd:float(?time_point) AS ?timePoint STR(?time_unit_label) AS ?timeUnit
WHERE {
# assay is of type gene expression
?assay rdf:type bao:BAO_0002785 .
# get measure group for assay
?assay bao:BAO_0000209 ?mg .
# get endpoint for measure group
?mg bao:BAO_0000208 ?endpoint .
# endpoint is a gene expression endpoint
?endpoint rdf:type bao:BAO_0002138 .
# fold change endpoint is derived from gene expression endpoint
?fc_endpoint bao:BAO_0095000 ?endpoint .
?fc_endpoint rdf:type bao:BAO_0000193 .
#get time point of fold change measurement
?fc_endpoint bao:BAO_0002669 ?time_point .
?fc_endpoint bao:BAO_0002668 ?time_unit .
?time_unit rdfs:label ?time_unit_label .
# fold change value is above some threshold
?fc_endpoint bao:BAO_0000108 ?foldchange_value .
FILTER(?foldchange_value < 0 || ?foldchange_value > 1)
# get p-value endpoint linked to measuregroup
?mg bao:BAO_0000208 ?pval_endpoint .
# pval endpoint is a pval endpoint
?pval_endpoint rdf:type bao:BAO_0002126 .
?pval_endpoint bao:BAO_0095007 ?pval .
FILTER(?pval <= 0.05)
# get gene linked to measure group
?mg bao:BAO_0000211 ?gene .
?gene rdfs:label ?gene_label .
BIND(STR(?gene_label) AS ?label).
# get protein product of gene
?gene regenbase:has_protein_id ?protein .
# restrict proteins to those with an RNA recognition motif
?protein regenbase:has_protein_domain <https://identifiers.org/interpro/IPR000504>.
} ORDER BY ?geneSymbol ?timePoint
See results for QUESTION 4 here.
QUESTION 5 - Existing data suggests that a mouse gene, CALM2, is differentially expressed following nerve injury. Does this gene have any rat gene orthologues that are significantly differentially expressed in DRG neurons after a peripheral nerve injury?
PREFIX bao: <https://www.bioassayontology.org/bao#>
PREFIX regenbase: <https://regenbase.org/ontology#>
PREFIX homologene_vocab: <https://bio2rdf.org/homologene_vocabulary:>
PREFIX bio2rdf_vocab: <https://bio2rdf.org/bio2rdf_vocabulary:>
SELECT STR(?regenbase_gene_label) AS ?geneSymbol ?identifier xsd:float(?foldchange_value) AS ?foldChange xsd:float(?pval) AS ?pVal ?homologeneGroup
WHERE {
?assay rdf:type bao:BAO_0002785 .
# get measure group for assay
?assay bao:BAO_0000209 ?mg .
# get endpoint for measure group
?mg bao:BAO_0000208 ?endpoint .
# endpoint is a gene expression endpoint
?endpoint rdf:type bao:BAO_0002138 .
# fold change endpoint is derived from gene expression endpoint
?fc_endpoint bao:BAO_0095000 ?endpoint .
?fc_endpoint rdf:type bao:BAO_0000193 .
# fold change value is above some threshold
?fc_endpoint bao:BAO_0000108 ?foldchange_value .
FILTER(?foldchange_value > 1 || ?foldchange_value < 0) .
# get p-value endpoint linked to measuregroup
?mg bao:BAO_0000208 ?pval_endpoint .
# pval endpoint is a pval endpoint
?pval_endpoint rdf:type bao:BAO_0002126 .
?pval_endpoint bao:BAO_0095007 ?pval .
FILTER(?pval <= 0.05)
# get gene linked to measure group
?mg bao:BAO_0000211 ?regenbase_gene .
?regenbase_gene rdfs:label ?regenbase_gene_label .
?regenbase_gene bao:BAO_0000383 ?identifier .
?homologeneGroup a homologene_vocab:Homologene-Group .
?homologeneGroup homologene_vocab:gene ?homologene_gene .
?homologeneGroup homologene_vocab:gene <https://bio2rdf.org/ncbigene:12314> .
?homologene_gene a homologene_vocab:Gene .
?homologene_gene rdfs:label ?homologene_gene_label .
?homologene_gene homologene_vocab:x-refseq ?homologene_refseq .
?homologene_refseq bio2rdf_vocab:x-identifiers.org ?identifier .
}
See results for QUESTION 5 here.
QUESTION 6 - What genes are differentially regulated at the early time points after nerve injury, but then return to their normal homeostatic levels (or even go the opposite direction) later?
This question can be broken down into two SPARQL queries to find genes that are overexpressed (Query 6a) soon after injury and later return to a homeostatic level, and genes that are underexpressed (Query 6b) and later return to a homeostatic level.
Query 6a:
PREFIX bao: <https://www.bioassayontology.org/bao#>
PREFIX regenbase: <https://regenbase.org/ontology#>
PREFIX uo: <https://purl.org/obo/owl/UO#>
SELECT DISTINCT STRBEFORE(?injuryTypeLabel," #") as ?injuryType STR(?label) AS ?geneSymbol xsd:float(?foldChange) AS ?foldChange xsd:float(?pval) AS ?pval1 xsd:float(?time_point2) AS ?timePoint2 STR(?time_unit2_label) AS ?timeUnit2 xsd:float(?foldChange2) AS ?foldChange2 xsd:float(?pval2) AS ?pval2
WHERE {
# assay is of type gene expression
?assay rdf:type bao:BAO_0002785 .
# get measure group for assay
?assay bao:BAO_0000209 ?mg .
?injuryType a regenbase:RB_0000183 .
?injuryType bao:BAO_0000209?mg .
?injuryType rdfs:label ?injuryTypeLabel .
# get endpoint for measure group
?mg bao:BAO_0000208 ?endpoint .
?mg bao:BAO_0000208 ?pval_endpoint .
# endpoint is a gene expression endpoint
?endpoint rdf:type bao:BAO_0002138 .
# pval endpoint is a pval endpoint
?pval_endpoint rdf:type bao:BAO_0002126 .
?pval_endpoint bao:BAO_0095007 ?pval .
FILTER(?pval <= 0.05)
# fold change endpoint is derived from gene expression endpoint
?fc_endpoint bao:BAO_0095000 ?endpoint .
?fc_endpoint rdf:type bao:BAO_0000193 .
#restrict first timepoint to 24 hours
?fc_endpoint bao:BAO_0002669 "24.0"^^xsd:float .
?fc_endpoint bao:BAO_0002668 ?time_unit .
?time_unit rdf:type uo:UO_0000032 .
# fold change value is above some threshold
# get gene linked to measure group
?mg bao:BAO_0000211 ?gene .
?mg2 bao:BAO_0000211 ?gene .
# get second measure group for measurement at a later timepoint
?mg2 bao:BAO_0000208 ?endpoint2 .
?mg2 bao:BAO_0000208 ?pval_endpoint2.
# pval endpoint is a pval endpoint
?pval_endpoint2 rdf:type bao:BAO_0002126 .
# endpoint is a gene expression endpoint
?endpoint2 rdf:type bao:BAO_0002138 .
# fold change endpoint is derived from gene expression endpoint
?fc_endpoint2 bao:BAO_0095000 ?endpoint2 .
?fc_endpoint2 rdf:type bao:BAO_0000193 .
#get time point of fold change measurement
{
?pval_endpoint2 bao:BAO_0095007 ?pval2 .
?fc_endpoint bao:BAO_0000108 ?foldchange_value .
FILTER(?foldchange_value > 1).
?fc_endpoint2 bao:BAO_0000108 ?foldchange_value2 .
FILTER(?foldchange_value2 < ?foldchange_value) .
FILTER(?pval2 <= 0.05)
} UNION {
?fc_endpoint bao:BAO_0000108 ?foldchange_value .
?pval_endpoint2 bao:BAO_0095007 ?pval2 .
FILTER(?foldchange_value > 1).
?fc_endpoint2 bao:BAO_0000108 ?foldchange_value2 .
FILTER(?foldchange_value2 < 0) .
}
BIND(STR(?foldchange_value) AS ?foldChange) .
?fc_endpoint2 bao:BAO_0002669 ?time_point2 .
?fc_endpoint2 bao:BAO_0002668 ?time_unit2 .
?time_unit2 rdf:type ?time_unit2_type .
FILTER(?time_point2 > "24.0"^^xsd:float && ?time_unit2_type = uo:UO_0000032 || ?time_point2 = "7.0"^^xsd:float && ?time_unit2_type = uo:UO_0000033) .
?time_unit2 rdfs:label ?time_unit2_label .
BIND(STR(?foldchange_value2) AS ?foldChange2) .
?gene rdfs:label ?gene_label .
BIND(STR(?gene_label) AS ?label).
}
Query 6b:
PREFIX bao: <https://www.bioassayontology.org/bao#>
PREFIX regenbase: <https://regenbase.org/ontology#>
PREFIX uo: <https://purl.org/obo/owl/UO#>
SELECT DISTINCT STRBEFORE(?injuryTypeLabel," #") as ?injuryType STR(?label) AS ?geneSymbol xsd:float(?foldChange) AS ?foldChange xsd:float(?pval) AS ?pval1 xsd:float(?time_point2) AS ?timePoint2 STR(?time_unit2_label) AS ?timeUnit2 xsd:float(?foldChange2) AS ?foldChange2 xsd:float(?pval2) AS ?pval2
WHERE {
# assay is of type gene expression
?assay rdf:type bao:BAO_0002785 .
# get measure group for assay
?assay bao:BAO_0000209 ?mg .
?injuryType a regenbase:RB_0000183 .
?injuryType bao:BAO_0000209?mg .
?injuryType rdfs:label ?injuryTypeLabel .
# get endpoint for measure group
?mg bao:BAO_0000208 ?endpoint .
?mg bao:BAO_0000208 ?pval_endpoint .
# endpoint is a gene expression endpoint
?endpoint rdf:type bao:BAO_0002138 .
# pval endpoint is a pval endpoint
?pval_endpoint rdf:type bao:BAO_0002126 .
?pval_endpoint bao:BAO_0095007 ?pval .
FILTER(?pval <= 0.05)
# fold change endpoint is derived from gene expression endpoint
?fc_endpoint bao:BAO_0095000 ?endpoint .
?fc_endpoint rdf:type bao:BAO_0000193 .
#restrict first timepoint to 24 hours
?fc_endpoint bao:BAO_0002669 "24.0"^^xsd:float .
?fc_endpoint bao:BAO_0002668 ?time_unit .
?time_unit rdf:type uo:UO_0000032 .
# fold change value is above some threshold
# get gene linked to measure group
?mg bao:BAO_0000211 ?gene .
?mg2 bao:BAO_0000211 ?gene .
# get second measure group for measurement at a later timepoint
?mg2 bao:BAO_0000208 ?endpoint2 .
?mg2 bao:BAO_0000208 ?pval_endpoint2.
# pval endpoint is a pval endpoint
?pval_endpoint2 rdf:type bao:BAO_0002126 .
# endpoint is a gene expression endpoint
?endpoint2 rdf:type bao:BAO_0002138 .
# fold change endpoint is derived from gene expression endpoint
?fc_endpoint2 bao:BAO_0095000 ?endpoint2 .
?fc_endpoint2 rdf:type bao:BAO_0000193 .
#get time point of fold change measurement
{
?pval_endpoint2 bao:BAO_0095007 ?pval2 .
?fc_endpoint bao:BAO_0000108 ?foldchange_value .
FILTER(?foldchange_value < -1).
?fc_endpoint2 bao:BAO_0000108 ?foldchange_value2 .
FILTER(?foldchange_value2 < ?foldchange_value) .
FILTER(?pval2 <= 0.05)
} UNION {
?fc_endpoint bao:BAO_0000108 ?foldchange_value .
?pval_endpoint2 bao:BAO_0095007 ?pval2 .
FILTER(?foldchange_value < -1).
?fc_endpoint2 bao:BAO_0000108 ?foldchange_value2 .
FILTER(?foldchange_value2 > 0) .
}
BIND(STR(?foldchange_value) AS ?foldChange) .
?fc_endpoint2 bao:BAO_0002669 ?time_point2 .
?fc_endpoint2 bao:BAO_0002668 ?time_unit2 .
?time_unit2 rdf:type ?time_unit2_type .
FILTER(?time_point2 > "24.0"^^xsd:float && ?time_unit2_type = uo:UO_0000032 || ?time_point2 = "7.0"^^xsd:float && ?time_unit2_type = uo:UO_0000033) .
?time_unit2 rdfs:label ?time_unit2_label .
BIND(STR(?foldchange_value2) AS ?foldChange2) .
?gene rdfs:label ?gene_label .
BIND(STR(?gene_label) AS ?label).
}