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

Freebayes FORMAT=<ID=AO,Number=A attribute throws ArrayIndexOutOfBoundsException #1560

Closed
wants to merge 2 commits into
base: master
from

Conversation

Projects
4 participants
@heuermh
Member

heuermh commented Jun 8, 2017

Number=A genotype attributes should have one fewer value than the number of alleles including the reference allele.

$ freebayes --version
version:  v1.1.0-dirty

$ freebayes -f tiny/q.fa tiny/NA12878.chr22.tiny.bam > NA12878.chr22.tiny.freebayes.vcf

$ less NA12878.chr22.tiny.freebayes.vcf
...
##FORMAT=<ID=AO,Number=A,Type=Integer,Description="Alternate allele observation count">
##FORMAT=<ID=QA,Number=A,Type=Integer,Description="Sum of quality of the alternate observations">
##FORMAT=<ID=MIN_DP,Number=1,Type=Integer,Description="Minimum depth in gVCF output block.">
#CHROM	POS	ID	REF	ALT	QUAL	FILTER	INFO	FORMAT	1
q	186	.	T	C	340.765	.	AB=0.390244;ABP=7.30028;AC=1;AF=0.5;AN=2;AO=16;CIGAR=1X;DP=41;DPB=41;DPRA=0;EPP=3.55317;EPPR=7.26639;GTI=0;LEN=1;MEANALT=1;MQM=60;MQMR=60;NS=1;NUMALT=1;ODDS=78.464;PAIRED=1;PAIREDR=1;PAO=0;PQA=0;PQR=0;PRO=0;QA=588;QR=953;RO=25;RPL=4;RPP=11.6962;RPPR=10.0459;RPR=12;RUN=1;SAF=11;SAP=7.89611;SAR=5;SRF=9;SRP=7.26639;SRR=16;TYPE=snp;technology.ILLUMINA=1	GT:DP:AD:RO:QR:AO:QA:GL	0/1:41:25,16:25:953:16:588:-40.8962,0,-73.7281

$ mvn test
...
- read a vcf file generated by freebayes *** FAILED ***
  org.apache.spark.SparkException: Job aborted due to stage failure: Task 0 in stage 0.0 failed 1 times, most recent failure: Lost task 0.0 in stage 0.0 (TID 0, localhost): java.lang.ArrayIndexOutOfBoundsException: 1
	at org.bdgenomics.adam.converters.VariantContextConverter$$anonfun$org$bdgenomics$adam$converters$VariantContextConverter$$fromArrayExtractor$2.apply(VariantContextConverter.scala:1167)
	at org.bdgenomics.adam.converters.VariantContextConverter$$anonfun$org$bdgenomics$adam$converters$VariantContextConverter$$fromArrayExtractor$2.apply(VariantContextConverter.scala:1167)
	at scala.Option.map(Option.scala:145)
	at org.bdgenomics.adam.converters.VariantContextConverter.org$bdgenomics$adam$converters$VariantContextConverter$$fromArrayExtractor(VariantContextConverter.scala:1167)
	at org.bdgenomics.adam.converters.VariantContextConverter$$anonfun$org$bdgenomics$adam$converters$VariantContextConverter$$lineToGenotypeExtractor$5.apply(VariantContextConverter.scala:1372)
	at org.bdgenomics.adam.converters.VariantContextConverter$$anonfun$org$bdgenomics$adam$converters$VariantContextConverter$$lineToGenotypeExtractor$5.apply(VariantContextConverter.scala:1369)
	at org.bdgenomics.adam.converters.VariantContextConverter$$anonfun$82.apply(VariantContextConverter.scala:1561)
	at org.bdgenomics.adam.converters.VariantContextConverter$$anonfun$82.apply(VariantContextConverter.scala:1561)
	at scala.collection.TraversableLike$$anonfun$flatMap$1.apply(TraversableLike.scala:251)
	at scala.collection.TraversableLike$$anonfun$flatMap$1.apply(TraversableLike.scala:251)
	at scala.collection.mutable.ResizableArray$class.foreach(ResizableArray.scala:59)
	at scala.collection.mutable.ArrayBuffer.foreach(ArrayBuffer.scala:47)
	at scala.collection.TraversableLike$class.flatMap(TraversableLike.scala:251)
	at scala.collection.AbstractTraversable.flatMap(Traversable.scala:105)
	at org.bdgenomics.adam.converters.VariantContextConverter.org$bdgenomics$adam$converters$VariantContextConverter$$convert$2(VariantContextConverter.scala:1561)
	at org.bdgenomics.adam.converters.VariantContextConverter$$anonfun$makeGenotypeFormatFn$1.apply(VariantContextConverter.scala:1579)
	at org.bdgenomics.adam.converters.VariantContextConverter$$anonfun$makeGenotypeFormatFn$1.apply(VariantContextConverter.scala:1579)
	at org.bdgenomics.adam.converters.VariantContextConverter$$anonfun$3.apply(VariantContextConverter.scala:211)
	at org.bdgenomics.adam.converters.VariantContextConverter$$anonfun$3.apply(VariantContextConverter.scala:210)
	at scala.collection.TraversableLike$$anonfun$map$1.apply(TraversableLike.scala:244)
	at scala.collection.TraversableLike$$anonfun$map$1.apply(TraversableLike.scala:244)
	at scala.collection.Iterator$class.foreach(Iterator.scala:727)
	at scala.collection.AbstractIterator.foreach(Iterator.scala:1157)
	at scala.collection.IterableLike$class.foreach(IterableLike.scala:72)
	at scala.collection.AbstractIterable.foreach(Iterable.scala:54)
	at scala.collection.TraversableLike$class.map(TraversableLike.scala:244)
	at scala.collection.AbstractTraversable.map(Traversable.scala:105)
	at org.bdgenomics.adam.converters.VariantContextConverter.convert(VariantContextConverter.scala:210)
@AmplabJenkins

This comment has been minimized.

Show comment
Hide comment
@AmplabJenkins

AmplabJenkins Jun 8, 2017

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

Build result: FAILURE

[...truncated 15 lines...] > /home/jenkins/git2/bin/git fetch --tags --progress https://github.com/bigdatagenomics/adam.git +refs/pull/:refs/remotes/origin/pr/ # timeout=15 > /home/jenkins/git2/bin/git rev-parse origin/pr/1560/merge^{commit} # timeout=10 > /home/jenkins/git2/bin/git branch -a -v --no-abbrev --contains fba6cc9eccba63a6727ac8d5553f0c965d5ab7f3 # timeout=10Checking out Revision fba6cc9eccba63a6727ac8d5553f0c965d5ab7f3 (origin/pr/1560/merge) > /home/jenkins/git2/bin/git config core.sparsecheckout # timeout=10 > /home/jenkins/git2/bin/git checkout -f fba6cc9eccba63a6727ac8d5553f0c965d5ab7f3First time build. Skipping changelog.Triggering ADAM-prb ? 2.3.0,2.10,1.6.1,centosTriggering ADAM-prb ? 2.3.0,2.11,2.0.0,centosTriggering ADAM-prb ? 2.6.0,2.10,2.0.0,centosTriggering ADAM-prb ? 2.6.0,2.11,1.6.1,centosTriggering ADAM-prb ? 2.6.0,2.10,1.6.1,centosTriggering ADAM-prb ? 2.3.0,2.11,1.6.1,centosTriggering ADAM-prb ? 2.6.0,2.11,2.0.0,centosTriggering ADAM-prb ? 2.3.0,2.10,2.0.0,centosADAM-prb ? 2.3.0,2.10,1.6.1,centos completed with result FAILUREADAM-prb ? 2.3.0,2.11,2.0.0,centos completed with result FAILUREADAM-prb ? 2.6.0,2.10,2.0.0,centos completed with result FAILUREADAM-prb ? 2.6.0,2.11,1.6.1,centos completed with result FAILUREADAM-prb ? 2.6.0,2.10,1.6.1,centos completed with result FAILUREADAM-prb ? 2.3.0,2.11,1.6.1,centos completed with result FAILUREADAM-prb ? 2.6.0,2.11,2.0.0,centos completed with result FAILUREADAM-prb ? 2.3.0,2.10,2.0.0,centos completed with result FAILURENotifying endpoint 'HTTP:https://webhooks.gitter.im/e/ac8bb6e9f53357bc8aa8'
Test FAILed.

AmplabJenkins commented Jun 8, 2017

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

Build result: FAILURE

