This is a test version of Biostars. For the public version, visit https://www.biostars.org.
How to trim both pair end reads and remove low quality reads

I do have pair end amplicon data but it looks like data is very poor quality. I want to trim these reads from both end 10bp and also want to remove low quality reads both R1 and R2. so that at the end no. of pair reads should be same in both files.

currently, I used fastx trimmer and fastx quality filter, but they only take one read file R1 or R2 at a time.

How I can give both file as input for trim and quality filter so that at end R1 and R1 contain high quality reads pair.

I want to trim 10bp from both ends.

Pair end reads path: /users/amplicon_data/ITS

multiple pair end read file name:

Soil-6_S22_L001_R1_001.fastq

Soil-6_S22_L001_R2_001.fastq

Soil-7_S32_L001_R1_001.fastq

Soil-7_S32_L001_R2_001.fastq

Soil-8_S32_L001_R1_001.fastq

Soil-8_S32_L001_R2_001.fastq

Soil-9_S42_L001_R1_001.fastq

Soil-9_S42_L001_R2_001.fastq

thanks

next-gen

Fastx is very old and not designed to properly handle paired-end data. Recent alternatives skewer, trimmomatic, fastp, cutadapt, bbduk and many more. Please use the search function for more threads

Trim Galore! is another option, which can run Cutadapt and FastQC at the same time / concurrently.

And how poor is "very poor"?

1 answer

I use Trimmomatic frequently, it's pretty easy to use. Look at the manual, the default options are a good place to start

example command:

java -jar /home/folder.../Trimmomatic-0.38/trimmomatic-0.38.jar PE -threads 4 $Reads1 $Reads2 $sample.hq.1.fastq $sample.unpaired.1.fastq $sample.hq.2.fastq $sample.unpaired.2.fastq LEADING:10 TRAILING:10 SLIDINGWINDOW:4:30 MINLEN:50 ;

And loop through your files for $Reads 1 and $Reads2 where $Reads1 is for R1 etc...

Log in to answer this question.