Question: Bowtie2 parameters for best alignment
gravatar for cvu
5.0 years ago by
cvu140 wrote:

I'm using Bowtie2 for mapping reads to human genome. i'm using Bowtie2 first time, so what are the best parameters to set if we are using these mapping results to further use to detect SNPs? bowtie2 has also given some preset options. which is more appropriate for finding SNPs from alignment results.

Which one is more appropriate local or end-to-end mode? if my purpose of alignment is SNP detection?

snp blog alignment assembly genome • 15k views
ADD COMMENTlink modified 13 months ago by saraholiver3070 • written 5.0 years ago by cvu140

Thank you Devon Ryan for reply. i want to ask you one more thing that, right now i am not focusing on the sequence assembly. just mapping reads to find SNPs, so local mode is more appropriate ?

ADD REPLYlink written 5.0 years ago by cvu140

My reply neither mentioned nor had even the remotest thing to do with sequence assembly, so I'm not sure why you're even mentioning it. As I mentioned in my reply, using local alignment will often give a bit better results, since end-to-end alignment won't work well when variants occur at the end of reads (whereas local alignment will just soft-clip these sequences).

ADD REPLYlink written 5.0 years ago by Devon Ryan90k

okay. Thanks i got your point !!

ADD REPLYlink written 5.0 years ago by cvu140
gravatar for Devon Ryan
5.0 years ago by
Devon Ryan90k
Freiburg, Germany
Devon Ryan90k wrote:

Just use one of the presets, likely either --very-sensitive or --very-sensitive-local. If you've not trimmed the reads (or just trimmed off adapters), then you should use local alignment. If, however, you've adapter & quality trimmed the reads, then using end-to-end alignment would seem more relevant. Realistically speaking, you should get very similar results (from variant calling) regardless. In general, local alignment will sometimes give a bit better results, since you can still get alignments in cases of structural rearrangements or variants at the end/start of reads.

ADD COMMENTlink modified 5.0 years ago • written 5.0 years ago by Devon Ryan90k

Hi! why it is better to use --very-sensitive than --very -sensitive-local in case of trimmed reads? Thank you in advance!

ADD REPLYlink written 22 months ago by noeD70
gravatar for Medhat
5.0 years ago by
Medhat8.3k wrote:

After what Devon say about trimming 

What I am using 

    $BT2_HOME/bowtie2 --local -x specious -U $BT2_HOME/example/reads/longreads.fq -S eg.sam

-U Comma-separated list of files containing unpaired reads to be aligned, e.g. lane1.fq,lane2.fq,lane3.fq,lane4.fq. Reads may be a mix of different lengths. If - is specified, bowtie2 gets the reads from the "standard in" or "stdin" filehandle.

-x The basename of the index for the reference genome. The basename is the name of any of the index files up to but not including the final .1.bt2 / .rev.1.bt2 / etc. bowtie2 looks for the specified index first in the current directory, then in the directory specified in the BOWTIE2_INDEXES environment variable.

-S File to write SAM alignments to. By default, alignments are written to the "standard out" or "stdout" filehandle (i.e. the console).

If your data not indexed use

    $BT2_HOME/bowtie2-build -f ~/path/to/your/genome.fa ~/where/you want/index/to/be/nameOfTheIndex


summary of the parameters :

for more visit

ADD COMMENTlink modified 2.9 years ago • written 5.0 years ago by Medhat8.3k

Seems reasonable. I should have noted in my reply that the --sensitive settings, such as is used with --local, sometimes give better results than the --very-sensitive/--very-sensitive-local settings.

ADD REPLYlink written 5.0 years ago by Devon Ryan90k

I think may be some times we need to use different approaches 


ADD REPLYlink written 5.0 years ago by Medhat8.3k

when medhat says "-s" but he means "-S". "-s" the lowercase will not output a file.

ADD REPLYlink written 2.9 years ago by michaelotte10

In the command I wrote S but in my discussion I wrote it s I will correct it thank you.

ADD REPLYlink written 2.9 years ago by Medhat8.3k
gravatar for Lakshman Teja
13 months ago by
Lakshman Teja30 wrote:

First, you have to build a database, similar to how blast works. This is done by writing:

user@ubuntu$ bowtie2-build -f file.fasta dbname

This will build a database for the "file.fasta" file with the prefix "dbname".

To then run the bowtie2 analysis, you need to declare the database, forward and reverse libraries and what type of output (-S for .sam file). If you want to use multiple cores per analysis, use the -p <number of="" cores=""> flag. You can also added an argument to disregard unaligned reads to save space. The command for the running the bowtie2 mapping analysis is:

user@ubuntu$ bowtie2 -x dbname -1 read1.fastq -2 read2.fastq -S <outputfile.sam> --no-unal

ADD COMMENTlink written 13 months ago by Lakshman Teja30
Please log in to add an answer.


Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 2.3.0
Traffic: 1623 users visited in the last hour