From ac2c02defbd2b936b4061f619427cb1d05581f69 Mon Sep 17 00:00:00 2001 From: Munyoki Kilyungi Date: Wed, 5 Apr 2023 23:54:05 +0300 Subject: Add more sparql examples Signed-off-by: Munyoki Kilyungi --- topics/RDF/generif-sparql-queries.gmi | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/topics/RDF/generif-sparql-queries.gmi b/topics/RDF/generif-sparql-queries.gmi index ca1d7aa..2892619 100644 --- a/topics/RDF/generif-sparql-queries.gmi +++ b/topics/RDF/generif-sparql-queries.gmi @@ -1,7 +1,12 @@ # Querying GeneRIF using SPARQL +=> https://sparql.genenetwork.org/sparql?default-graph-uri=http%3A%2F%2Fgenenetwork.org&qtxt=PREFIX%20gn%3A%20%3Chttp%3A%2F%2Fgenenetwork.org%2F%3E%0APREFIX%20dct%3A%20%3Chttp%3A%2F%2Fpurl.org%2Fdc%2Fterms%2F%3E%0APREFIX%20generif%3A%20%3Chttps%3A%2F%2Fwww.ncbi.nlm.nih.gov%2Fgene%3FDb%3Dgene%26Cmd%3DDetailsSearch%26Term%3D%3E%0A%0ASELECT%20%3Fsymbol%20%3FspeciesBinomialName%20%3FgnEntry%20%3FcreatedOn%20(GROUP_CONCAT(%3Fpmid%3B%20SEPARATOR%3D%22%5Cn%22)%20AS%20%3FPubMedId)%20%20WHERE%20%7B%0A%20%20%3Fgenerif%20gn%3Asymbol%20%3Fsymbol%20.%0A%20%20%3Fgenerif%20gn%3AgeneWikiEntryOfNCBI%20%5B%20gn%3AgeneWikiEntry%20%3FgnEntry%20%3B%20dct%3Acreated%20%3FcreatedOn%3B%20dct%3Asource%20%3Fpmid%5D%20.%0A%20%20OPTIONAL%20%7B%0A%20%20%20%20%3Fgenerif%20gn%3AwikiEntryOfSpecies%20%3FspeciesName%20.%0A%20%20%20%20%3Fspecies%20gn%3Aname%20%3FspeciesName%20%3B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20gn%3AbinomialName%20%3FspeciesBinomialName%20.%20%20%20%20%0A%20%20%7D%20.%0A%20%20FILTER(%20lcase(%3Fsymbol)%20%3D%20%22a2m%22%20)%0A%7D%20GROUP%20BY%20%3FcreatedOn%20%3FgnEntry%20%3Fgenerif%20%3Fsymbol%20%3FspeciesBinomialName%20ORDER%20BY%20ASC(%3FcreatedOn)&format=text%2Fhtml&timeout=0&signal_void=on Get all NCBI GeneWiki metadata for a particular symbol E.g. "A2m" + +=> https://sparql.genenetwork.org/sparql?default-graph-uri=http%3A%2F%2Fgenenetwork.org&qtxt=PREFIX%20gn%3A%20%3Chttp%3A%2F%2Fgenenetwork.org%2F%3E%0APREFIX%20dct%3A%20%3Chttp%3A%2F%2Fpurl.org%2Fdc%2Fterms%2F%3E%0APREFIX%20generif%3A%20%3Chttps%3A%2F%2Fwww.ncbi.nlm.nih.gov%2Fgene%3FDb%3Dgene%26Cmd%3DDetailsSearch%26Term%3D%3E%0A%0ASELECT%20%3Fsymbol%20%3FgnEntry%20%3FcreatedOn%20(GROUP_CONCAT(%3Fpmid%3B%20SEPARATOR%3D%22%5Cn%22)%20AS%20%3FPubMedId)%20%3Fweburl%20WHERE%20%7B%0A%20%20%3Fgenerif%20gn%3Asymbol%20%3Fsymbol%20.%0A%20%20%3Fgenerif%20gn%3AgeneWikiEntryOfGn%20_%3AgnEntry%20.%0A%20%20_%3AgnEntry%20gn%3AgeneWikiEntry%20%3FgnEntry%3B%0A%20%20%20%20%20%20%20%20%20%20%20%20dct%3Acreated%20%3FcreatedOn%20.%0A%20%20OPTIONAL%20%7B%20_%3AgnEntry%20foaf%3Ahomepage%20%3Fweburl%20%7D%20.%0A%20%20OPTIONAL%20%7B%20_%3AgnEntry%20dct%3Asource%20%3Fpmid%7D%20.%0A%20%20OPTIONAL%20%7B%0A%20%20%20%20%3Fgenerif%20gn%3AwikiEntryOfSpecies%20%3FspeciesName%20.%0A%20%20%20%20%3Fspecies%20gn%3Aname%20%3FspeciesName%20%3B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20gn%3AbinomialName%20%3FspeciesBinomialName%20.%20%20%20%20%0A%20%20%7D%20.%0A%20%20FILTER(%20lcase(%3Fsymbol)%20%3D%20%22epha2%22%20)%0A%7D%20GROUP%20BY%20%3FcreatedOn%20%3FgnEntry%20%3Fgenerif%20%3Fsymbol%20%3Fweburl%20ORDER%20BY%20ASC(%3FcreatedOn)&format=text%2Fhtml&timeout=0&signal_void=on Get all GN GeneWiki metadata for a particular symbol E.g. "Epha2" + +=> https://sparql.genenetwork.org/sparql?default-graph-uri=http%3A%2F%2Fgenenetwork.org&qtxt=PREFIX%20gn%3A%20%3Chttp%3A%2F%2Fgenenetwork.org%2F%3E%0APREFIX%20dct%3A%20%3Chttp%3A%2F%2Fpurl.org%2Fdc%2Fterms%2F%3E%0APREFIX%20generif%3A%20%3Chttps%3A%2F%2Fwww.ncbi.nlm.nih.gov%2Fgene%3FDb%3Dgene%26Cmd%3DDetailsSearch%26Term%3D%3E%0A%0ASELECT%20DISTINCT%20%3Fsubject%20%3Fpredicate%20%3Frelation%20%3Fdescription%20WHERE%20%7B%0A%20%20%3Fsubject%20%3Fpredicate%20%3Fsymbol%20.%0A%20%20%3Fpredicate%20%3Frelation%20%3Fdescription%20.%0A%20%20FILTER(%20lcase(str(%3Fsymbol))%20%3D%20%22a2m%22)%0A%7D&format=text%2Fhtml&timeout=0&signal_void=on Finding out relationships of a symbol E.g. "a2m" + -=> https://sparql.genenetwork.org/sparql?default-graph-uri=http%3A%2F%2Fgenenetwork.org&qtxt=PREFIX%20gn%3A%20%3Chttp%3A%2F%2Fgenenetwork.org%2F%3E%0APREFIX%20dct%3A%20%3Chttp%3A%2F%2Fpurl.org%2Fdc%2Fterms%2F%3E%0A%0ASELECT%20%3Fgenerif%20%3FgnEntry%20%3FcreatedOn%20%3Fpmid%20WHERE%20%7B%0A%3Fgenerif%20gn%3Asymbol%20%3Fsymbol%20.%0A%3Fgenerif%20gn%3AWikiEntryOfNCBI%20%5B%20gn%3AgeneWikiEntry%20%3FgnEntry%20%3B%20dct%3Acreated%20%3FcreatedOn%3B%20dct%3Asource%20%3Fpmid%5D%20.%0AFILTER(%20lcase(%3Fsymbol)%20%3D%20%22shh%22)%0A%7D%20ORDER%20BY%20ASC(%3FcreatedOn)&format=text%2Fhtml&timeout=0&signal_void=on Get all GN entered GeneWiki metadata for a particular symbol E.g. Shh. -- cgit v1.2.3