On this blog you are able to follow my degree project(master thesis in Bioinformatics) which have the title Pharmaceutical knowledge retrieval through reasoning of ChEMBL RDF.
My supervisor is Egon Willighagen, http://chem-bla-ics.blogspot.com/.

Topics

tisdag 9 februari 2010

Fun stuff with SPARQL

I will give you an example of a SPARQL query. I've been running them on the snorql interface http://rdf.farmbio.uu.se/chembl/snorql/ which is based on ChEMBL02.

Example .
This experiment started out by me wanting to know more about activities. About its standard values and units, types. But then I kept on going looking at molecules connected to a specific activity which led me to collecting their SMILES. Through the connection between activities and resource I managed to get their pubmed id's. Via assay id I managed to get targets and filtered organism to Homo sapiens. Figure 1 displays the result from the example code.
Example code:PREFIX chemblt:
PREFIX hmm:
PREFIX onto:
PREFIX blueobelisk: PREFIX dbpedia:

SELECT DISTINCT ?target ?organism ?activities ?smiles ?type ?unit ?sval ?res ?pubmed
WHERE {
#get activities with its data
?activities a onto:Activity .
?activities onto:standardValue ?sval .
?activities onto:type ?type .

?activities onto:standardUnits ?unit .
#get compounds for those activies
?activities onto:forMolecule ?mol .?mol blueobelisk:smiles ?smiles .


# get resource id and pubmed article
?activities onto:extractedFrom ?res .?res ?pubmed.

#get assay for activity
?activities onto:onAssay ?assay .
?assay onto:hasTarget ?target .
?target onto:hasTargetType chemblt:PROTEIN .?target onto:organism ?organism .

FILTER regex(?organism, "Homo sapiens") .
FILTER regex(?type, "^Kd") .

}LIMIT 5

Figure 1. The results for example 1.

I also began to run queries that are more suitable for my work. Queries that are able to differentiate different kinase protein families (http://www.sarfari.org/kinasesarfari/family). For instance:
Figure 2. An example of targets that belong to the same protein family Tk.

2 kommentarer: