-
Notifications
You must be signed in to change notification settings - Fork 308
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Rewrote the getType method to handle all ploidy levels #904
Conversation
Can one of the admins verify this patch? |
Jenkins, test this please. |
Test FAILed. Build result: FAILUREGitHub pull request #904 of commit 46803be automatically merged.Notifying endpoint 'HTTP:https://webhooks.gitter.im/e/ac8bb6e9f53357bc8aa8'[EnvInject] - Loading node environment variables.Building remotely on amp-jenkins-worker-05 (centos spark-test) in workspace /home/jenkins/workspace/ADAM-prb > git rev-parse --is-inside-work-tree # timeout=10Fetching changes from the remote Git repository > git config remote.origin.url https://github.com/bigdatagenomics/adam.git # timeout=10Fetching upstream changes from https://github.com/bigdatagenomics/adam.git > git --version # timeout=10 > git fetch --tags --progress https://github.com/bigdatagenomics/adam.git +refs/pull/:refs/remotes/origin/pr/ > git rev-parse origin/pr/904/merge^{commit} # timeout=10 > git branch -a --contains 0ce87c3 # timeout=10 > git rev-parse remotes/origin/pr/904/merge^{commit} # timeout=10Checking out Revision 0ce87c3 (origin/pr/904/merge) > git config core.sparsecheckout # timeout=10 > git checkout -f 0ce87c3b0d1617248afeb08b889585a0997f5a63First time build. Skipping changelog.Triggering ADAM-prb ? 2.6.0,2.11,1.4.1,centosTriggering ADAM-prb ? 2.6.0,2.10,1.4.1,centosTouchstone configurations resulted in FAILURE, so aborting...Notifying endpoint 'HTTP:https://webhooks.gitter.im/e/ac8bb6e9f53357bc8aa8'Test FAILed. |
Jenkins, test this please. |
Jenkins, retest this please. |
Test PASSed. |
|
||
// only the four above alleles are possible | ||
// https://github.com/bigdatagenomics/bdg-formats/blob/master/src/main/resources/avro/bdg.avdl#L464 | ||
case _ => throw new Exception("This should be impossible. Found single distinct allele other than the four possible alleles: Ref, Alt, NoCall and OtherAlt ") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
use IllegalStateException instead?
Then the message could just be "Found single distinct allele other than the four possible alleles: Ref, Alt, NoCall and OtherAlt"
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes thank you for the advice. I'll update this exception in a new commit accordingly.
I've squashed the commits in to a single commit. |
Thanks @NeillGibson! Committed as 30f937f. |
Hi,
I rewrote the getType method to handle all ploidy levels.
This is inspired by getType / determineType method in HTS-JDK genotype:
https://github.com/samtools/htsjdk/blob/bd92747fd3672635de96473fea6d4b38e8635c8e/src/java/htsjdk/variant/variantcontext/Genotype.java#L197
I am not sure if the code runs trough the tests, I have some difficulty setting up all code dependencies locally in my IDE (IntelliJ) to run the tests. If the code fails tests please see this as the pseudo code of the method.
One open issue for this code is still which genotypeType to return for genotypes that consist of multiple OtherAlt alleles. #897
Currently the method in this pull request returns NoCall for a genotype consisting of just OtherAlt alleles. This is also what the current method does.