java.io.IOException: Read end dead

HyunminHyunmin Seoul, KoreaMember
edited February 20 in Ask the GATK team

I met the problem using picard. so I checked the bam file. It had no error.

java -Xmx12G -jar /BiO/Install/picard-2.17.10/picard.jar GatherBamFiles INPUT=/BiO/Project/brandon-genome-analysis/analysis/brandon_wes.aligned.duplicates_marked.recalibrated.12.bam INPUT=/BiO/Project/brandon-genome-analysis/analysis/brandon_wes.aligned.duplicates_marked.recalibrated.18.bam INPUT=/BiO/Project/brandon-genome-analysis/analysis/brandon_wes.aligned.duplicates_marked.recalibrated.14.bam INPUT=/BiO/Project/brandon-genome-analysis/analysis/brandon_wes.aligned.duplicates_marked.recalibrated.7.bam INPUT=/BiO/Project/brandon-genome-analysis/analysis/brandon_wes.aligned.duplicates_marked.recalibrated.15.bam INPUT=/BiO/Project/brandon-genome-analysis/analysis/brandon_wes.aligned.duplicates_marked.recalibrated.13.bam INPUT=/BiO/Project/brandon-genome-analysis/analysis/brandon_wes.aligned.duplicates_marked.recalibrated.16.bam INPUT=/BiO/Project/brandon-genome-analysis/analysis/brandon_wes.aligned.duplicates_marked.recalibrated.8.bam INPUT=/BiO/Project/brandon-genome-analysis/analysis/brandon_wes.aligned.duplicates_marked.recalibrated.9.bam INPUT=/BiO/Project/brandon-genome-analysis/analysis/brandon_wes.aligned.duplicates_marked.recalibrated.2.bam INPUT=/BiO/Project/brandon-genome-analysis/analysis/brandon_wes.aligned.duplicates_marked.recalibrated.19.bam INPUT=/BiO/Project/brandon-genome-analysis/analysis/brandon_wes.aligned.duplicates_marked.recalibrated.3.bam INPUT=/BiO/Project/brandon-genome-analysis/analysis/brandon_wes.aligned.duplicates_marked.recalibrated.11.bam INPUT=/BiO/Project/brandon-genome-analysis/analysis/brandon_wes.aligned.duplicates_marked.recalibrated.5.bam INPUT=/BiO/Project/brandon-genome-analysis/analysis/brandon_wes.aligned.duplicates_marked.recalibrated.10.bam INPUT=/BiO/Project/brandon-genome-analysis/analysis/brandon_wes.aligned.duplicates_marked.recalibrated.6.bam INPUT=/BiO/Project/brandon-genome-analysis/analysis/brandon_wes.aligned.duplicates_marked.recalibrated.17.bam INPUT=/BiO/Project/brandon-genome-analysis/analysis/brandon_wes.aligned.duplicates_marked.recalibrated.1.bam INPUT=/BiO/Project/brandon-genome-analysis/analysis/brandon_wes.aligned.duplicates_marked.recalibrated.4.bam OUTPUT=/BiO/Project/brandon-genome-analysis/analysis/brandon_wes.bam CREATE_INDEX=true CREATE_MD5_FILE=true

How can I check this issue ?

