Created
February 15, 2022 17:23
-
-
Save lubianat/0d1afafff6e21e1af01e70b3b08911c1 to your computer and use it in GitHub Desktop.
Wikidata Query for diseases related to beta cells via genes in common
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SELECT | |
?cellTypeLabel ?diseaseLabel | |
(COUNT(DISTINCT ?diseaseGene) AS ?count) | |
(GROUP_CONCAT(DISTINCT ?geneLabel; SEPARATOR=", ") AS ?genes) | |
WHERE | |
{ | |
wd:Q101405087 wdt:P8872 ?diseaseGene . | |
?disease wdt:P2293 ?diseaseGene . | |
wd:Q101405087 rdfs:label ?cellTypeLabel . | |
?disease rdfs:label ?diseaseLabel . | |
?diseaseGene rdfs:label ?geneLabel . | |
FILTER (LANG (?cellTypeLabel) = "en") | |
FILTER (LANG (?diseaseLabel) = "en") | |
FILTER (LANG (?geneLabel) = "en") | |
} | |
GROUP BY | |
?diseaseLabel ?cellTypeLabel | |
ORDER BY | |
DESC(?count) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment