Hi! why it is better to use --very-sensitive than --very -sensitive-local in case of trimmed reads? Thank you in advance!
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?
3 answers
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.
It's not necessarily a question of "better" or not. When you perform adapter/quality trimming of reads, you're sidestepping a large part of the need for local alignment; however, even with adapter/quality trimming, local alignment can allow for "alignments in cases of structural rearrangements or variants at the end/start of reads" that might otherwise be penalized and lost in end-to-end alignment.
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: http://chipster.csc.fi/manual/bowtie2-paired-end.html
for more visit http://bowtie-bio.sourceforge.net/bowtie2/manual.shtml
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
Log in to answer this question.
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 ?
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).
okay. Thanks i got your point !!
Basically we are finding SNPs for clinical use, so which are the best parameters which will give best results to find correct SNPs?