RdfRdbMappingExamples
Appearance
Mapping Examples
Find me papers about alzheimer's disease gene association studies looking at polymorphisms in gene products involved in synapse organization and biogenesis (go:GO_0050808 GO schema Neurocommons Demo):
prefix go: <http://purl.org/obo/owl/GO#>
prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#>
prefix owl: <http://www.w3.org/2002/07/owl#>
prefix mesh: <http://purl.org/commons/record/mesh/>
prefix sc: <http://purl.org/science/owl/sciencecommons/>
prefix ro: <http://www.obofoundry.org/ro/ro.owl#>
select distinct ?gene ?genename
where
{ graph <http://purl.org/commons/hcls/goa>
{ ?protein rdfs:subClassOf ?res.
?res owl:onProperty ro:has_function.
?res owl:someValuesFrom ?res2.
?res2 owl:onProperty ro:realized_as.
?res2 owl:someValuesFrom ?process.
# Gene
graph <http://purl.org/commons/hcls/20070416/classrelations>
{{?process <http://purl.org/obo/owl/obo#part_of> go:GO_0050808}
union
{?process rdfs:subClassOf go:GO_0050808 }}
?protein rdfs:subClassOf ?parent.
?parent owl:equivalentClass ?res3.
?res3 owl:hasValue ?gene.
}
graph <http://purl.org/commons/hcls/gene>
{ ?gene rdfs:label ?genename.
?gene sc:from_species_described_by <http://purl.org/commons/record/taxon/9606> }
graph <http://purl.org/commons/hcls/20070416>
{ ?process rdfs:label ?processname}
}
The AlzGene portion of this query translates to:
SELECT g.GeneID, g.LocusID, pa.ProteinAlias, pa.ProteinAlias, ed.EthnicDataID, s.StudyID, s.StudyName, s.PubMedID, e.Ethnicity, r.ResultDesc
FROM "GeneAlias" AS ga
INNER JOIN "Gene" AS g ON ga.GeneID=g.GeneID
INNER JOIN "Protein" AS p ON g.GeneID=p.GeneID
INNER JOIN "ProteinAlias" AS pa ON p.ProteinID=pa.ProteinID
INNER JOIN "EthnicData" AS ed ON g.GeneID=ed.GeneID
INNER JOIN "Study" AS s ON ed.StudyID=s.StudyID
INNER JOIN "Ethnicity" AS e ON ed.EthnicityID=e.EthnicityID
INNER JOIN "Result" AS r ON ed.ResultID=r.ResultID
WHERE ga.GeneAlias='CTSD';