Join GitHub today
GitHub is home to over 20 million developers working together to host and review code, manage projects, and build software together.
VariantContext throws exception on getAltAlleleWithHighestAlleleCount() #519
Comments
yfarjoun
added the
secon
label
Jul 2, 2016
kasont
added a commit
to kasont/htsjdk
that referenced
this issue
Jul 7, 2016
|
|
kasont |
3709f86
|
kasont
referenced
this issue
in samtools/htsjdk
Jul 7, 2016
Closed
As per request https://github.com/broadinstitute/picard/issues/519 th… #656
kasont
added a commit
to kasont/htsjdk
that referenced
this issue
Jul 8, 2016
|
|
kasont |
652b20b
|
kasont
added a commit
to kasont/htsjdk
that referenced
this issue
Jul 8, 2016
|
|
kasont |
6029db0
|
kasont
added a commit
to kasont/htsjdk
that referenced
this issue
Jul 8, 2016
|
|
kasont |
43eae90
|
kasont
referenced
this issue
in samtools/htsjdk
Jul 8, 2016
Closed
RE:As per request https://github.com/broadinstitute/picard/issues/519… #657
|
Could you add a test for this to come out null and one to not? @jamesnemesh |
yfarjoun
added a commit
to samtools/htsjdk
that referenced
this issue
Oct 27, 2016
|
|
kasont + yfarjoun |
f148342
|
yfarjoun
referenced
this issue
in samtools/htsjdk
Oct 27, 2016
Merged
Kt varient context change #733
yfarjoun
closed this
in samtools/htsjdk@55c0ca8
Nov 21, 2016
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
jamesnemesh commentedApr 19, 2016
When calling getAltAlleleWithHighestAlleleCount() on a variant that has no variation, class throws exception:
java.util.NoSuchElementException: No value present
at java.util.Optional.get(Optional.java:135)
at htsjdk.variant.variantcontext.VariantContext.getAltAlleleWithHighestAlleleCount(VariantContext.java:1704)
This used to emit a null, which I'd grab and then work around appropriately. I've attached a 1 line VCF (testVCF.vcf) file as an example for replication.
As a further related question - is there a way to recover the alternate allele for this record if I've filtered the record to only look at sample a sample that doesn't have the alternate allele via subContextFromSamples()? The list of the samples I care about for analysis changes the list of alternate alleles for the context, but I actually want all of the original alleles for reporting purposes. See testVCF2.vcf. Is my only recourse to get those alleles before filtering by samples?
testVCFs.zip