monarch-initiative / monarch-ingest

Data ingest application for Monarch Initiative knowledge graph using Koza
https://monarchinitiative.org
14 stars 1 forks source link

Create Repository For Applying Mappings to KGX Files #227

Open putmantime opened 2 years ago

putmantime commented 2 years ago

This is currently done in cat-merge.

putmantime commented 1 year ago

This potentially could be a feature of KGX tooling or SSOM. Applying SSOM mapping to KGX edge files is not a problem specific to Monarch and an abstracted tool could be a KGX command.

@cmungall @matentzn

matentzn commented 1 year ago

I agree this would be great. People keep asking me how to do "rewiring with SSSOM mappingsets" and I keep telling them to ask Monarch Devs, but the better answer would be kgx rewire --mappings mappings.sssom.tsv --kg kg.kgx.tsv.

kevinschaper commented 6 months ago

I think we could approach this as a Koza operation.

Koza has a solid implementation of sssom rewiring now, so with no changes to Koza, we could write a config yaml and a transform script that just passed an entity through and rewiring would be applied in the koza writer.

We could easily improve Koza for this by adding a pass-through mode that would just send whatever comes out of the reader into the writer, which eliminates the need for a transform.py. I think we could also improve the ability to specify command line args in place of koza config yaml enough that a koza command line alone would be enough to rewire a file.

Koza's limitation of only knowing how to write kgx files might be something we'd also have to solve for this, depending on what else we might want to apply rewiring to.