Skip to content

EVA-4150: Finish adding ClinVar Xrefs#506

Merged
apriltuesday merged 15 commits into
EBIvariation:clinvar-xrefsfrom
apriltuesday:mapping-ranking
Jun 2, 2026
Merged

EVA-4150: Finish adding ClinVar Xrefs#506
apriltuesday merged 15 commits into
EBIvariation:clinvar-xrefsfrom
apriltuesday:mapping-ranking

Conversation

@apriltuesday

@apriltuesday apriltuesday commented May 14, 2026

Copy link
Copy Markdown
Contributor

See a small test spreadsheet here

@apriltuesday apriltuesday marked this pull request as ready for review May 14, 2026 12:07
@apriltuesday apriltuesday self-assigned this May 14, 2026
@apriltuesday apriltuesday requested a review from tcezard May 14, 2026 12:07

@tcezard tcezard left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changes looks great but I am a bit confused by the __lt__ and might need a bit of hand hold through it.

Comment thread cmat/trait_mapping/oxo.py Outdated
Comment thread cmat/trait_mapping/zooma.py Outdated
Comment thread cmat/trait_mapping/oxo.py Outdated
# TODO consider flipping the order of the enums or the mappings so they're more consistent
return (other.distance, other.get_mapping_source()) < (self.distance, self.get_mapping_source())
if isinstance(other, OxoMapping):
return super().__lt__(other) and self.distance < other.distance

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do I understand correctly that for two OxoMapping one is better than the other if it has a strictly better source mapping AND the distance is lower ?
What happens when the two are equal?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed this (and the similar issue for ZoomaMapping) and added tests... it's not so important since in practice we only use distance=1, but you're right it wasn't implemented correctly before.

Comment thread bin/trait_mapping/process_traits.py
@apriltuesday

Copy link
Copy Markdown
Contributor Author

The less-than function is definitely not intuitive and I'm not sure it's implemented in the best way, so happy to go through it together. What I did was basically come up with some rankings that made sense to me (see here and also the unit tests), and implement the less-than function to replicate those rankings.

@apriltuesday apriltuesday requested a review from tcezard June 2, 2026 12:15
@apriltuesday apriltuesday merged commit 8333da9 into EBIvariation:clinvar-xrefs Jun 2, 2026
1 check passed
@apriltuesday apriltuesday deleted the mapping-ranking branch June 2, 2026 14:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants