ASEReadCounter java.lang.ArrayIndexOutOfBoundsException: 0
When I ran AsereadCounter, BAM generated from RNA-seq and VCF generated from RNA-seq, but the error occurred.
java.lang.ArrayIndexOutOfBoundsException: 0
Then I ran validateSamFile and vlidateViants and found an error in my BAM file.But after I fixed BAM, the bug was still there.
Below is my error message, can you tell me what to do?
My gatk version is 4.1.8.0
[zhaol@node01 test_ANEVA_ASE]$ gatk ASEReadCounter -I 579.fix.bam -V /data2/zhaol/vcf_rna-seq/CM/output_579.vcf.gz
Using GATK jar /home/zhaol/biosoft/gatk-4.1.8.0/gatk-package-4.1.8.0-local.jar
Running:
java -Dsamjdk.use_async_io_read_samtools=false -Dsamjdk.use_async_io_write_samtools=true -Dsamjdk.use_async_io_write_tribble=false -Dsamjdk.compression_level=2 -jar /home/zhaol/biosoft/gatk-4.1.8.0/gatk-package-4.1.8.0-local.jar ASEReadCounter -I 579.fix.bam -V /data2/zhaol/vcf_rna-seq/CM/output_579.vcf.gz
02:18:55.295 INFO NativeLibraryLoader - Loading libgkl_compression.so from jar:file:/home/zhaol/biosoft/gatk-4.1.8.0/gatk-package-4.1.8.0-local.jar!/com/intel/gkl/native/libgkl_compression.so
Jan 08, 2021 2:19:05 AM shaded.cloud_nio.com.google.auth.oauth2.ComputeEngineCredentials runningOnComputeEngine
INFO: Failed to detect whether we are running on Google Compute Engine.
02:19:05.592 INFO ASEReadCounter - ------------------------------------------------------------
02:19:05.592 INFO ASEReadCounter - The Genome Analysis Toolkit (GATK) v4.1.8.0
02:19:05.592 INFO ASEReadCounter - For support and documentation go to https://software.broadinstitute.org/gatk/
02:19:10.601 INFO ASEReadCounter - Executing as zhaol@node01 on Linux v3.10.0-693.5.2.el7.x86_64 amd64
02:19:10.601 INFO ASEReadCounter - Java runtime: OpenJDK 64-Bit Server VM v1.8.0_151-b12
02:19:10.602 INFO ASEReadCounter - Start Date/Time: January 8, 2021 2:18:55 AM EST
02:19:10.602 INFO ASEReadCounter - ------------------------------------------------------------
02:19:10.602 INFO ASEReadCounter - ------------------------------------------------------------
02:19:10.603 INFO ASEReadCounter - HTSJDK Version: 2.22.0
02:19:10.603 INFO ASEReadCounter - Picard Version: 2.22.8
02:19:10.603 INFO ASEReadCounter - HTSJDK Defaults.COMPRESSION_LEVEL : 2
02:19:10.603 INFO ASEReadCounter - HTSJDK Defaults.USE_ASYNC_IO_READ_FOR_SAMTOOLS : false
02:19:10.603 INFO ASEReadCounter - HTSJDK Defaults.USE_ASYNC_IO_WRITE_FOR_SAMTOOLS : true
02:19:10.604 INFO ASEReadCounter - HTSJDK Defaults.USE_ASYNC_IO_WRITE_FOR_TRIBBLE : false
02:19:10.604 INFO ASEReadCounter - Deflater: IntelDeflater
02:19:10.604 INFO ASEReadCounter - Inflater: IntelInflater
02:19:10.604 INFO ASEReadCounter - GCS max retries/reopens: 20
02:19:10.604 INFO ASEReadCounter - Requester pays: disabled
02:19:10.604 INFO ASEReadCounter - Initializing engine
02:19:11.014 INFO FeatureManager - Using codec VCFCodec to read file file:///data2/zhaol/vcf_rna-seq/CM/output_579.vcf.gz
02:19:11.090 INFO ASEReadCounter - Done initializing engine
contig position variantID refAllele altAllele refCount altCount totalCount lowMAPQDepth lowBaseQDepth rawDepth otherBases improperPairs
02:19:11.090 INFO ProgressMeter - Starting traversal
02:19:11.090 INFO ProgressMeter - Current Locus Elapsed Minutes Loci Processed Loci/Minute
02:19:11.112 INFO ASEReadCounter - Shutting down engine
[January 8, 2021 2:19:11 AM EST] org.broadinstitute.hellbender.tools.walkers.rnaseq.ASEReadCounter done. Elapsed time: 0.26 minutes.
Runtime.totalMemory()=1849688064
java.lang.ArrayIndexOutOfBoundsException: 0
at org.broadinstitute.hellbender.engine.ReferenceContext.getBase(ReferenceContext.java:406)
at org.broadinstitute.hellbender.tools.walkers.rnaseq.ASEReadCounter.apply(ASEReadCounter.java:183)
at org.broadinstitute.hellbender.engine.LocusWalker.lambda$traverse$0(LocusWalker.java:162)
at java.util.Iterator.forEachRemaining(Iterator.java:116)
at org.broadinstitute.hellbender.engine.LocusWalker.traverse(LocusWalker.java:160)
at org.broadinstitute.hellbender.engine.GATKTool.doWork(GATKTool.java:1049)
at org.broadinstitute.hellbender.cmdline.CommandLineProgram.runTool(CommandLineProgram.java:140)
at org.broadinstitute.hellbender.cmdline.CommandLineProgram.instanceMainPostParseArgs(CommandLineProgram.java:192)
at org.broadinstitute.hellbender.cmdline.CommandLineProgram.instanceMain(CommandLineProgram.java:211)
at org.broadinstitute.hellbender.Main.runCommandLineProgram(Main.java:163)
at org.broadinstitute.hellbender.Main.mainEntry(Main.java:206)
at org.broadinstitute.hellbender.Main.main(Main.java:292)
-
Seems to me that there is still an issue with the new bam file. Can you please try these suggestion:
- You mentioned you fixed the bam, how did you do that?
- Please run validateSamFile on the corrected bam and ValidateVariants on the vcf again to confirm their validity.
- Please check if the bam file and the vcf were generated using the same reference
- One other thing to try if none of the other above mentioned suggestions work is to re-run ASEReadCounter with a reference as input.
-
Hi, Bhanu Gandham.
First, I fixed BAM with the FixmateInformation program.After I fix BAM, I re-run the ValidatArray and ValidatesSamFile and no error messages are displayed.
Second, I need to reconfirm with my colleagues that the reference used is the same.
Finally, I add the -R parameter and the reference and find that the program runs.
-
That's good! Good to know that using the reference solves the problem. It is possible that the tool requires some information not available in the bam file and hence providing a reference solves the issue.
Please sign in to leave a comment.
3 comments