Run SPARQL at Virtuoso Endpoint
Go to Chem2Bio2RDF SPARQL cases.

For Drug/Chemical

  • find drug targets
comments:
SPARQL:
PREFIX c2b2r: <http://chem2bio2rdf.org/chem2bio2rdf.owl#>
PREFIX bp: <http://www.biopax.org/release/biopax-level3.owl#>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
 
select distinct ?target
from <http://chem2bio2rdf.org/owl#>
where
{
?chemical rdfs:label ?drugName ;
          c2b2r:hasInteraction ?interaction .
?interaction c2b2r:hasTarget [bp:name ?target];
             c2b2r:drugTarget true .
 
FILTER (str(?drugName)="Troglitazone")
}

result:
  • find chemical associated genes/proteins along with their interaction types
comments:
SPARQL:
PREFIX c2b2r: <http://chem2bio2rdf.org/chem2bio2rdf.owl#>
PREFIX bp: <http://www.biopax.org/release/biopax-level3.owl#>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
 
select distinct ?target ?target_name ?interactionType
from <http://chem2bio2rdf.org/owl#>
where
{
?chemical rdfs:label "Troglitazone"^^xsd:string;
          c2b2r:hasInteraction ?interaction .
?interaction c2b2r:hasTarget [bp:name ?target_name;rdfs:label ?target] ;
             rdf:type ?interactionType .
?interactionType rdfs:subClassOf c2b2r:ChemicalGeneInteraction .
 
#uncomment next line to specify the interaction (e.g., Binding, Activation, Expression, Reaction, etc.)
#FILTER (?interactionType=c2b2r:Binding) .
}

  • find target PPARG inhibitors and remove compounds with weight >500d

comments:
SPARQL:
PREFIX c2b2r: <http://chem2bio2rdf.org/chem2bio2rdf.owl#>
PREFIX bp: <http://www.biopax.org/release/biopax-level3.owl#>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
 
select distinct  ?structureData ?weight
from <http://chem2bio2rdf.org/owl#>
where
{
?target rdfs:label "PPARG"^^xsd:string;
        c2b2r:hasInteraction ?interaction .
?interaction rdf:type c2b2r:Inhibition ;
             c2b2r:hasCompound ?chemical  .
?chemical c2b2r:hasPhysicalProperty [c2b2r:molecularWeight ?weight] ;
          bp:structure [bp:structureFormat "openeye_can_smiles"^^xsd:string;bp:structureData ?structureData] .
 
FILTER(?weight<500) .
}
  • find chemicals that are likely to cause disease (toxicity)
comment: it's assumed the neighbors of chemical are likely to cause the same disease.
SPARQL:
PREFIX c2b2r: <http://chem2bio2rdf.org/chem2bio2rdf.owl#>
PREFIX bp: <http://www.biopax.org/release/biopax-level3.owl#>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
 
select distinct ?chemical
from <http://chem2bio2rdf.org/owl#>
where
{
{?chemical c2b2r:causeDisease [bp:name "oral submucous fibrosis"^^xsd:string ] . }
union
{?chemical1 c2b2r:causeDisease [bp:name "oral submucous fibrosis"^^xsd:string ] ;c2b2r:hasNeighbor ?chemical . }
}
  • which pathways will be affected by the chemical (e.g., Troglitazone)? give the pathway data sources?
comment:
SPARQL:
PREFIX c2b2r: <http://chem2bio2rdf.org/chem2bio2rdf.owl#>
PREFIX bp: <http://www.biopax.org/release/biopax-level3.owl#>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
 
select distinct ?pathwayName ?datasource
from <http://chem2bio2rdf.org/owl#>
where
{
?chemical rdfs:label "Troglitazone"^^xsd:string;
          c2b2r:hasInteraction ?interaction .
?interaction c2b2r:hasTarget ?target ;
             c2b2r:biologicalInterest true .
?pathway c2b2r:isPathwayOf ?target ;
         bp:name ?pathwayName ;
         bp:xref [c2b2r:identifierType ?datasource] .
}
  • What assays test the activity of troglitazone against PPARG ? preferably give the literature.
PREFIX c2b2r: <http://chem2bio2rdf.org/chem2bio2rdf.owl#>
PREFIX bp: <http://www.biopax.org/release/biopax-level3.owl#>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
 
