Merge 4 Fastq Files
2
1
Entering edit mode
11.1 years ago
bashwin.u ▴ 40

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

merge fastq genome • 5.3k views
ADD COMMENT
5
Entering edit mode

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 REPLY
1
Entering edit mode

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 REPLY
1
Entering edit mode
11.1 years ago
KCC ★ 4.1k

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 COMMENT
0
Entering edit mode
11.1 years ago

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 COMMENT

Login before adding your answer.

Traffic: 2454 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