combining fastq from different lanes
1
0
Entering edit mode
4.1 years ago
rob.costa1234 ▴ 310

I have fastq files as follows:

Sample1-1_S13_R1_001.fastq
Sample1-2_S14_R1_001.fastq
Sample1-3_S15_R1_001.fastq
Sample1-4_S16_R1_001.fastq
Sample1-1_S13_R2_001.fastq
Sample1-2_S14_R2_001.fastq
Sample1-4_S16_R2_001.fastq
Sample1-3_S15_R2_001.fastq

I simply cat R1 and R2 but the tool I am using is giving me an error Some files in the fastq path are split by lane, while some are not. This is not supported. My question is is there another alternate to cat that to combine fastq files so that it can avoid this error or combine fatsq masking different lanes. Thanks

sequence • 3.1k views
ADD COMMENT
1
Entering edit mode

why are you 'catting' R1 and R2 ? Simply joining them might indeed result in an error, if you want to have them in a single file you should interleave them.

it seems to me those are just read1 and read2 from a paired-end sequencing.

ADD REPLY
0
Entering edit mode

Presumably OP is cating R1/R2 files in a lane specific manner. It sounds like the tool just does not like having a sample run on multiple lanes.

ADD REPLY
0
Entering edit mode

could be indeed, though it does not show from the example ( if it were to be from different lanes files would be called _002 _003 and such )

likely not helping :) but I've done that dozens of times (= catting lanes together) never had any issue with it. Until we know which tool we're talking here we're just guessing I assume

ADD REPLY
0
Entering edit mode

the tool I am using is giving me an error

What kind of error?

ADD REPLY
0
Entering edit mode

error Some files in the fastq path are split by lane, while some are not. This is not allowed

ADD REPLY
0
Entering edit mode

If the tool does not expect samples to run in different lanes then you may have to treat the lane specific replicates as independent inputs. Or edit/replace the lane numbers so there is just one in all fastq headers.

What tool are we looking at here?

ADD REPLY
0
Entering edit mode

which tools are you using ? what is the error exactly ? and can you post the command here ?

ADD REPLY
0
Entering edit mode
4.0 years ago

The example file names you give have no lane numbers in them.

It sounds like you might be trying to do this:

cat Sample1-1_S13_R1_001.fastq Sample1-1_S13_R2_001.fastq > Sample1.fastq

This should yield a validly formated fastq, but I don't know of any software that expects to receive paired end data like this. Interleaved, sure some software wants that, but most software can deal with separate files, because that's the default of how Illumina outputs them.

If your files are split by size, doing this:

cat Sample1-1_S13_R1_001.fastq Sample1-1_S13_R1_002.fastq > Sample1.fastq

is probably a smart thing to do. Illumina bcl2fastq can be told to not split fastqs into chunks, but maybe whoever ran it for you didn't run it like that.

Note that you can also cat to fastq.gz files. That's fine.

In short, catting two fastqs together (assuming they are no truncated or somehow botched) should work. If it's not working for you, either your files are botched, or you really shouldn't be catting what you are catting.

ADD COMMENT

Login before adding your answer.

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