SEQanswers

Go Back   SEQanswers > Bioinformatics > Bioinformatics



Similar Threads
Thread Thread Starter Forum Replies Last Post
bwa-mem and quality trimming nupurgupta Bioinformatics 0 07-16-2013 10:54 AM
bwa mem segfault; bwa bwasw breaks MarkDuplicates ElenaN Bioinformatics 2 06-30-2013 10:23 PM
Adapter trimming and trimming by quality question alisrpp Bioinformatics 5 04-08-2013 04:55 PM
bwa quality trimming and samtools rmdup greigite Bioinformatics 7 02-22-2013 03:22 AM
BWA errors after quality trimming flipwell Bioinformatics 3 05-21-2012 07:39 PM

Reply
 
Thread Tools
Old 06-09-2015, 12:25 AM   #1
shmibble
Member
 
Location: Israel

Join Date: May 2015
Posts: 23
Default Quality trimming with bwa-mem

Hi,
When using bwa-mem, is it necessary to use a different program for quality trimming prior to alignment? Since FASTX toolkit doesn't work with paired end reads I was thinking trimmomatic perhaps. But is this even necessary since bwa-mem has the -q flag for quality trimming?
And if I should use trimmomatic, how do I align the output with bwa-mem? Because as I understand it creates outputs for mapped reads and unmapped reads seperately.
Hope my question makes sense. I'm kinda new at this.

Thanks!
shmibble is offline   Reply With Quote
Old 06-09-2015, 12:58 AM   #2
dariober
Senior Member
 
Location: Cambridge, UK

Join Date: May 2010
Posts: 311
Default

For adapter and quality trimming in paired-end reads you can use cutadapt 1.8+:

For example:

Code:
cutadapt -a AGATCGGAAGAGC -A AGATCGGAAGAGC -q 15 -o fq1.trim.fq -p fq2.trim.fq fq1.fq fq2.fq
However, it's seems with bwa mem is not necessary to trim for quality. In fact it's not necessary to trim adapters either. I think the GATK guidelines do not recommend adapter & quality trimming.
dariober is offline   Reply With Quote
Old 06-09-2015, 01:13 AM   #3
shmibble
Member
 
Location: Israel

Join Date: May 2015
Posts: 23
Default

Thanks for the reply. So You're saying bwa mem should work better without trimming at all before using it?
shmibble is offline   Reply With Quote
Old 06-09-2015, 01:21 AM   #4
dariober
Senior Member
 
Location: Cambridge, UK

Join Date: May 2010
Posts: 311
Default

I haven't done any benchmark. Personally I do trim adapters and recently I do not quality trim. But yes, bwa mem should handle raw reads with adapters and bad quality ends "correctly" (...for some definition of correct!). Try aligning a bunch of reads with and without trimming and see what happens...
dariober is offline   Reply With Quote
Old 06-09-2015, 01:22 AM   #5
GenoMax
Senior Member
 
Location: East Coast USA

Join Date: Feb 2008
Posts: 6,888
Default

NGS aligners will work without trimming. As to whether they will work "better" that is hard to say. Most aligners will "soft"-clip reads (parts that don't align). That said you want to start with minimal (ideally none) extraneous sequence that does not belong to your sample when you start the analysis.

Trimmomatic/BBDuk.sh from BBMap suite are additional examples of trimming programs that will accept paired-end files and maintain the read order post trimming.
GenoMax is offline   Reply With Quote
Old 06-09-2015, 01:22 AM   #6
shmibble
Member
 
Location: Israel

Join Date: May 2015
Posts: 23
Default

Great. Will do. Thanks!
shmibble is offline   Reply With Quote
Old 06-09-2015, 09:27 AM   #7
Brian Bushnell
Super Moderator
 
Location: Walnut Creek, CA

Join Date: Jan 2014
Posts: 2,707
Default

I would always recommend adapter-trimming; adapter sequence at the ends of reads will never help you in mapping, and can only hurt. Quality-trimming is much more case-by-case, depending on your data quality, intended use, and specific software. I don't generally recommend it before mapping unless you have sufficiently low-quality data that it is reducing your mapping rate. Even low-quality bases can increase the ability to uniquely place a read, or to distinguish between substitutions and indels.
Brian Bushnell is offline   Reply With Quote
Reply

Tags
bwa mem, trimming, trimmomatic

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off




All times are GMT -8. The time now is 10:01 PM.


Powered by vBulletin® Version 3.8.9
Copyright ©2000 - 2019, vBulletin Solutions, Inc.
Single Sign On provided by vBSSO