I can't convert the sam file to fastq file.
1
0
Entering edit mode
8.9 years ago
porori3000 • 0

First of all, I'm a student innon-English-speakingcountry... Newbie in bioinformatics.I'm working at the Ubuntu circumstance.

My object is to make a artificial fastq files (paired-end) from human chromosome 1(GRCh37) reference data.

Using SimSeq, I made a sam file. Used command is this.

java -jar -Xmx2048m /(Path)/SimSeq.jar -1 100 -2 100 \
          --insert_size 500 \
          --insert_stdev 200 \
          --read_number 12462531 \
          --reference /(Path)/chr1.fa \
          --out /(Path)/output.sam

One sam file was made, and I think this sam file includes paired end data.

And Next step, Using picard SamToFastq.jar, I want to make fastq files from the sam file. But I stopped at here. Used command is this.

java -jar /(Path)/picard-tools-1.119/SamToFastq.jar \
         I=/(Path)/output.sam \
         FASTQ=/(Path)/output_1.fastq \
         SECOND_END_FASTQ=/(Path)/output_2.fastq

It throws an error message.

[Wed Feb 17 18:34:10 KST 2016] picard.sam.SamToFastq INPUT=/(Path)/output.sam FASTQ=/(Path)/output_1.fastq SECOND_END_FASTQ=/(Path)/output_2.fastq  OUTPUT_PER_RG=false RE_REVERSE=true INTERLEAVE=false INCLUDE_NON_PF_READS=false 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
            OpenJDK 64-Bit Server VM warning: You have loaded library /(Path)/picard-tools-1.119/libIntelDeflater.so which might have disabled stack guard. The VM will try to fix the stack guard now.
            It's highly recommended that you fix the library with 'execstack -c <libfile>', or link it with '-z noexecstack'.
            [Wed Feb 17 18:34:10 KST 2016] Executing as (my account)@(server name) on Linux 3.16.0-031600-generic amd64; OpenJDK 64-Bit Server VM 1.7.0_75-b13; Picard version: 1.119(d44cdb51745f5e8075c826430a39d8a61f1dd832_1408991805) IntelDeflater
            [Wed Feb 17 18:34:10 KST 2016] picard.sam.SamToFastq done. Elapsed time: 0.00 minutes.
            Runtime.totalMemory()=1011351552
            To get help, see http://picard.sourceforge.net/index.shtml#GettingHelp
            Exception in thread "main" htsjdk.samtools.SAMFormatException: Error parsing text SAM file. Empty sequence dictionary.; Line 1
            Line: SimSeq_1 83 gi|224384768|gb|CM000663.1| 95867799 255 100M = 95867511 -388 ACATGCACAGTGCACATACACATTTGTATGTATCTAGTTATCATGTATATTTATTTAAATTTCACAAATGATGAATAACCATAGAAAAATAAACAGATAA ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ YC:Z:100M
             at htsjdk.samtools.SAMLineParser.reportErrorParsingLine(SAMLineParser.java:427)
             at htsjdk.samtools.SAMLineParser.parseLine(SAMLineParser.java:331)
             at htsjdk.samtools.SAMTextReader$RecordIterator.parseLine(SAMTextReader.java:247)
             at htsjdk.samtools.SAMTextReader$RecordIterator.next(SAMTextReader.java:235)
             at htsjdk.samtools.SAMTextReader$RecordIterator.next(SAMTextReader.java:211)
             at htsjdk.samtools.SamReader$AssertingIterator.next(SamReader.java:514)
             at htsjdk.samtools.SamReader$AssertingIterator.next(SamReader.java:488)
             at picard.sam.SamToFastq.doWork(SamToFastq.java:149)
             at picard.cmdline.CommandLineProgram.instanceMain(CommandLineProgram.java:183)
             at picard.sam.SamToFastq.main(SamToFastq.java:137)

How can I fix the problem and can make a fastq file?

sam fastq • 3.8k views
ADD COMMENT
0
Entering edit mode

Hi,

Try running Picard again with this added parameter -

VALIDATION_STRINGENCY=LENIENT

ADD REPLY
1
Entering edit mode
8.9 years ago

(your picard tools is old)

I'm pretty sure that running

head output.sam

will show reads, but no header.

ADD COMMENT
0
Entering edit mode

thanks for your advice. I added two lines:

@HD VN:1.0 SO:coordinate
@SQ SN:gi|224384768|gb|CM000663.1|  LN:249904550

on the first part of the sam file and do the same command. It still print the warning message about Server VM warning and fixing library recommendation but it works anyway!

ADD REPLY

Login before adding your answer.

Traffic: 2095 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6