Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
saramsey committed Oct 17, 2024
1 parent d8a8b01 commit 77db2e6
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion convert/clinicaltrialskg_tsv_to_kg_jsonl.py
Original file line number Diff line number Diff line change
Expand Up @@ -120,9 +120,15 @@ def make_edges(input_file: str, edges_output, test_mode: bool):
older_adult,
unii] = line

predicate_list = predicate.split(kg2_util.CURIE_PREFIX_BIOLINK +
':')
if len(predicate_list) == 1:
raise ValueError("predicate does not start with biolink "
f"prefix as expected: {predicate}")
predicate_suffix = predicate_list[1]
edge = kg2_util.make_edge_biolink(subject_id,
object_id,
predicate,
predicate_suffix,
CLINICALTRIALSKG_CURIE,
format_date(start_date))
edges_output.write(edge)
Expand Down

0 comments on commit 77db2e6

Please sign in to comment.