(I follow up this script: https://github.com/gatk-workflows/gatk4-data-processing/blob/master/processing-for-variant-discovery-gatk4.wdl#L606)

[Tue Feb 20 17:01:06 KST 2018] GatherBamFiles INPUT=[/BiO/Project/brandon-genome-analysis/analysis/brandon_wes.aligned.duplicates_marked.recalibrated.12.bam, /BiO/Project/brandon-genome-analysis/analysis/brandon_wes.aligned.duplicates_marked.recalibrated.18.bam, /BiO/Project/brandon-genome-analysis/analysis/brandon_wes.aligned.duplicates_marked.recalibrated.14.bam, /BiO/Project/brandon-genome-analysis/analysis/brandon_wes.aligned.duplicates_marked.recalibrated.7.bam, /BiO/Project/brandon-genome-analysis/analysis/brandon_wes.aligned.duplicates_marked.recalibrated.15.bam, /BiO/Project/brandon-genome-analysis/analysis/brandon_wes.aligned.duplicates_marked.recalibrated.13.bam, /BiO/Project/brandon-genome-analysis/analysis/brandon_wes.aligned.duplicates_marked.recalibrated.16.bam, /BiO/Project/brandon-genome-analysis/analysis/brandon_wes.aligned.duplicates_marked.recalibrated.8.bam, /BiO/Project/brandon-genome-analysis/analysis/brandon_wes.aligned.duplicates_marked.recalibrated.9.bam, /BiO/Project/brandon-genome-analysis/analysis/brandon_wes.aligned.duplicates_marked.recalibrated.2.bam, /BiO/Project/brandon-genome-analysis/analysis/brandon_wes.aligned.duplicates_marked.recalibrated.19.bam, /BiO/Project/brandon-genome-analysis/analysis/brandon_wes.aligned.duplicates_marked.recalibrated.3.bam, /BiO/Project/brandon-genome-analysis/analysis/brandon_wes.aligned.duplicates_marked.recalibrated.11.bam, /BiO/Project/brandon-genome-analysis/analysis/brandon_wes.aligned.duplicates_marked.recalibrated.5.bam, /BiO/Project/brandon-genome-analysis/analysis/brandon_wes.aligned.duplicates_marked.recalibrated.10.bam, /BiO/Project/brandon-genome-analysis/analysis/brandon_wes.aligned.duplicates_marked.recalibrated.6.bam, /BiO/Project/brandon-genome-analysis/analysis/brandon_wes.aligned.duplicates_marked.recalibrated.17.bam, /BiO/Project/brandon-genome-analysis/analysis/brandon_wes.aligned.duplicates_marked.recalibrated.1.bam, /BiO/Project/brandon-genome-analysis/analysis/brandon_wes.aligned.duplicates_marked.recalibrated.4.bam] OUTPUT=/BiO/Project/brandon-genome-analysis/analysis/brandon_wes.bam CREATE_INDEX=true CREATE_MD5_FILE=true VERBOSITY=INFO QUIET=false VALIDATION_STRINGENCY=STRICT COMPRESSION_LEVEL=5 MAX_RECORDS_IN_RAM=500000 GA4GH_CLIENT_SECRETS=client_secrets.json USE_JDK_DEFLATER=false USE_JDK_INFLATER=false
[Tue Feb 20 17:01:06 KST 2018] Executing as brandon on Linux 4.8.0-36-generic amd64; OpenJDK 64-Bit Server VM 1.8.0_151-8u151-b12-0ubuntu0.16.04.2-b12; Deflater: Intel; Inflater: Intel; Picard version: 2.17.10-SNAPSHOT
INFO 2018-02-20 17:01:06 BamFileIoUtils Block copying /BiO/Project/brandon-genome-analysis/analysis/brandon_wes.aligned.duplicates_marked.recalibrated.12.bam ...
INFO 2018-02-20 17:01:15 BamFileIoUtils Block copying /BiO/Project/brandon-genome-analysis/analysis/brandon_wes.aligned.duplicates_marked.recalibrated.18.bam ...
INFO 2018-02-20 17:01:18 BamFileIoUtils Block copying /BiO/Project/brandon-genome-analysis/analysis/brandon_wes.aligned.duplicates_marked.recalibrated.14.bam ...
Exception in thread "BamIndexingThread" htsjdk.samtools.SAMException: Exception creating BAM index for record D00235:287:HM2NHBCXX:2:1208:1814:24369 2/2 101b aligned read.
at htsjdk.samtools.BAMIndexer.processAlignment(BAMIndexer.java:119)
at htsjdk.samtools.Indexer.run(StreamInflatingIndexingOutputStream.java:102)
at java.lang.Thread.run(Thread.java:748)
Caused by: htsjdk.samtools.SAMException: Unexpected reference 15 when constructing index for 3365 for record D00235:287:HM2NHBCXX:2:1208:1814:24369 2/2 101b aligned read.
at htsjdk.samtools.BAMIndexer$BAMIndexBuilder.processAlignment(BAMIndexer.java:218)
at htsjdk.samtools.BAMIndexer.processAlignment(BAMIndexer.java:117)
... 2 more
[Tue Feb 20 17:01:19 KST 2018] picard.sam.GatherBamFiles done. Elapsed time: 0.21 minutes.
Runtime.totalMemory()=3670540288
To get help, see http://broadinstitute.github.io/picard/index.html#GettingHelp
Exception in thread "main" htsjdk.samtools.util.RuntimeIOException: java.io.IOException: Read end dead
at htsjdk.samtools.util.IOUtil.transferByStream(IOUtil.java:154)
at htsjdk.samtools.BamFileIoUtils.blockCopyBamFile(BamFileIoUtils.java:109)
at htsjdk.samtools.BamFileIoUtils.gatherWithBlockCopying(BamFileIoUtils.java:137)
at picard.sam.GatherBamFiles.doWork(GatherBamFiles.java:107)
at picard.cmdline.CommandLineProgram.instanceMain(CommandLineProgram.java:269)
at picard.cmdline.PicardCommandLine.instanceMain(PicardCommandLine.java:98)
at picard.cmdline.PicardCommandLine.main(PicardCommandLine.java:108)
Caused by: java.io.IOException: Read end dead
at java.io.PipedInputStream.checkStateForReceive(PipedInputStream.java:262)
at java.io.PipedInputStream.awaitSpace(PipedInputStream.java:268)
at java.io.PipedInputStream.receive(PipedInputStream.java:231)
at java.io.PipedOutputStream.write(PipedOutputStream.java:149)
at htsjdk.samtools.StreamInflatingIndexingOutputStream.write(StreamInflatingIndexingOutputStream.java:56)
at htsjdk.samtools.util.IOUtil.transferByStream(IOUtil.java:149)
... 6 more

Tagged:

Best Answers

Answers

Sign In or Register to comment.