query-31771c4a98ddfc9f6df43a9dcdfd523b
Request all operons and their genes for Listeria monocytogenes EGD-e SELECT ?operon ?operonLabel (if(?label = "Forward Strand"@en, '+', '-') as ?strand) (group_concat(distinct ?locustag; separator=" ") as ?locustagG) WHERE { ?strain wdt:P685 "169963". # NCBI Taxonomy ID for Listeria monocytogenes EGD-e ?operon wdt:P703 ?strain; # get operon that is found in that genome wdt:P2548 ?strand; # get strand orientation wdt:P31 wd:Q139677; #instance of operon wdt:P527 ?gene. # has part gene (gets all genes in operon) ?gene wdt:P2393 ?locustag; # get ncbi locus tag for genes in operon wdt:P351 ?entrez. # get ncbi entrez id for genes in operon SERVICE wikibase:label { bd:serviceParam wikibase:language "en" . } ?strand rdfs:label ?label . filter(lang(?label) = 'en') } GROUP BY ?operonLabel ?strandLabel ?label ?operon ORDER BY ?operonLabel
Use at
- https://query.wikidata.org/sparql
PREFIX wikibase: <http://wikiba.se/ontology#>
PREFIX wdt: <http://www.wikidata.org/prop/direct/>
PREFIX wd: <http://www.wikidata.org/entity/>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX bd: <http://www.bigdata.com/rdf#>
#Request all operons and their genes for Listeria monocytogenes EGD-e
SELECT ?operon ?operonLabel (if(?label = "Forward Strand"@en, '+', '-') as ?strand)
(group_concat(distinct ?locustag; separator=" ") as ?locustagG) WHERE {
?strain wdt:P685 "169963". # NCBI Taxonomy ID for Listeria monocytogenes EGD-e
?operon wdt:P703 ?strain; # get operon that is found in that genome
wdt:P2548 ?strand; # get strand orientation
wdt:P31 wd:Q139677; #instance of operon
wdt:P527 ?gene. # has part gene (gets all genes in operon)
?gene wdt:P2393 ?locustag; # get ncbi locus tag for genes in operon
wdt:P351 ?entrez. # get ncbi entrez id for genes in operon
SERVICE wikibase:label { bd:serviceParam wikibase:language "en" . }
?strand rdfs:label ?label . filter(lang(?label) = 'en')
} GROUP BY ?operonLabel ?strandLabel ?label ?operon
ORDER BY ?operonLabel