Question: How to cancat two multiplexed fastq files from GBS with two lanes?
0
gravatar for mmcui0018
28 days ago by
mmcui00180
mmcui00180 wrote:

Hi! I have been searching for this one the whole morning but couldn't find an answer. Here I have two big fastq files from two lanes for 150 samples. I want to merge the files to a single one, letting each sample on one lane match/merge the same one in the list of the other lane, and keep 150 lanes eventually. So can I concat two multiplexed fastq files without having to demultiplexing them?

Thanks!

snp • 158 views
ADD COMMENTlink written 28 days ago by mmcui00180

I want to merge the files to a single one, letting each sample on one lane match/merge the same one in the list of the other lane, and keep 150 lanes eventually.

It is difficult to understand what you exactly have and what you want but If I am reading this right you have just two files with 150 samples each from 2 lanes? From those you want to create a pair of files per sample which will contain the reads from both lanes?

Are there sample specific index sequences (in the fastq header) in these two files?

If you know the index sequences for each sample then you can use demuxbyname.sh from BBMap suite to get sample specific files for each lane. Then it is just a matter of catting the two lane files together to get your 150 sample files. See: demultiplexing tool for dual-indexed paired-end illumina libraries

ADD REPLYlink modified 28 days ago • written 28 days ago by genomax65k

Thanks for your reply! Sorry it's hard for me to explain. You‘re right about what I exactly have. But I want to create a single file including all 150 samples instead of 150 files.

ADD REPLYlink written 28 days ago by mmcui00180
1

In that case just cat the two lane specific files together. Something like:

cat Samples_R1_L001.fq.gz Samples_R1_L002.fq.gz  > Samples_total_R1.fq.gz
cat Samples_R2_L001.fq.gz Samples_R2_L002.fq.gz  > Samples_total_R2.fq.gz

This will put all 150 samples from two lanes into one set of files.

ADD REPLYlink modified 28 days ago • written 28 days ago by genomax65k

Are you sure its not possible to ask whoever made the fastqs for you to make them the way you want them?

ADD REPLYlink written 28 days ago by swbarnes25.2k

Unfortunately, the people who did the sequencing didn't seem to know how to do it. It maybe a little too specific.

ADD REPLYlink modified 28 days ago • written 28 days ago by mmcui00180

Oh excause me, I just realized I asked a wrong question. Thanks all anyway!

ADD REPLYlink written 28 days ago by mmcui00180

Concatenating fastq.gz files across lanes @ mmcui0018

ADD REPLYlink modified 27 days ago • written 27 days ago by cpad011211k
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: 652 users visited in the last hour