jackrusher / mundaneum

A clojure wrapper around WikiData
BSD Zero Clause License
128 stars 16 forks source link

:genetic-association property not found. #11

Closed zachcp closed 5 years ago

zachcp commented 5 years ago

Hi Jack,

Thanks for adding a bio-focused example to Mundaneum. However, if I pull-and-run, I get an error related to the :genetic-association key which is also not found in the properties json file (see below). Am I doing something wrong or are you using a more complete set of properties?

zach cp


; nothing to see here
(query
  '[:select ?drugLabel ?geneLabel ?diseaseLabel
    :where [[?drug (wdt :physically-interacts-with) ?gene_product]
            [?gene_product (wdt :encoded-by) ?gene]
            [?gene (wdt :genetic-association) ?disease]]
    :limit 10])
=> []

; this works, tho
(query
  '[:select ?drugLabel ?geneLabel
    :where [[?drug (wdt :physically-interacts-with) ?gene_product]
            [?gene_product (wdt :encoded-by) ?gene]]
    :limit 10])

;[{:drugLabel "labetalol", :geneLabel "ADRB1"}
; {:drugLabel "mirabegron", :geneLabel "ADRB1"}
; ...
; {:drugLabel "epinephrine", :geneLabel "ADRB2"}]

; are the properties there?
(property :encoded-by)
=> "P702"
(property :physically-interacts-with)
=> "P129"
(property :genetic-association)
=> nil
jackrusher commented 5 years ago

It turns out the query we were using to fetch properties was not returning a complete set! I have changed out we get properties to a newer, more reliable method and everything now seems to work. Here's the output for the above query:

[{:drugLabel "AIDA",
  :geneLabel "GRM1",
  :diseaseLabel "autosomal recessive spinocerebellar ataxia 13"}
 {:drugLabel "CPCCOEt",
  :geneLabel "GRM1",
  :diseaseLabel "autosomal recessive spinocerebellar ataxia 13"}
 {:drugLabel "AIDA",
  :geneLabel "GRM1",
  :diseaseLabel "spinocerebellar ataxia 44"}
 {:drugLabel "CPCCOEt",
  :geneLabel "GRM1",
  :diseaseLabel "spinocerebellar ataxia 44"}
 {:drugLabel "Hypothetical protein CTL0156",
  :geneLabel "TP53",
  :diseaseLabel "basal-cell carcinoma"}
 {:drugLabel "Hypothetical protein CT_788",
  :geneLabel "TP53",
  :diseaseLabel "basal-cell carcinoma"}
 {:drugLabel "Hypothetical protein CTL0156",
  :geneLabel "TP53",
  :diseaseLabel "head and neck squamous cell carcinoma"}
 {:drugLabel "Hypothetical protein CT_788",
  :geneLabel "TP53",
  :diseaseLabel "head and neck squamous cell carcinoma"}
 {:drugLabel "everolimus",
  :geneLabel "MTOR",
  :diseaseLabel
  "macrocephaly-intellectual disability-neurodevelopmental disorder-small thorax syndrome"}
 {:drugLabel "ridaforolimus",
  :geneLabel "MTOR",
  :diseaseLabel
  "macrocephaly-intellectual disability-neurodevelopmental disorder-small thorax syndrome"}]