select ?bioAssayDescription  ?measurement ?relation ?value ?unit ?title
from <http://chem2bio2rdf.org/owl#>
where
{
?chemical rdfs:label "Troglitazone"^^xsd:string;
          c2b2r:hasInteraction ?interaction .
?interaction c2b2r:hasBioAssay ?bioAssay .
?bioAssay c2b2r:description ?bioAssayDescription ;
          c2b2r:hasOutcome [c2b2r:measurement ?measurement;
                            c2b2r:relation ?relation;
                            c2b2r:value ?value;
                            c2b2r:unit ?unit
                           ] .
 
optional {?bioAssay c2b2r:hasReference [c2b2r:title ?title]}
}
  • what's the neighbor of troglitazone? (structural similar)
PREFIX c2b2r: <http://chem2bio2rdf.org/chem2bio2rdf.owl#>
PREFIX bp: <http://www.biopax.org/release/biopax-level3.owl#>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
 
select *
from <http://chem2bio2rdf.org/owl_lite#>
where
{
?chemical rdfs:label "Troglitazone"^^xsd:string ;
          c2b2r:hasNeighbor [rdfs:label ?compound]
}

  • what are the side effects of troglitazone?
PREFIX c2b2r: <http://chem2bio2rdf.org/chem2bio2rdf.owl#>
PREFIX bp: <http://www.biopax.org/release/biopax-level3.owl#>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
 
select *
from <http://chem2bio2rdf.org/owl#>
where
{
?chemical rdfs:label "Troglitazone"^^xsd:string ;
          c2b2r:causeSideEffect [bp:name ?side_effect] .
}

  • what are the diseases treated by troglitazone?
PREFIX c2b2r: <http://chem2bio2rdf.org/chem2bio2rdf.owl#>
PREFIX bp: <http://www.biopax.org/release/biopax-level3.owl#>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
 
select *
from <http://chem2bio2rdf.org/owl#>
where
{
?chemical rdfs:label "Troglitazone"^^xsd:string ;
          c2b2r:treatDisease [bp:name ?disease] .
}

  • what drugs are able to interact with troglitazone? what are their effects?
PREFIX c2b2r: <http://chem2bio2rdf.org/chem2bio2rdf.owl#>
PREFIX bp: <http://www.biopax.org/release/biopax-level3.owl#>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
 
select *
from <http://chem2bio2rdf.org/owl#>
where
{
?chemical rdfs:label "Troglitazone"^^xsd:string ;
          c2b2r:hasDrugDrugInteraction [c2b2r:hasPart [bp:name ?name];
                                        c2b2r:description ?description] .
FILTER (str(?name)!="Troglitazone") .
}
  • what can we learn from troglitazone?
comment: This sparql will give all the info related to trogalitazone, you have to modify it to get your desired information.
PREFIX c2b2r: <http://chem2bio2rdf.org/chem2bio2rdf.owl#>
PREFIX bp: <http://www.biopax.org/release/biopax-level3.owl#>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
 
select *
from <http://chem2bio2rdf.org/owl#>
where
{
?chemical rdfs:label ?drugName .
?chemical ?p ?s . #include all predicates
optional {?chemical bp:structure [bp:structureFormat ?structureFormat; bp:structureData ?structureData]} .
optional {?chemical c2b2r:hasPhysicalProperty [?propertyName ?property] } .
 
FILTER (str(?drugName)="Troglitazone")
}

For Protein/Gene/Target

  • what proteins are able to interact with protein PPARG in vivo?
PREFIX c2b2r: <http://chem2bio2rdf.org/chem2bio2rdf.owl#>
PREFIX bp: <http://www.biopax.org/release/biopax-level3.owl#>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
 
select ?protein
from <http://chem2bio2rdf.org/owl#>
where
{
?target rdfs:label "PPARG"^^xsd:string ;
          c2b2r:hasProteinProteinInteraction [c2b2r:hasPart [rdfs:label ?protein];
                                              c2b2r:experimentType "in vivo"^^xsd:string] .
 FILTER (str(?protein)!="PPARG")
}

  • what diseases are caused by PPARG ?
PREFIX c2b2r: <http://chem2bio2rdf.org/chem2bio2rdf.owl#>
PREFIX bp: <http://www.biopax.org/release/biopax-level3.owl#>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
 
select ?disease
from <http://chem2bio2rdf.org/owl#>
where
{
?target rdfs:label "PPARG"^^xsd:string ;
          c2b2r:causeDisease [bp:name ?disease]
}

  • what pathways include PPARG? from what database?
PREFIX c2b2r: <http://chem2bio2rdf.org/chem2bio2rdf.owl#>
PREFIX bp: <http://www.biopax.org/release/biopax-level3.owl#>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
 
select *
from <http://chem2bio2rdf.org/owl#>
where
{
?target rdfs:label "PPARG"^^xsd:string ;
          c2b2r:hasPathway [bp:name ?pathway;
                            bp:xref [c2b2r:identifierType ?database]]
}

  • What are the go terms for PPARG?
PREFIX c2b2r: <http://chem2bio2rdf.org/chem2bio2rdf.owl#>
PREFIX bp: <http://www.biopax.org/release/biopax-level3.owl#>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
 
select ?GO
from <http://chem2bio2rdf.org/owl#>
where
{
?target rdfs:label "PPARG"^^xsd:string ;
          c2b2r:gOID ?GO
}

  • Where are PPARG expressed?
PREFIX c2b2r: <http://chem2bio2rdf.org/chem2bio2rdf.owl#>
PREFIX bp: <http://www.biopax.org/release/biopax-level3.owl#>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
 
select ?tissue
from <http://chem2bio2rdf.org/owl#>
where
{
?target rdfs:label "PPARG"^^xsd:string ;
          c2b2r:tissue ?tissue
}

  • What's the gene family of PPARG?
PREFIX c2b2r: <http://chem2bio2rdf.org/chem2bio2rdf.owl#>
PREFIX bp: <http://www.biopax.org/release/biopax-level3.owl#>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
 
select ?geneFamily
from <http://chem2bio2rdf.org/owl#>
where
{
?target rdfs:label "PPARG"^^xsd:string ;
          c2b2r:geneFamily ?geneFamily
}

For Disease/SideEffect

  • What drugs are used to treat diabetes but withdrawn from market?
PREFIX c2b2r: <http://chem2bio2rdf.org/chem2bio2rdf.owl#>
PREFIX bp: <http://www.biopax.org/release/biopax-level3.owl#>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
 
select distinct ?drug
from <http://chem2bio2rdf.org/owl#>
where
{
?disease bp:name ?disease_name ;
         c2b2r:treatedBy [c2b2r:group "withdrawn"^^xsd:string; bp:name ?drug].
FILTER regex(?disease_name,"diabetes","i") .
}

  • What diseases are heart disease?
PREFIX c2b2r: <http://chem2bio2rdf.org/chem2bio2rdf.owl#>
PREFIX bp: <http://www.biopax.org/release/biopax-level3.owl#>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
 
select ?name
from <http://chem2bio2rdf.org/owl#>
where
{
?childDisease bp:name ?name .
?childDisease c2b2r:iSA ?disease .
?disease bp:name "heart disease"^^xsd:string .
}
  • Side effect related targets
comments: First, search for drugs causing side effect (e.g., heart failure), then retrieve targets associated with these drugs. The targets shared by higher number of drugs are likely the side effect related targets.
PREFIX c2b2r: <http://chem2bio2rdf.org/chem2bio2rdf.owl#>
PREFIX bp: <http://www.biopax.org/release/biopax-level3.owl#>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
 
select ?target (count(?target) as ?count)
from <http://chem2bio2rdf.org/owl#>
where
{
?sideEffect bp:name "heart failure"^^xsd:string ;
            c2b2r:causedByDrug ?drug .
?drug c2b2r:hasInteraction ?interaction .
?interaction    c2b2r:biologicalInterest true ;
                c2b2r:hasTarget [rdfs:label ?target] ;
                rdf:type [rdfs:subClassOf c2b2r:ChemicalGeneInteraction ] .
} group by ?target order by desc(?count)
 

For more complex queries


  • find disease associated chemicals
  • what can we lean about target: NR1I2 from Chem2Bio2RDF
  • Give the literatures talking about pathway (eg.Calcium signaling pathway) and side effect (eg: cancer)
  • Linking KEGG / Reactome Pathways and PubChem to identify potential multiple pathway inhibitors for MAPK
  • find KEGG pathways containing at least two of the targets associated with a given side effect (i.e. hepatomegaly)
  • Find gene expression tissue.
  • Find gene associated disease
  • how we synchronize the two or many different experiment results containing quantitative values in a same target.
  • find all the common/unique genes or protein or drugs between/among two or many nodes.
  • find structural commonalities between diabetes related drugs