Question: Use Bowtie to trim reads in fastq files
0
gravatar for Jackie
2.7 years ago by
Jackie70
United States
Jackie70 wrote:

I usually use Bowtie as an aligner, but I wonder whether I can use Bowtie as a trimmer as well?

I tried the below command line: bowtie <bowtie_index> -1 read1.fastq -2 read2.fastq --trim5 2 --un unaligned --al aligned > aligned.bam

I wanted bowtie to trim the first 2bps at the 5prime end, and output the unaligned the reads to unliagned_1.fastq and unaligned_2.fastq, and I would use unaligned_1.fastq and unaligned_2.fastq for downstream analysis, but seems the reads in unaligned_1.fastq and unaligned_2.fastq are the same with the original ones (first 2bp at 5prime are still there).

Can someone tell whether and how bowtie can be used as a trimmer and output the trimmed reads to a fastq file?

Thanks,

bowite trim • 1.4k views
ADD COMMENTlink modified 2.7 years ago by Brian Bushnell16k • written 2.7 years ago by Jackie70
2

Right tool for the right job. You can't use it as a general purpose trimmer as you have discovered.

ADD REPLYlink modified 2.7 years ago • written 2.7 years ago by genomax73k
0
gravatar for Brian Bushnell
2.7 years ago by
Walnut Creek, USA
Brian Bushnell16k wrote:

As Genomax indicated, no, you can't use an aligner as a trimmer. I'd recommend BBDuk for this purpose:

bbduk.sh in1=read1.fastq in2=read2.fastq out1=trimmed1.fastq out2=trimmed2.fastq ftl=2
ADD COMMENTlink modified 2.7 years ago • written 2.7 years ago by Brian Bushnell16k
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: 1733 users visited in the last hour