mr-martian / rebabel-format

Python library for interacting with reBabel data files
MIT License
1 stars 4 forks source link

ID mapping on import #8

Closed mr-martian closed 1 month ago

mr-martian commented 2 months ago

If we have two datasets we want to merge them, it would be nice if we could specify, say, a TSV file of IDs with the result that if an Reader was going to create a new unit with the value in column 2, but there exists exactly one unit with the value in column 1, then the other features should just be added to that unit instead of creating a new one.

This could also be used on the IDs that the Reader uses internally, if we're consistent enough with those and document them properly.

mr-martian commented 1 month ago

Another common case: The imported items would have the same IDs (such as meta:index) and we just need to match them up. Note that in this case the IDs would be hierarchical.