Skip to content

Commit

Permalink
updated RTX-KG2 to version 2.10.1pre
Browse files Browse the repository at this point in the history
  • Loading branch information
kaiwenho committed Nov 5, 2024
1 parent 7004e1c commit 4ae60f5
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
(require "../../dbKanren/dbk/database.rkt"
racket/list racket/pretty racket/runtime-path)

(define BASE "../../neo-data/raw_downloads_from_kge_archive_transformed_to_4tsv/rtx-kg2-2.10.0pre/")
(define BASE "../../neo-data/raw_downloads_from_kge_archive_transformed_to_4tsv/rtx-kg2-2.10.1pre/")

(define EDGEPROP_PATH (string-append BASE "rtx_kg2.edgeprop.tsv"))
(define EDGE_PATH (string-append BASE "rtx_kg2.edge.tsv"))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -84,10 +84,14 @@ ex-rows:
(printf "finished processing edges\n")
(printf "the current counters ~s\n\n" counters)]
[else
(let ((subject (hash-ref line 'subject #f))
(object (hash-ref line 'object #f))
(predicate (hash-ref line 'predicate #f))
(robokop-primary_knowledge_source (hash-ref line 'primary_knowledge_source #f)))
(let* ((subject (hash-ref line 'subject #f))
(object (hash-ref line 'object #f))
(predicate (hash-ref line 'predicate #f))
; the following line is for a fix for rtx-kg2 2.10.1pre
(predicate (if (and (string? predicate) (string-contains? predicate "biolink:biolink_"))
(string-replace predicate "biolink:biolink_" "biolink:")
predicate))
(robokop-primary_knowledge_source (hash-ref line 'primary_knowledge_source #f)))
(if (equal? robokop-primary_knowledge_source "infores:text-mining-provider-targeted")
(loop id (read-json edges-in))
(begin
Expand Down Expand Up @@ -117,6 +121,9 @@ ex-rows:
value)))
(unless (or (equal? "" value) (equal? 'null value))
(cond
; the following line is for a fix for rtx-kg2 2.10.1pre
((and (equal? propname 'predicate) (string-contains? value "biolink:biolink_"))
(fprintf edge-props-out "~a\t~a\t~a\n" id propname (string-replace value "biolink:biolink_" "biolink:")))
((equal? propname 'qualified_object_aspect)
(fprintf edge-props-out "~a\tobject_aspect_qualifier\t~a\n" id value))
((equal? propname 'qualified_object_direction)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,12 @@
"transform-edge-jsonl.rkt"
"transform-node-jsonl.rkt")

(define BASE "rtx-kg2-2.10.0pre/")
(define BASE "rtx-kg2-2.10.1pre/")

(transform-generic (string-append "../../neo-data/raw_downloads_from_kge_archive/" BASE)
(string-append "../../neo-data/raw_downloads_from_kge_archive_transformed_to_4tsv/" BASE)
"kg2.10.0pre-nodes.jsonl"
"kg2.10.0pre-edges.jsonl"
"kg2-simplified-2.10.1-nodes.jsonl"
"kg2-simplified-2.10.1-edges.jsonl"
"rtx_kg2"
'rtx-kg2
(cons transform-node-jsonl transform-edge-jsonl))
2 changes: 1 addition & 1 deletion medikanren2/neo/neo-low-level/query-low-level-rtx-kg2.rkt
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
racket/match)

#;(define db-path-under-parent "rtx-kg2-may-9-2024/rtx-kg2-2.9.0pre/rtx-kg2.db")
(define db-path-under-parent "rtx-kg2-Aug-6-2024/rtx-kg2-2.10.0pre/rtx-kg2.db")
(define db-path-under-parent "rtx-kg2-oct-30-2024/rtx-kg2-2.10.1pre/rtx-kg2.db")

(match-define
(list
Expand Down
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.53")
(define NEO_SERVER_VERSION "1.54")

;; Maximum number of results to be returned from *each individual* KP,
;; or from mediKanren itself.
Expand Down

0 comments on commit 4ae60f5

Please sign in to comment.