Question: Picard SamToFastq error
0
gravatar for NGS-Newbie
2.1 years ago by
NGS-Newbie10
NGS-Newbie10 wrote:

I am trying to convert a sam file to fastq file using picard, but couldn't get the output file - It says it's done but the output file has 0 bytes. Here's is the detailed output. Please suggest if I could use any other program. Thank you all!

$ java -Xmx2048m -jar picard.jar SamToFastq I=F11_R1.sam FASTQ=F11_R1.fastq

picard.sam.SamToFastq INPUT=LF11_R1.sam FASTQ=LF11_R1.fastq OUTPUT_PER_RG=false RG_TAG=PU RE_REVERSE=true INTERLEAVE=false INCLUDE_NON_PF_READS=false CLIPPING_MIN_LENGTH=0 READ1_TRIM=0 READ2_TRIM=0 INCLUDE_NON_PRIMARY_ALIGNMENTS=false VERBOSITY=INFO QUIET=false VALIDATION_STRINGENCY=STRICT COMPRESSION_LEVEL=5 MAX_RECORDS_IN_RAM=500000 CREATE_INDEX=false CREATE_MD5_FILE=false GA4GH_CLIENT_SECRETS=client_secrets.json Executing as User1@macbook on Mac OS X 10.11.6 x86_64; Java HotSpot(TM) 64-Bit Server VM 1.8.0_121-b13; Picard version: 2.9.0-1-gf5b9f50-SNAPSHOT picard.sam.SamToFastq done. Elapsed time: 3.40 minutes. Runtime.totalMemory()=1084751872 To get help, see http://broadinstitute.github.io/picard/index.html#GettingHelp Exception in thread "main" java.lang.OutOfMemoryError: Java heap space at java.lang.String.<init>(String.java:325) at htsjdk.samtools.util.StringUtil.bytesToString(StringUtil.java:301) at htsjdk.samtools.util.StringUtil.bytesToString(StringUtil.java:288) at htsjdk.samtools.BinaryTagCodec.readNullTerminatedString(BinaryTagCodec.java:423) at htsjdk.samtools.BinaryTagCodec.readSingleValue(BinaryTagCodec.java:318) at htsjdk.samtools.BinaryTagCodec.readTags(BinaryTagCodec.java:282) at htsjdk.samtools.BAMRecord.decodeAttributes(BAMRecord.java:313) at htsjdk.samtools.BAMRecord.getAttribute(BAMRecord.java:293) at htsjdk.samtools.SAMRecord.isValid(SAMRecord.java:2004) at htsjdk.samtools.BAMFileReader$BAMFileIterator.advance(BAMFileReader.java:795) at htsjdk.samtools.BAMFileReader$BAMFileIterator.next(BAMFileReader.java:781) at htsjdk.samtools.BAMFileReader$BAMFileIterator.next(BAMFileReader.java:751) at htsjdk.samtools.SamReader$AssertingIterator.next(SamReader.java:569) at htsjdk.samtools.SamReader$AssertingIterator.next(SamReader.java:543) at picard.sam.SamToFastq.doWork(SamToFastq.java:174) at picard.cmdline.CommandLineProgram.instanceMain(CommandLineProgram.java:205) at picard.cmdline.PicardCommandLine.instanceMain(PicardCommandLine.java:94) at picard.cmdline.PicardCommandLine.main(PicardCommandLine.java:104)

picard samtofastq • 1.2k views
ADD COMMENTlink modified 2.1 years ago • written 2.1 years ago by NGS-Newbie10

Worked! Thanks, Santosh!

ADD REPLYlink written 2.1 years ago by NGS-Newbie10

Please use ADD COMMENT to reply to earlier reactions. As such this thread remains logically structured and easy to follow. I have now moved your comment, but as you can see it's not optimal.

If the answer was helpful you should upvote it. If this answer resolved your question, you should mark it as accepted.

ADD REPLYlink written 2.1 years ago by WouterDeCoster38k
3
gravatar for Santosh Anand
2.1 years ago by
Santosh Anand4.7k
Santosh Anand4.7k wrote:

You hit an out-of-memory error. Increase the memory according to what you have -Xmx2048m means maximum 2048megabytes for the JAVA JVM. Make it 70-80% of your max-available memory.

ADD COMMENTlink modified 2.1 years ago • written 2.1 years ago by Santosh Anand4.7k
Please log in to add an answer.

Help
Access

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 2.3.0
Traffic: 1401 users visited in the last hour