[...truncated 15 lines...] > /home/jenkins/git2/bin/git fetch --tags --progress https://github.com/bigdatagenomics/adam.git +refs/pull/:refs/remotes/origin/pr/ # timeout=15 > /home/jenkins/git2/bin/git rev-parse origin/pr/1560/merge^{commit} # timeout=10 > /home/jenkins/git2/bin/git branch -a -v --no-abbrev --contains fba6cc9eccba63a6727ac8d5553f0c965d5ab7f3 # timeout=10Checking out Revision fba6cc9eccba63a6727ac8d5553f0c965d5ab7f3 (origin/pr/1560/merge) > /home/jenkins/git2/bin/git config core.sparsecheckout # timeout=10 > /home/jenkins/git2/bin/git checkout -f fba6cc9eccba63a6727ac8d5553f0c965d5ab7f3First time build. Skipping changelog.Triggering ADAM-prb ? 2.3.0,2.10,1.6.1,centosTriggering ADAM-prb ? 2.3.0,2.11,2.0.0,centosTriggering ADAM-prb ? 2.6.0,2.10,2.0.0,centosTriggering ADAM-prb ? 2.6.0,2.11,1.6.1,centosTriggering ADAM-prb ? 2.6.0,2.10,1.6.1,centosTriggering ADAM-prb ? 2.3.0,2.11,1.6.1,centosTriggering ADAM-prb ? 2.6.0,2.11,2.0.0,centosTriggering ADAM-prb ? 2.3.0,2.10,2.0.0,centosADAM-prb ? 2.3.0,2.10,1.6.1,centos completed with result FAILUREADAM-prb ? 2.3.0,2.11,2.0.0,centos completed with result FAILUREADAM-prb ? 2.6.0,2.10,2.0.0,centos completed with result FAILUREADAM-prb ? 2.6.0,2.11,1.6.1,centos completed with result FAILUREADAM-prb ? 2.6.0,2.10,1.6.1,centos completed with result FAILUREADAM-prb ? 2.3.0,2.11,1.6.1,centos completed with result FAILUREADAM-prb ? 2.6.0,2.11,2.0.0,centos completed with result FAILUREADAM-prb ? 2.3.0,2.10,2.0.0,centos completed with result FAILURENotifying endpoint 'HTTP:https://webhooks.gitter.im/e/ac8bb6e9f53357bc8aa8'
Test FAILed.

@coveralls

This comment has been minimized.

Show comment
Hide comment
@coveralls

coveralls Jun 8, 2017

Coverage Status

Coverage increased (+0.2%) to 83.297% when pulling 87fd12b on heuermh:freebayes-attributes into ad5ae6d on bigdatagenomics:master.

coveralls commented Jun 8, 2017

Coverage Status

Coverage increased (+0.2%) to 83.297% when pulling 87fd12b on heuermh:freebayes-attributes into ad5ae6d on bigdatagenomics:master.

@AmplabJenkins

This comment has been minimized.

Show comment
Hide comment
@AmplabJenkins

AmplabJenkins Jun 8, 2017

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

AmplabJenkins commented Jun 8, 2017

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

@fnothaft

One small nit, otherwise LGTM!

@@ -224,6 +224,12 @@ class ADAMContextSuite extends ADAMFunSuite {
assert(vcs.rdd.count === 7)
}
sparkTest("read a vcf file generated by freebayes") {

This comment has been minimized.

@fnothaft

fnothaft Jun 8, 2017

Member

Small nit: can we change this from generated by freebayes to with Number=A format fields? I'd like the test to be more clearly linked to the bug rather than the data source.

@fnothaft

fnothaft Jun 8, 2017

Member

Small nit: can we change this from generated by freebayes to with Number=A format fields? I'd like the test to be more clearly linked to the bug rather than the data source.

@heuermh

This comment has been minimized.

Show comment
Hide comment
@heuermh

heuermh Jun 9, 2017

Member

I agree, closing in favor of new issue #1562, will follow up with freebayes-specific issue in Cannoli.

Member

heuermh commented Jun 9, 2017

I agree, closing in favor of new issue #1562, will follow up with freebayes-specific issue in Cannoli.

@heuermh heuermh closed this Jun 9, 2017

@heuermh heuermh added this to the 0.23.0 milestone Dec 7, 2017

@heuermh heuermh added this to Completed in Release 0.23.0 Jan 4, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment