Skip to content

Commit

Permalink
Merge pull request #234 from Knowledge-Graph-Hub/issue-233
Browse files Browse the repository at this point in the history
Added NCBITaxon:XX edge to strain
  • Loading branch information
hrshdhgd authored Aug 26, 2024
2 parents 4094a65 + a11eed0 commit 05ee4b3
Showing 1 changed file with 14 additions and 1 deletion.
15 changes: 14 additions & 1 deletion kg_microbe/transform_utils/mediadive/mediadive.py
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,7 @@
NCBI_CATEGORY,
NCBI_TO_MEDIUM_EDGE,
NCBITAXON_ID_COLUMN,
NCBITAXON_PREFIX,
OBJECT_ID_COLUMN,
PUBCHEM_KEY,
PUBCHEM_PREFIX,
Expand Down Expand Up @@ -387,9 +388,21 @@ def run(self, data_file: Union[Optional[Path], Optional[str]] = None, show_statu
medium_id,
IS_GROWN_IN,
strain_id,
]
],
]
)
if strain.get(ID_COLUMN):
medium_strain_edge.extend(
[
[
ncbi_strain_id,
SUBCLASS_PREDICATE,
NCBITAXON_PREFIX+str(strain.get(ID_COLUMN)),
RDFS_SUBCLASS_OF,
strain_id
],
]
)
edge_writer.writerows(medium_strain_edge)

if SOLUTIONS_KEY not in json_obj:
Expand Down

0 comments on commit 05ee4b3

Please sign in to comment.