Question: Merge 4 Fastq Files
1
gravatar for bashwin.u
5.5 years ago by
bashwin.u40
bashwin.u40 wrote:

Hello,

I know there have been many questions regarding merging fastq files. But I am not getting relevant answers in my situation.

I have 4 paired-ended fastq files.

s_6_1.fastq s_6_2.fastq

s_7_1.fastq s_7_2.fastq

Can I just cat the first two files and the last two files to make s_6.fastq and s_7.fastq? I would like to use these fastq files for mapping with BWA or Bowtie.

Hope to get some suggestions regarding this. Thanks, AShwin

genome merge fastq • 3.9k views
ADD COMMENTlink modified 5.5 years ago by KCC3.9k • written 5.5 years ago by bashwin.u40
5

Why do you want to do that? bwa and bowtie both supports pair-end input and there doesn't really seems like the fastq are required to be merged before alignment

ADD REPLYlink written 5.5 years ago by Sam2.3k
1

yes, you can merge the _1.fastq files into one files and the _2.fastq files into another. just maintain the order (pairing) between them.

ADD REPLYlink modified 5.5 years ago • written 5.5 years ago by brentp23k
1
gravatar for KCC
5.5 years ago by
KCC3.9k
Cambridge, MA
KCC3.9k wrote:

Try this. Mostly default settings. Where I say "-t 4" I am assuming you have 4 processors. You can drop this number if that's not the case for you.

bwa index -p mygenome -a bwtsw mygenome.fa

bwa aln -t 4 bwtsw mygenome s_6_1.fastq > s_6_1.sai
bwa aln -t 4 bwtsw mygenome s_6_2.fastq > s_6_2.sai

bwa sampe mygenome s_6_1.sai s_6_2.sai s_6_1.fastq s_6_2.fastq > s_6.sam

Merging seems unnecessarily complicated in this case. I don't know if bwa can handle that.

ADD COMMENTlink written 5.5 years ago by KCC3.9k
0
gravatar for geek_y
5.5 years ago by
geek_y9.4k
Barcelona/CRG/London/Imperial
geek_y9.4k wrote:

If you would like to merge the files, in your case...the merging should be..

Sample1_r1 + Sample2_r1 = Sample_r1.fastq && Sample1_r2 + Sample2_r2 = Sample_r2.fastq

Then align using bowtie2.

bowtie2 -x Genome_Index -1 Sample_r1.fastq -2 Sample_r2.fastq -S out.sam

ADD COMMENTlink modified 5.5 years ago • written 5.5 years ago by geek_y9.4k
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: 2203 users visited in the last hour