Case 1: Protein targets inhibited by donepezil with IC50 <= 10 µM *	PREFIX bao: <http://www.bioassayontology.org/bao#> PREFIX obo: <http://purl.obolibrary.org/obo/> PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> PREFIX sio: <http://semanticscience.org/resource/> PREFIX skos: <http://www.w3.org/2004/02/skos/core#> SELECT DISTINCT ?protein ?title FROM <http://rdf.ncbi.nlm.nih.gov/pubchem/protein> FROM <http://rdf.ncbi.nlm.nih.gov/pubchem/measuregroup> FROM <http://rdf.ncbi.nlm.nih.gov/pubchem/endpoint> FROM <http://rdf.ncbi.nlm.nih.gov/pubchem/substance> WHERE { { ?sub rdf:type obo:CHEBI_53289 ; obo:RO_0000056 ?mg . ?mg obo:RO_0000057 ?protein ; obo:OBI_0000299 ?ep . ?protein rdf:type sio:SIO_010043 ; skos:prefLabel ?title . ?ep rdf:type bao:BAO_0000190 ; obo:IAO_0000136 ?sub ; sio:SIO_000300 ?value } FILTER (?value < 10 ) }
Case 2: Pharmacological roles of SID46505803 defined by CHEBI	PREFIX obov: <http://purl.obolibrary.org/obo/> PREFIX owl: <http://www.w3.org/2002/07/owl#> PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#> PREFIX sio: <http://semanticscience.org/resource/> PREFIX substance: <http://rdf.ncbi.nlm.nih.gov/pubchem/substance/> SELECT DISTINCT ?rolelabel FROM <http://rdf.ncbi.nlm.nih.gov/pubchem/substance> FROM <http://rdf.ncbi.nlm.nih.gov/pubchem/compound> FROM <http://rdf.ncbi.nlm.nih.gov/pubchem/ruleset> WHERE { substance:SID46505803 sio:CHEMINF_000477 ?comp . ?comp rdf:type ?chebi . ?chebi rdfs:subClassOf [ a owl:Restriction ; owl:onProperty obov:RO_0000087 ; owl:someValuesFrom ?role ] . ?role rdfs:label ?rolelabel }
Case 3: NSAID compounds with molecular weight < 200 g/mol *	PREFIX obo: <http://purl.obolibrary.org/obo/> PREFIX owl: <http://www.w3.org/2002/07/owl#> PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#> PREFIX sio: <http://semanticscience.org/resource/> SELECT DISTINCT ?compound FROM <http://rdf.ncbi.nlm.nih.gov/pubchem/compound> FROM <http://rdf.ncbi.nlm.nih.gov/pubchem/descriptor> FROM <http://rdf.ncbi.nlm.nih.gov/pubchem/ruleset> WHERE { { ?compound rdf:type ?chebi . ?chebi rdfs:subClassOf [ a owl:Restriction ; owl:onProperty obo:RO_0000087 ; owl:someValuesFrom obo:CHEBI_35475 ] . ?compound sio:SIO_000008 ?MW . ?MW rdf:type sio:CHEMINF_000334 . ?MW sio:SIO_000300 ?MWValue } FILTER (?MWValue < 200 ) }
Case 4: NSAID substances according to CHEBI	PREFIX concept: <http://rdf.ncbi.nlm.nih.gov/pubchem/concept/> PREFIX dcterms: <http://purl.org/dc/terms/> PREFIX obo: <http://purl.obolibrary.org/obo/> PREFIX owl: <http://www.w3.org/2002/07/owl#> PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#> SELECT DISTINCT ?substance ?source FROM <http://rdf.ncbi.nlm.nih.gov/pubchem/substance> FROM <http://rdf.ncbi.nlm.nih.gov/pubchem/source> FROM <http://rdf.ncbi.nlm.nih.gov/pubchem/ruleset> WHERE { ?substance dcterms:source ?source . ?source dcterms:subject concept:Chemical_Vendors . ?substance rdf:type ?chebi . ?chebi rdfs:subClassOf [ a owl:Restriction ; owl:onProperty obo:RO_0000087 ; owl:someValuesFrom obo:CHEBI_35475 ] }
Case 5: Protein targets inhibited by cholinesterase inhibitors with IC50 <= 10 µM *	PREFIX bao: <http://www.bioassayontology.org/bao#> PREFIX obo: <http://purl.obolibrary.org/obo/> PREFIX owl: <http://www.w3.org/2002/07/owl#> PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#> PREFIX sio: <http://semanticscience.org/resource/> PREFIX skos: <http://www.w3.org/2004/02/skos/core#> SELECT DISTINCT ?title FROM <http://purl.obolibrary.org/obo> FROM <http://rdf.ncbi.nlm.nih.gov/pubchem/substance> FROM <http://rdf.ncbi.nlm.nih.gov/pubchem/measuregroup> FROM <http://rdf.ncbi.nlm.nih.gov/pubchem/endpoint> FROM <http://rdf.ncbi.nlm.nih.gov/pubchem/protein> FROM <http://rdf.ncbi.nlm.nih.gov/pubchem/ruleset> WHERE { { ?chebi rdfs:subClassOf [ a owl:Restriction ; owl:onProperty obo:RO_0000087 ; owl:someValuesFrom obo:CHEBI_37733 ] . ?sub rdf:type ?chebi ; obo:RO_0000056 ?mg . ?mg obo:RO_0000057 ?protein ; obo:OBI_0000299 ?ep . ?protein rdf:type sio:SIO_010043 ; skos:prefLabel ?title . ?ep rdf:type bao:BAO_0000190 ; obo:IAO_0000136 ?sub ; sio:SIO_000300 ?value } FILTER (?value < 10 ) }
Case 6: Substances inhibiting targets like ACCP05979 with function domain PSSMID188648	PREFIX bao: <http://www.bioassayontology.org/bao#> PREFIX conserveddomain: <http://rdf.ncbi.nlm.nih.gov/pubchem/conserveddomain/> PREFIX obo: <http://purl.obolibrary.org/obo/> PREFIX protein: <http://rdf.ncbi.nlm.nih.gov/pubchem/protein/> PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> PREFIX sio: <http://semanticscience.org/resource/> PREFIX vocab: <http://rdf.ncbi.nlm.nih.gov/pubchem/vocabulary#> SELECT DISTINCT ?substance ?protein ?value FROM <http://rdf.ncbi.nlm.nih.gov/pubchem/substance> FROM <http://rdf.ncbi.nlm.nih.gov/pubchem/measuregroup> FROM <http://rdf.ncbi.nlm.nih.gov/pubchem/endpoint> FROM <http://rdf.ncbi.nlm.nih.gov/pubchem/protein> FROM <http://rdf.ncbi.nlm.nih.gov/pubchem/conserveddomain> WHERE { ?substance obo:RO_0000056 ?measuregroup . ?measuregroup obo:RO_0000057 ?protein . protein:ACCP00533 vocab:hasSimilarProtein ?protein . ?protein obo:RO_0002180 conserveddomain:PSSMID395614 . ?measuregroup obo:OBI_0000299 ?endpoint . ?endpoint obo:IAO_0000136 ?substance . ?endpoint rdf:type bao:BAO_0000190 . ?endpoint sio:SIO_000300 ?value }
Case 7: Protein targets inhibited by donepezil hydrochloride with IC50 <= 10 µM	PREFIX bao: <http://www.bioassayontology.org/bao#> PREFIX compound: <http://rdf.ncbi.nlm.nih.gov/pubchem/compound/> PREFIX obo: <http://purl.obolibrary.org/obo/> PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> PREFIX sio: <http://semanticscience.org/resource/> PREFIX skos: <http://www.w3.org/2004/02/skos/core#> SELECT DISTINCT ?sub ?protein ?title FROM <http://rdf.ncbi.nlm.nih.gov/pubchem/protein> FROM <http://rdf.ncbi.nlm.nih.gov/pubchem/measuregroup> FROM <http://rdf.ncbi.nlm.nih.gov/pubchem/endpoint> FROM <http://rdf.ncbi.nlm.nih.gov/pubchem/substance> WHERE { ?sub sio:CHEMINF_000477 compound:CID3152 ; obo:RO_0000056 ?mg . ?mg obo:RO_0000057 ?protein ; obo:OBI_0000299 ?ep . ?protein rdf:type sio:SIO_010043 ; skos:prefLabel ?title . ?ep rdf:type bao:BAO_0000190 ; obo:IAO_0000136 ?sub ; sio:SIO_000300 ?value . FILTER (?value < 10) }
Case 8: Substances inhibiting proteins involved in prostaglandin biosynthesis with IC50 <= 10µM *	PREFIX bao: <http://www.bioassayontology.org/bao#> PREFIX obo: <http://purl.obolibrary.org/obo/> PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> PREFIX sio: <http://semanticscience.org/resource/> PREFIX up: <http://purl.uniprot.org/core/> SELECT DISTINCT ?substance ?protein WHERE { { ?substance obo:RO_0000056 ?measuregroup . ?measuregroup obo:RO_0000057 ?protein . ?protein rdf:type sio:SIO_010043 . ?protein up:encodedBy ?gene . ?gene rdf:type sio:SIO_010035 . ?gene obo:RO_0000056 obo:GO_0001516 . ?measuregroup obo:OBI_0000299 ?endpoint . ?endpoint obo:IAO_0000136 ?substance . ?endpoint rdf:type bao:BAO_0000190 . ?endpoint sio:SIO_000300 ?value } FILTER (?value < 10) }
Case 9: Pharmacological roles for substances inhibiting ACCQ1280 with IC50 <= 10 µM	PREFIX bao: <http://www.bioassayontology.org/bao#> PREFIX obo: <http://purl.obolibrary.org/obo/> PREFIX owl: <http://www.w3.org/2002/07/owl#> PREFIX protein: <http://rdf.ncbi.nlm.nih.gov/pubchem/protein/> PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#> PREFIX sio: <http://semanticscience.org/resource/> SELECT DISTINCT ?rolelabel FROM <http://rdf.ncbi.nlm.nih.gov/pubchem/measuregroup> FROM <http://rdf.ncbi.nlm.nih.gov/pubchem/endpoint> FROM <http://rdf.ncbi.nlm.nih.gov/pubchem/substance> FROM <http://rdf.ncbi.nlm.nih.gov/pubchem/ruleset> FROM <http://purl.obolibrary.org/obo> WHERE { { ?sub obo:RO_0000056 ?mg . ?mg obo:RO_0000057 protein:ACCQ12809 ; obo:OBI_0000299 ?ep . ?sub rdf:type ?chebi . ?chebi rdfs:subClassOf _:I . _:I a owl:Restriction ; owl:onProperty obo:RO_0000087 ; owl:someValuesFrom ?role . ?role rdfs:label ?rolelabel . ?ep obo:IAO_0000136 ?sub ; rdf:type bao:BAO_0000190 ; sio:SIO_000300 ?value } FILTER (?value < 10) }
Case 10: For each protein, the number of substances tested	PREFIX bao: <http://www.bioassayontology.org/bao#> PREFIX obo: <http://purl.obolibrary.org/obo/> PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> PREFIX sio: <http://semanticscience.org/resource/> SELECT (COUNT(?sub) AS ?subcnt) ?protein FROM <http://rdf.ncbi.nlm.nih.gov/pubchem/substance> FROM <http://rdf.ncbi.nlm.nih.gov/pubchem/measuregroup> FROM <http://rdf.ncbi.nlm.nih.gov/pubchem/endpoint> FROM <http://rdf.ncbi.nlm.nih.gov/pubchem/protein> WHERE { ?sub obo:RO_0000056 ?mg . ?mg obo:RO_0000057 ?protein . ?protein rdf:type sio:SIO_010043 . ?mg obo:OBI_0000299 ?ep . ?ep rdf:type bao:BAO_0000190 ; obo:IAO_0000136 ?sub ; sio:SIO_000300 ?value } GROUP BY ?protein ORDER BY ?subcnt
Case 11: Top five diseases commonly mentioned with indomethacin	PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> PREFIX sio: <http://semanticscience.org/resource/> PREFIX skos: <http://www.w3.org/2004/02/skos/core#> PREFIX compound: <http://rdf.ncbi.nlm.nih.gov/pubchem/compound/> SELECT ?disease ?score ?disease_prefLabel FROM <http://rdf.ncbi.nlm.nih.gov/pubchem/cooccurrence> FROM <http://rdf.ncbi.nlm.nih.gov/pubchem/disease> WHERE { ?cooccurrence rdf:subject compound:CID3715 . ?cooccurrence rdf:object ?disease . ?cooccurrence rdf:type sio:SIO_000993 . ?cooccurrence sio:SIO_000300 ?score . ?disease skos:prefLabel ?disease_prefLabel } ORDER BY DESC(?score) LIMIT 5
Case 12: Three most recent references that mention indomethacin and inflammation	PREFIX prism: <http://prismstandard.org/namespaces/basic/3.0/> PREFIX dcterms: <http://purl.org/dc/terms/> PREFIX pcvocab: <http://rdf.ncbi.nlm.nih.gov/pubchem/vocabulary#> PREFIX disease: <http://rdf.ncbi.nlm.nih.gov/pubchem/disease/> PREFIX compound: <http://rdf.ncbi.nlm.nih.gov/pubchem/compound/> SELECT ?ref ?date ?journal ?title FROM <http://rdf.ncbi.nlm.nih.gov/pubchem/reference> WHERE { ?ref pcvocab:discussesAsDerivedByTextMining compound:CID3715 . ?ref pcvocab:discussesAsDerivedByTextMining disease:DZID8173 . ?ref dcterms:date ?date . ?ref dcterms:title ?title . ?ref prism:publicationName ?journal } ORDER BY DESC(?date) LIMIT 3
Case 13: Top 20 genes co-mentioned with indomethacin	PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> PREFIX sio: <http://semanticscience.org/resource/> PREFIX compound: <http://rdf.ncbi.nlm.nih.gov/pubchem/compound/> SELECT ?gene ?geneid ?prefLabel FROM <http://rdf.ncbi.nlm.nih.gov/pubchem/cooccurrence> FROM <http://rdf.ncbi.nlm.nih.gov/pubchem/gene> WHERE { ?cooccurrence rdf:subject compound:CID3715 . ?cooccurrence rdf:object ?gene . ?cooccurrence rdf:type sio:SIO_001257 . ?cooccurrence sio:SIO_000300 ?score . ?geneid <http://www.bioassayontology.org/bao#BAO_0002870> ?gene. ?geneid <http://purl.uniprot.org/core/organism> <http://rdf.ncbi.nlm.nih.gov/pubchem/taxonomy/TAXID9606>. ?geneid <http://www.w3.org/2004/02/skos/core#prefLabel> ?prefLabel } ORDER BY DESC(?score) LIMIT 20
Case 14: Top ten diseases co-occurring with the gene most commonly mentioned with maribavir	PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> PREFIX sio: <http://semanticscience.org/resource/> PREFIX skos: <http://www.w3.org/2004/02/skos/core#> PREFIX compound: <http://rdf.ncbi.nlm.nih.gov/pubchem/compound/> SELECT ?gene ?disease ?disease_prefLabel FROM <http://rdf.ncbi.nlm.nih.gov/pubchem/cooccurrence> FROM <http://rdf.ncbi.nlm.nih.gov/pubchem/disease> FROM <http://rdf.ncbi.nlm.nih.gov/pubchem/cooccurrence> WHERE { { SELECT ?gene WHERE { ?cooccurrence1 rdf:subject compound:CID471161 . ?cooccurrence1 rdf:object ?gene . ?cooccurrence1 rdf:type sio:SIO_001257 . ?cooccurrence1 sio:SIO_000300 ?score1 } ORDER BY DESC(?score1) LIMIT 1 } ?cooccurrence2 rdf:subject ?gene . ?cooccurrence2 rdf:object ?disease . ?cooccurrence2 rdf:type sio:SIO_000983 . ?cooccurrence2 sio:SIO_000300 ?score2 . ?disease skos:prefLabel ?disease_prefLabel } ORDER BY DESC(?score2) LIMIT 10
Case 15: Chemicals commonly mentioned with the fibroblast growth factor receptor 1 gene	PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> PREFIX sio: <http://semanticscience.org/resource/> PREFIX gene: <http://rdf.ncbi.nlm.nih.gov/pubchem/gene/> SELECT ?compound FROM <http://rdf.ncbi.nlm.nih.gov/pubchem/cooccurrence> FROM <http://rdf.ncbi.nlm.nih.gov/pubchem/gene> WHERE { ?cooccurrence rdf:subject ?genesymbol . ?genesymbol rdf:type sio:SIO_001383 ; sio:SIO_000300 "fgfr1" . ?cooccurrence rdf:object ?compound . ?cooccurrence rdf:type sio:SIO_001257 . ?cooccurrence sio:SIO_000300 ?score }
Case 16: Chemicals co-mentioned with KDR, PDGFRB, and FGFR1	PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> PREFIX sio: <http://semanticscience.org/resource/> PREFIX gene: <http://rdf.ncbi.nlm.nih.gov/pubchem/gene/> SELECT ?score1 ?score2 ?score3 ?compound FROM <http://rdf.ncbi.nlm.nih.gov/pubchem/cooccurrence> FROM <http://rdf.ncbi.nlm.nih.gov/pubchem/gene> WHERE { ?cooccurrence1 rdf:subject ?genesymbol1 . ?genesymbol1 rdf:type sio:SIO_001383 ; sio:SIO_000300 "kdr" . ?cooccurrence1 rdf:object ?compound . ?cooccurrence1 rdf:type sio:SIO_001257 . ?cooccurrence1 sio:SIO_000300 ?score1 . ?cooccurrence2 rdf:subject ?genesymbol2 . ?genesymbol2 rdf:type sio:SIO_001383 ; sio:SIO_000300 "pdgfrb" . ?cooccurrence2 rdf:object ?compound . ?cooccurrence2 rdf:type sio:SIO_001257 . ?cooccurrence2 sio:SIO_000300 ?score2 . ?cooccurrence3 rdf:subject ?genesymbol3 . ?genesymbol3 rdf:type sio:SIO_001383 ; sio:SIO_000300 "fgfr1" . ?cooccurrence3 rdf:object ?compound . ?cooccurrence3 rdf:type sio:SIO_001257 . ?cooccurrence3 sio:SIO_000300 ?score3 } ORDER BY DESC(?score1) DESC(?score2) DESC(?score3)
All types, ordered by number of subjects	PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#> SELECT ?type ?type_label ?count WHERE { { SELECT ?type (COUNT(?subject) as ?count) WHERE { ?subject rdf:type ?type } GROUP BY ?type } OPTIONAL { ?type rdfs:label ?type_label } } ORDER BY DESC(?count)
All predicates, ordered by number of subjects	PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#> SELECT ?predicate ?predicate_label ?count WHERE { { SELECT ?predicate (COUNT(?subject) AS ?count) WHERE { ?subject ?predicate [] } GROUP BY ?predicate } OPTIONAL { ?predicate rdfs:label ?predicate_label } } ORDER BY DESC(?count)
All synonym types, ordered by frequency	PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#> PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> PREFIX sio: <http://semanticscience.org/resource/> SELECT ?type ?type_label ?sample_compound ?sample_value ?count_synonyms WHERE { { SELECT ?type (SAMPLE(?compound) AS ?sample_compound) (SAMPLE(?value) AS ?sample_value) (COUNT(?synonym) as ?count_synonyms) WHERE { ?synonym sio:SIO_000011 ?compound . ?synonym rdf:type ?type . ?synonym sio:SIO_000300 ?value } GROUP BY ?type } OPTIONAL { ?type rdfs:label ?type_label } } ORDER BY DESC(?count_synonyms)
Synonyms of compound X, grouped by synonym type	PREFIX compound: <http://rdf.ncbi.nlm.nih.gov/pubchem/compound/> PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#> PREFIX sio: <http://semanticscience.org/resource/> SELECT ?type ?type_label ?value (SAMPLE(?synonym) AS ?sample_synonym) (COUNT(?substance) AS ?count) WHERE { compound:CID3033 ^sio:SIO_000011 ?synonym . ?substance sio:SIO_000008 ?synonym . ?synonym rdf:type ?type . ?type rdfs:label ?type_label . ?synonym sio:SIO_000300 ?value } GROUP BY ?type ?type_label ?value ORDER BY DESC(?count)
Breakdown of #triples by category	PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> PREFIX sio: <http://semanticscience.org/resource/> PREFIX cito: <http://purl.org/spar/cito/> PREFIX dcterms: <http://purl.org/dc/terms/> PREFIX fabio: <http://purl.org/spar/fabio/> PREFIX vocab: <http://rdf.ncbi.nlm.nih.gov/pubchem/vocabulary#> PREFIX obo: <http://purl.obolibrary.org/obo/> SELECT ?category (SUM(?count) as ?numTriples) (100 * SUM(?count) / SAMPLE(?total_count) as ?percent) WHERE { { SELECT ?p (COUNT(?p) AS ?count) WHERE { ?s ?p ?o } GROUP BY ?p } BIND (?p = sio:has-attribute || ?p = sio:has-value || ?p = sio:has-unit || ?p = sio:is-attribute-of || ?p = fabio:hasSubjectTerm || ?p = fabio:hasPrimarySubjectTerm as ?prop) BIND (?p = cito:isDiscussedBy || ?p = dcterms:source || ?p = dcterms:modified || ?p = dcterms:available || ?p = cito:isCitedBy as ?meta) BIND (?p = rdf:type AS ?type) BIND (REGEX(?p, "<http://semanticscience.org/resource/CHEMINF") || ?p = vocab:PubChemAssayOutcome || ?p = obo:RO_0000056 || ?p = obo:IAO_0000136 || ?p = obo:OBI_0000299 as ?truthy) BIND (SUM(?count) as ?total_count) VALUES (?prop ?meta ?type ?truthy ?category) { (0 0 0 0 "other") (1 0 0 0 "reified") (0 1 0 0 "type") (0 0 1 0 "normal") } } GROUP BY ?category
All predicates with their absolute and relative size	SELECT ?p ?count ?percent WHERE { { SELECT ?p (COUNT(?p) AS ?count) WHERE { ?s ?p ?o } GROUP BY ?p } BIND(100 * ?count / SUM(?count) AS ?percent) } ORDER BY DESC(?count)
All graphs and their size	SELECT ?g (COUNT(?g) AS ?count) WHERE { GRAPH ?g { ?s ?p ?o } } GROUP BY ?g ORDER BY DESC(?count)
