This is a test version of Biostars. For the public version, visit https://www.biostars.org.
Trimming pair end fastq files merged not interleaved

Hello,

I have a set of fastq files from BGI data that I want to trimm from adapters. They are paired end, but I don't have two files per library, but one: The forward and reverse reads are in the same fastq file, but not in an interleaved manner.

Since it is BGI data, I am going to work with SOAPnuke software. I have a command that I can work with for paired end data, but the synthax requires the forward and reverse files to be separated:

SOAPnuke filter -Q 2 -f $forward -r $reverse -1 $fastq_1 -2 $fastq_2 -C $out1 -D $out2 -o $OUT

Is it possible to trimm a merged non interleaved fastqfile?, maybe just declaring forward and reverse adapters, but just one file?

Even using other trimming probram, such as adapterremoval, or fastp, how would be the way of trimming adapters of paired end data present in a single non interleaved file?

Thank you in advance for any input that may help me solve this part of the process.

pair end trimming merged

1 answer

BBTools can de-interleave your file:

reformat.sh in=reads.fq out=r1.fq out2=r2.fq interleaved

Or you can just do your trimming with BBDuk instead, which accepts twin files or interleaved files:

bbduk.sh in=reads.fq out=trimmed.fq ref=adapters k=19 mink=9 ktrim=r hdist=1 tbo tpe interleaved

If your adapters are different than Illumina standard adapters you should to specify them. I've never worked with BGI data so I don't know. But, the "tbo" (trim by overlap) generally takes care of this anyway even if you don't know the adapter sequence. "tpe" (trim pairs evenly) is also a useful flag for adapter trimming because if adapter is detected at a certain position in one read, it should be at the same place in the paired read. I'm not aware of other adapter-trimming tools that offer these features; they allow more thorough trimming of paired files when processed together. I don't generally recommend processing your R1 and R2 files independently since that often results in disordered files or files with singletons, breaking the pairing.

Log in to answer this question.