Skip to content
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

Closed
wants to merge 1 commit into from

Conversation

NeillGibson
Copy link
Contributor

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.

@AmplabJenkins
Copy link

Can one of the admins verify this patch?

@heuermh
Copy link
Member

heuermh commented Dec 29, 2015

Jenkins, test this please.

@AmplabJenkins
Copy link

Test FAILed.
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/ADAM-prb/1036/

Build result: FAILURE

GitHub 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.

@NeillGibson
Copy link
Contributor Author

Jenkins, test this please.

@heuermh
Copy link
Member

heuermh commented Jan 5, 2016

Jenkins, retest this please.

@AmplabJenkins
Copy link

Test PASSed.
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/ADAM-prb/1039/
Test PASSed.

@fnothaft fnothaft added this to the 0.19.0 milestone Jan 7, 2016

// 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 ")
Copy link
Member

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"

Copy link
Contributor Author

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.

@NeillGibson
Copy link
Contributor Author

I've squashed the commits in to a single commit.

@fnothaft
Copy link
Member

fnothaft commented Feb 3, 2016

Thanks @NeillGibson! Committed as 30f937f.

@fnothaft fnothaft closed this Feb 3, 2016
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.

4 participants