Skip to content

Commit

Permalink
old biolink -> new monarch
Browse files Browse the repository at this point in the history
  • Loading branch information
tokebe committed Feb 1, 2024
1 parent c0039d3 commit a2dea9f
Show file tree
Hide file tree
Showing 3 changed files with 31 additions and 22 deletions.
29 changes: 29 additions & 0 deletions data/jq/pair/monarch.jq
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
generateCurie($edge.input.id; $edge.input.curies) as $input_curie
| .response.items = [
.response.items[]
| select(. != null)
| select(
. as $item
| if $item.direction == "outgoing"
then $item.subject
else $item.object
end
| . as $input_curie
| if $item.direction == "outgoing"
then $item.object_namespace
else $item.subject_namespace
end
| . as $output_namespace
| $input_curie == $input_curie
and $output_namespace == $edge.output.id
)
| .publications = [
if .publications != null
then .publications
else []
end
| .[]
| select(. | startswith("PMID:"))
]
]
| { $input_curie: [.response] }
18 changes: 0 additions & 18 deletions data/jq/wrap/biolink.jq

This file was deleted.

6 changes: 2 additions & 4 deletions src/index.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import BiolinkTransformer from "./transformers/biolink_transformer";
import BioThingsTransformer from "./transformers/biothings_transformer";
// import CordTransformer from "./transformers/cord_transformer";
import CTDTransformer from "./transformers/ctd_transformer";
Expand Down Expand Up @@ -46,9 +45,8 @@ export default class Transformer {
this.tf = new TRAPITransformer(this.data, this.config);
} else if (api.startsWith("SEMMED")) {
this.tf = new SemmedTransformer(this.data, this.config);
} else if (api === "BioLink API") {
// this.tf = new BiolinkTransformer(this.data, this.config);
this.tf = new JQTransformer(this.data, { ...this.config, type: "biolink" });
} else if (api === "Monarch API") {
this.tf = new JQTransformer(this.data, { ...this.config, type: "monarch" });
} else if (api === "EBI Proteins API") {
// this.tf = new EBIProteinTransformer(this.data, this.config)
this.tf = new JQTransformer(this.data, { ...this.config, type: "ebi" });
Expand Down

0 comments on commit a2dea9f

Please sign in to comment.