Entering edit mode
3.2 years ago
smrutimayipanda
▴
20
Hii all, I ran the following command:
picard SortSam -I 10100123749_NIKEC.bam -O 10100123749.bam --SORT_ORDER coordinate --MAX_RECORDS_IN_RAM 1500000 --VALIDATION_STRINGENCY LENIENT
But I am getting this error:
18:09:18.048 INFO NativeLibraryLoader - Loading libgkl_compression.so from jar:file:/home/mdrcubuntu/anaconda3/envs/smruti/share/picard-2.26.3-0/picard.jar!/com/intel/gkl/native/libgkl_compression.so
[Mon Oct 18 18:09:18 IST 2021] SortSam --INPUT 10100135488_Sunita.bam --OUTPUT 10100135488.bam --SORT_ORDER coordinate --VALIDATION_STRINGENCY LENIENT --MAX_RECORDS_IN_RAM 1500000 --VERBOSITY INFO --QUIET false --COMPRESSION_LEVEL 5 --CREATE_INDEX false --CREATE_MD5_FILE false --GA4GH_CLIENT_SECRETS client_secrets.json --help false --version false --showHidden false --USE_JDK_DEFLATER false --USE_JDK_INFLATER false
[Mon Oct 18 18:09:18 IST 2021] Executing as mdrcubuntu@mdrcubuntu-H110M-H on Linux 5.13.0-19-generic amd64; OpenJDK 64-Bit Server VM 1.8.0_302-b08; Deflater: Intel; Inflater: Intel; Provider GCS is not available; Picard version: Version:2.26.3
INFO 2021-10-18 18:09:18 SortSam Seen many non-increasing record positions. Printing Read-names as well.
[Mon Oct 18 18:10:20 IST 2021] picard.sam.SortSam done. Elapsed time: 1.03 minutes.
Runtime.totalMemory()=1261436928
To get help, see http://broadinstitute.github.io/picard/index.html#GettingHelp
Exception in thread "main" java.lang.OutOfMemoryError: GC overhead limit exceeded
at htsjdk.samtools.BinaryTagCodec.readTags(BinaryTagCodec.java:282)
at htsjdk.samtools.BAMRecord.decodeAttributes(BAMRecord.java:412)
at htsjdk.samtools.BAMRecord.getAttribute(BAMRecord.java:391)
at htsjdk.samtools.SAMRecord.getAttribute(SAMRecord.java:1182)
at htsjdk.samtools.SAMRecord.isValid(SAMRecord.java:2164)
at htsjdk.samtools.BAMFileReader$BAMFileIterator.advance(BAMFileReader.java:848)
at htsjdk.samtools.BAMFileReader$BAMFileIterator.next(BAMFileReader.java:834)
at htsjdk.samtools.BAMFileReader$BAMFileIterator.next(BAMFileReader.java:802)
at htsjdk.samtools.SamReader$AssertingIterator.next(SamReader.java:591)
at htsjdk.samtools.SamReader$AssertingIterator.next(SamReader.java:570)
at picard.sam.SortSam.doWork(SortSam.java:162)
at picard.cmdline.CommandLineProgram.instanceMain(CommandLineProgram.java:308)
at picard.cmdline.PicardCommandLine.instanceMain(PicardCommandLine.java:103)
at picard.cmdline.PicardCommandLine.main(PicardCommandLine.java:113)
I tried it several times but failed. Did anyone have idea what to do to rectify this error?
Looks like you are running out of memory. You can try specifying java temp io directory as shown here: Setting temporary directory for GATK4 SortSam .
Still I am not getting the result. Runtime.totalMemory()=3722969088 To get help, see http://broadinstitute.github.io/picard/index.html#GettingHelp htsjdk.samtools.SAMFormatException: Did not inflate expected amount at htsjdk.samtools.util.BlockGunzipper.unzipBlock(BlockGunzipper.java:147) at htsjdk.samtools.util.BlockGunzipper.unzipBlock(BlockGunzipper.java:96) at htsjdk.samtools.util.BlockCompressedInputStream.inflateBlock(BlockCompressedInputStream.java:550) at htsjdk.samtools.util.BlockCompressedInputStream.processNextBlock(BlockCompressedInputStream.java:532) at htsjdk.samtools.util.BlockCompressedInputStream.nextBlock(BlockCompressedInputStream.java:468) at htsjdk.samtools.util.BlockCompressedInputStream.readBlock(BlockCompressedInputStream.java:458) at htsjdk.samtools.util.BlockCompressedInputStream.available(BlockCompressedInputStream.java:196) at htsjdk.samtools.util.BlockCompressedInputStream.read(BlockCompressedInputStream.java:331) at java.io.DataInputStream.read(DataInputStream.java:149) at htsjdk.samtools.util.BinaryCodec.readBytesOrFewer(BinaryCodec.java:421) at htsjdk.samtools.util.BinaryCodec.readBytes(BinaryCodec.java:394) at htsjdk.samtools.util.BinaryCodec.readByteBuffer(BinaryCodec.java:507) at htsjdk.samtools.util.BinaryCodec.readInt(BinaryCodec.java:518) at htsjdk.samtools.BAMRecordCodec.decode(BAMRecordCodec.java:261) at htsjdk.samtools.BAMFileReader$BAMFileIterator.getNextRecord(BAMFileReader.java:866) at htsjdk.samtools.BAMFileReader$BAMFileIterator.advance(BAMFileReader.java:840) at htsjdk.samtools.BAMFileReader$BAMFileIterator.next(BAMFileReader.java:834) at htsjdk.samtools.BAMFileReader$BAMFileIterator.next(BAMFileReader.java:802) at htsjdk.samtools.SamReader$AssertingIterator.next(SamReader.java:591) at htsjdk.samtools.SamReader$AssertingIterator.next(SamReader.java:570) at picard.sam.SortSam.doWork(SortSam.java:160) at picard.cmdline.CommandLineProgram.instanceMain(CommandLineProgram.java:308) at org.broadinstitute.hellbender.cmdline.PicardCommandLineProgramExecutor.instanceMain(PicardCommandLineProgramExecutor.java:37) at org.broadinstitute.hellbender.Main.runCommandLineProgram(Main.java:160) at org.broadinstitute.hellbender.Main.mainEntry(Main.java:203) at org.broadinstitute.hellbender.Main.main(Main.java:289)
Please tell me how to clear memory
Assuming you used a temp IO directory we seem to have returned to the old problem you were having before SAMFormatException: Did not inflate expected amount error
Your input BAM file must be corrupt.
I have again created the bam file but it is giving the same error. To get help, see http://broadinstitute.github.io/picard/index.html#GettingHelp Exception in thread "main" java.lang.OutOfMemoryError: GC overhead limit exceeded at htsjdk.samtools.SAMUtils.getAlignmentBlocks(SAMUtils.java:717) at htsjdk.samtools.SAMRecord.getAlignmentBlocks(SAMRecord.java:1919) at htsjdk.samtools.SAMRecord.validateCigar(SAMRecord.java:1937) at htsjdk.samtools.BAMRecord.getCigar(BAMRecord.java:284) at htsjdk.samtools.SAMRecord.isValid(SAMRecord.java:2233) at htsjdk.samtools.BAMFileReader$BAMFileIterator.advance(BAMFileReader.java:848) at htsjdk.samtools.BAMFileReader$BAMFileIterator.next(BAMFileReader.java:834) at htsjdk.samtools.BAMFileReader$BAMFileIterator.next(BAMFileReader.java:802) at htsjdk.samtools.SamReader$AssertingIterator.next(SamReader.java:591) at htsjdk.samtools.SamReader$AssertingIterator.next(SamReader.java:570) at picard.sam.SortSam.doWork(SortSam.java:162) at picard.cmdline.CommandLineProgram.instanceMain(CommandLineProgram.java:308) at picard.cmdline.PicardCommandLine.instanceMain(PicardCommandLine.java:103) at picard.cmdline.PicardCommandLine.main(PicardCommandLine.java:113)