Question: Picard SamToFastq error
gravatar for NGS-Newbie
2.8 years ago by
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 Exception in thread "main" java.lang.OutOfMemoryError: Java heap space at java.lang.String.<init>( at htsjdk.samtools.util.StringUtil.bytesToString( at htsjdk.samtools.util.StringUtil.bytesToString( at htsjdk.samtools.BinaryTagCodec.readNullTerminatedString( at htsjdk.samtools.BinaryTagCodec.readSingleValue( at htsjdk.samtools.BinaryTagCodec.readTags( at htsjdk.samtools.BAMRecord.decodeAttributes( at htsjdk.samtools.BAMRecord.getAttribute( at htsjdk.samtools.SAMRecord.isValid( at htsjdk.samtools.BAMFileReader$BAMFileIterator.advance( at htsjdk.samtools.BAMFileReader$ at htsjdk.samtools.BAMFileReader$ at htsjdk.samtools.SamReader$ at htsjdk.samtools.SamReader$ at picard.sam.SamToFastq.doWork( at picard.cmdline.CommandLineProgram.instanceMain( at picard.cmdline.PicardCommandLine.instanceMain( at picard.cmdline.PicardCommandLine.main(

picard samtofastq • 1.5k views
ADD COMMENTlink modified 2.8 years ago • written 2.8 years ago by NGS-Newbie10

Worked! Thanks, Santosh!

ADD REPLYlink written 2.8 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.8 years ago by WouterDeCoster42k
gravatar for Santosh Anand
2.8 years ago by
Santosh Anand5.0k
Santosh Anand5.0k 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.8 years ago • written 2.8 years ago by Santosh Anand5.0k
Please log in to add an answer.


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