Fix missing output for nonsense and essential_splice impacts#22
Merged
FerriolCalvet merged 2 commits intodev/package_singlesamplefrom Apr 22, 2024
Merged
Conversation
- happens for nonsense and essential_splice impacts
- fixed bug in subsetting the vectors not working
koszulordie
approved these changes
Apr 22, 2024
Collaborator
koszulordie
left a comment
There was a problem hiding this comment.
It is still a question why the previous implementation failed to provide an output when the lambda (expectation) vectors had zero expectation components. But the proposed solution makes sense in that it should give in theory the same behavior as intended by the original MLE implementation and it seems to be working in practice.
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.
Problem
Missing outputs for nonsense and essential_splice impacts:
Possible reasons
There are 0s in the lambdas vectors and the tensorflow probablity functions don't seem to like it too much.
For missense:
For nonsense:
Explanation
There are only a limited number of changes that can lead to having a nonsense impact (stop codon creation, start codon truncation ... ) and same for the essential_splice variant types.
Then the 0s of the lambdas vector are real 0s, so filling them is not correct, and we would also never expect to see a mutation with that impact in any of the channels in which there is no probability (lambda = 0).
Then what we can do is remove the positions of the vector in which there is a lambda = 0 and also remove those positions from the mutations vector changing the shape from 96 channels to whatever number of channels are left after the filtering.
This is what I implemented. (see file changes in this PR)
After solving it