SEQanswers

Go Back   SEQanswers > Bioinformatics > Bioinformatics



Similar Threads
Thread Thread Starter Forum Replies Last Post
How to get bwa to report one alignment per read or read pair golharam Bioinformatics 0 08-04-2015 08:51 AM
CIGAR inconsist with read length. Does Bowtie2 reedit read sequence? wisense Bioinformatics 5 05-26-2015 11:35 PM
Tools that report read count AND read names that map to genomic features. foolishbrat Bioinformatics 1 02-05-2014 12:21 AM
assemble single-read and paired-end read morning latte Bioinformatics 5 08-28-2013 11:09 AM

Reply
 
Thread Tools
Old 01-27-2016, 07:25 AM   #1
cbaudo
Member
 
Location: Missouri

Join Date: Jan 2013
Posts: 21
Default BOWTIE2: How to randomly map a read to single alignment when read is multimapping?

I want to keep only one alignment per read, so if a read maps equally well to several locations, one location should be chosen at random. Could you help me identify the option to use in Bowtie2 to execute this?

Thank you,
CB
cbaudo is offline   Reply With Quote
Old 01-27-2016, 07:31 AM   #2
GenoMax
Senior Member
 
Location: East Coast USA

Join Date: Feb 2008
Posts: 6,882
Default

Code:
 -k <int>           report up to <int> alns per read; MAPQ not meaningful
Does not explicit say that it would be a random location.

With BBMap you can specify ambig=random.
GenoMax is offline   Reply With Quote
Old 01-27-2016, 07:47 AM   #3
cbaudo
Member
 
Location: Missouri

Join Date: Jan 2013
Posts: 21
Default

Many thanks
cbaudo is offline   Reply With Quote
Old 01-27-2016, 08:17 AM   #4
cbaudo
Member
 
Location: Missouri

Join Date: Jan 2013
Posts: 21
Default

@GenoMax

Could you suggest a PacBio aligner that is capable of doing this as well?
cbaudo is offline   Reply With Quote
Old 01-27-2016, 08:29 AM   #5
GenoMax
Senior Member
 
Location: East Coast USA

Join Date: Feb 2008
Posts: 6,882
Default

You can use mapPacBio.sh from BBMap to align pacbio data (ambig=random should work there).

PacBio has blasr for alignment. It probably has an option to do what you want.
GenoMax is offline   Reply With Quote
Old 01-27-2016, 09:33 AM   #6
Roy
Member
 
Location: Sheffield, UK

Join Date: Oct 2009
Posts: 17
Default

-k 1 is not a good idea. From the manual: "Bowtie 2 does not "find" alignments in any specific order, so for reads that have more than N distinct, valid alignments, Bowtie 2 does not garantee that the N alignments reported are the best possible in terms of alignment score." So -k 1 will just report the first alignment it comes across, not the best one. This is almost certainly not what you want.

Actually the requested behaviour is the default - Bowtie2 reports the best alignment it can find, and if multiple equally-good alignments are found it picks one at random, and sets a low mapq score (as the alignment is not unique).

For blasr, you probably want the option -hitPolicy randombest.

BWA mem can also map PacBio reads (use the option -x pacbio). Like Bowtie2, the desired behaviour is the default.
Roy is offline   Reply With Quote
Reply

Tags
bowtie2 bowtie 2.0.0.7

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 08:12 AM.


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