fix: only relabel whitelisted 5'Flank mutations as "Promoter" with custom filters (#65)#159
Open
officialasishkumar wants to merge 1 commit into
Conversation
…stom filters MutationFilter.acceptMutation() handled the "Promoter" protein-change relabeling inconsistently depending on whether a custom filtered-mutations list was used: - Default filter (no custom list): a 5'Flank mutation is relabeled "Promoter" only when its gene is on the promoter whitelist (currently TERT); for any other gene the mutation is rejected. - Custom filter: every accepted 5'Flank mutation was relabeled "Promoter", regardless of the gene. As a result, the same 5'Flank mutation on a non-whitelisted gene could be labeled "Promoter" or not purely depending on the filter configuration, which misrepresents the mutation (the "Promoter" convention is specific to whitelisted promoter genes such as TERT). Gate the relabeling in the custom-filter branch by the promoter whitelist, so it matches the default-filter branch. The accept/reject behavior of custom filters is unchanged: a 5'Flank type that is not in the custom list is still accepted; it is simply no longer relabeled as a promoter mutation unless the gene is whitelisted. Adds TestMutationFilterPromoter covering both filter modes for whitelisted and non-whitelisted genes. Fixes cBioPortal#65
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.
Summary
MutationFilter.acceptMutation()relabels5'Flankmutations' protein change to"Promoter"inconsistently, depending on whether a custom filtered-mutations list (sequenced_samples/variant_classification_filterin the meta file) is supplied:"Promoter", accepted"Promoter", accepted"Promoter", acceptedSo the exact same
5'Flankmutation on a non-whitelisted gene is labeled"Promoter"or not purely based on the filter configuration. The"Promoter"convention is specific to whitelisted promoter genes (currently only TERT, Entrez7015), so labeling arbitrary genes'5'Flankmutations as promoter mutations misrepresents them. This was reported in #65 as an unintended asymmetry.Changes
src/main/java/org/mskcc/cbio/portal/scripts/MutationFilter.java: in the custom-filter branch, gate the"Promoter"relabeling by the promoter whitelist, exactly as the default-filter branch already does:The accept/reject contract of custom filters is intentionally unchanged: a
5'Flanktype that is not in the custom list is still accepted (a custom list only excludes the types it names); it is simply no longer relabeled"Promoter"unless its gene is whitelisted.Tests
Added
TestMutationFilterPromoter, a focused unit test (the filtering logic is self-contained and does not touch the database) covering both filter modes for whitelisted (TERT) and non-whitelisted genes:The existing
TestMutationFilteronly exercises the default filter path and is unaffected.Fixes #65