Support mapper update for multi-target score sets#436
Merged
bencap merged 6 commits intorelease-2025.2.0from Jun 11, 2025
Merged
Support mapper update for multi-target score sets#436bencap merged 6 commits intorelease-2025.2.0from
bencap merged 6 commits intorelease-2025.2.0from
Conversation
bencap
reviewed
May 28, 2025
Collaborator
bencap
left a comment
There was a problem hiding this comment.
This all looks good to me. The tests will need to be edited to reflect the new mapping results style, and we should also add more tests for accession based and multi target mappings now that they are supported.
src/mavedb/worker/jobs.py
Outdated
Comment on lines
404
to
405
| # TODO(VariantEffect/dcd-mapping2#3) after adding accession-based score set mapping support: | ||
| # this also assumes that the score set is based on a target sequence, not a target accession |
Collaborator
There was a problem hiding this comment.
This TODO is now addressed by these changes correct?
src/mavedb/worker/jobs.py
Outdated
Comment on lines
+251
to
+255
| ANNOTATION_LAYERS = { | ||
| "g": "genomic", | ||
| "p": "protein", | ||
| "c": "cdna", | ||
| } |
Collaborator
There was a problem hiding this comment.
Could we move this to a new file src/mavedb/lib/mapping.py? Along with this layer dictionary, we can also move the VRSMap class from src/mavedb/data_providers/services.py to that file. That would better centralize these objects for use across the code base.
src/mavedb/worker/jobs.py
Outdated
| pre_mapped_metadata[ANNOTATION_LAYERS[annotation_layer]] = { | ||
| k: layer_premapped[k] | ||
| for k in set(list(layer_premapped.keys())) | ||
| - excluded_pre_mapped_keys # TODO does this work if no 'sequence' key? |
variant_mapper_manager previously failed because of an incorrectly placed 'where' function and because we did two related db queries, one for a score set and one for target gene(s) within that score set, which resulted in an error when adding the score set changes to the db. Instead, query to select the score set, and then loop through the score set's target genes rather than querying the target genes table in the db.
This was
linked to
issues
Jun 5, 2025
bencap
approved these changes
Jun 11, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.