Use Bowtie to trim reads in fastq files
1
0
Entering edit mode
7.3 years ago
Jackie ▴ 70

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 • 2.9k views
ADD COMMENT
2
Entering edit mode

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

ADD REPLY
0
Entering edit mode
7.3 years ago

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 COMMENT

Login before adding your answer.

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