Hello everyone ,
I have fastq file containing both Forward and reverse reads an di want to split this file to two files Forward and Reverse
can you tell me please how to do that ?
Thank you very much
Hello everyone ,
I have fastq file containing both Forward and reverse reads an di want to split this file to two files Forward and Reverse
can you tell me please how to do that ?
Thank you very much
If your reads are interleaved (1_R1,1_R2,2_R1,2_R2
etc) then you can use reformat.sh
from BBMap suite.
reformat.sh in=original.fq out1=R1.fq out2=R2.fq
Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Do you really mean forward and reverse, and not read 1 and read and read 2? read1 and read2 can likely be split by their names. forward and reverse can only be determined after alignment.
Thank you for your response
well , because i did alignement of my reads (two files R1 and R2 ) and i transfered the output of bowtie2 (sam file ) to bam file , and from bam file i extracted unmapped reads (bam format ) and i transfered this last one to fastq and now i want to split this file to forward and reverse to do assemblage next ( my goal is to do assembly of the unmapped reads )
Sorry for late reply
You can also use
samtools fastq
to convert yourunmapped.bam
file to fastq.yees i ve got fastq file and i wat to split it to two files forward and reverse
You can't identify what direction the read goes from the fastq. However, the bam file will tell you forward or reverse.
If you mean forward (= R1 read) and reverse (=R2 read) then splitting the interleaved files is fine. Otherwise you can't find the information about which strand they come from since the reads are unmapped.