Skip to content

Commit

Permalink
blocked edges from infores:medrt-umls in the subclass look-up procedure
Browse files Browse the repository at this point in the history
  • Loading branch information
kaiwenho committed May 30, 2024
1 parent 4b47719 commit 68e799e
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 6 deletions.
2 changes: 1 addition & 1 deletion medikanren2/neo/neo-server/neo-server.rkt
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@

(define DEFAULT_PORT 8384)

(define NEO_SERVER_VERSION "1.43")
(define NEO_SERVER_VERSION "1.44")

;; Maximum number of results to be returned from *each individual* KP,
;; or from mediKanren itself.
Expand Down
18 changes: 13 additions & 5 deletions medikanren2/neo/neo-utils/neo-helpers-multi-db.rkt
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,12 @@
(umls-description (assoc "description" node-prop)))
(and umls-description (string-contains? (cadr umls-description) type))))

(define (edge-from-source edge source^)
(let* ((props (cdddr edge))
(source (assoc "primary_knowledge_source" props))
(source (and source (cadr source))))
(and source (equal? source source^))))

(define (get-n-descendent-curies*-in-db curies n)
(list->set
(append curies
Expand All @@ -107,11 +113,13 @@
r
(let* ((children (remove-duplicates
(map car
(query:X->Known-scored
#f
(list "biolink:subclass_of")
c
(list (list 1111) #f (list 1111))))))
(filter
(lambda (e) (not (edge-from-source e "infores:medrt-umls")))
(query:X->Known-scored
#f
(list "biolink:subclass_of")
c
(list (list 1111) #f (list 1111)))))))
(not-classification-type (filter (lambda (c) (not (curie-is-type? c "STY:T185"))) children))
(new-r (remove-duplicates (append r not-classification-type))))
(if (= (length r) (length new-r))
Expand Down

0 comments on commit 68e799e

Please sign in to comment.