Skip to content

Commit

Permalink
fix semmed jq string
Browse files Browse the repository at this point in the history
  • Loading branch information
rjawesome committed Aug 28, 2024
1 parent cf91e51 commit ddef235
Showing 1 changed file with 8 additions and 9 deletions.
17 changes: 8 additions & 9 deletions data/jq/wrap/semmed.jq
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ def index_text(main; sub): (main|index(sub)|tostring)+"|"+((main|index(sub)) + (
.["edge-attributes"] = [.predication | group_by(.pmid) | .[] | .[0] |
# create edge attributes for each publication
{
"attribute_source": "infores:text-mining-provider-targeted",
"attribute_type_id": "biolink:has_supporting_study_result",
"attributes": [
{
Expand All @@ -16,15 +15,15 @@ def index_text(main; sub): (main|index(sub)|tostring)+"|"+((main|index(sub)) + (
{
"attribute_type_id": "biolink:publications",
"value": ( "PMID:"+(.pmid|tostring) ),
},
{
"attribute_type_id": "biolink:subject_location_in_text",
"value": ( .subject_text as $text | index_text(.sentence; $text) ),
},
{
"attribute_type_id": "biolink:object_location_in_text",
"value": ( .object_text as $text | index_text(.sentence; $text) ),
}
{
"attribute_type_id": "biolink:subject_location_in_text",
"value": ( .subject_text as $text | index_text(.sentence; $text) ),
},
{
"attribute_type_id": "biolink:object_location_in_text",
"value": ( .object_text as $text | index_text(.sentence; $text) ),
}
],
"value": ( .predication_id | tostring ),
}]

0 comments on commit ddef235

Please sign in to comment.