trimming more than two paired mates
0
0
Entering edit mode
5.0 years ago
igor 12k

All read trimmer work on single-end FASTQs. Most support paired-end FASTQs (both input mates must pass filters to be in output). Is there a trimmer that supports more than two mates (yes, it's possible to have more than just R1 and R2)?

If not, what would be the simplest way to perform quality trimming and still keep the same clusters in the same order across multiple FASTQs?

trim fastq • 1.1k views
1
Entering edit mode

BBDuk's "ordered" flag will keep all output reads in the input order. And if you set "minlen=0" it will not discard any reads; rather they will be trimmed to a minimum length of 1. For example:

bbduk.sh in=reads.fq out=trimmed.fq minlen=0 qtrim=r trimq=15 ordered


0
Entering edit mode

Wait how do you get more than 2 read directions? Or did I misunderstood something?

0
Entering edit mode

For example, you can have R1, R2, and index read. Each one belongs to the same cluster and each one is a separate read.

0
Entering edit mode

Out of curiosity, why do you want a separate file containing the index reads? Usually those just get moved into the read names and no file with them written.

0
Entering edit mode

Sometimes tools require that. For example, QIIME.

0
Entering edit mode

Why is the order important (out of curiosity) and are you worried about keeping the order in the tag/barcode file?

@Brian suggested an alternative but that would leave some reads with at least 1 base in them. Probably not the solution you want. Since this is a special case you may need to code something yourself to bring the barcode file in sync after R1/R4 (if R2/R3 are you index reads for a 2D run) are trimmed.

0
Entering edit mode

I've run into errors with aligners before when reads weren't in the same order, so I'd rather not risk it.

0
Entering edit mode

If you use bbduk.sh then order of R1/R2 is maintained after trimming.