This is a test version of Biostars. For the public version, visit https://www.biostars.org.
Aligning using Bowtie2

I am using Bowtie2 to align the reads to lambda_virus genome using the following command.

./bowtie2 -x lambda_virus -U example/reads/reads_1.fq -S eg1.sam

It shows following output in the console i.e.

    10000 reads; of these:
       10000 (100.00%) were unpaired; of these:
        596 (5.96%) aligned 0 times
        9404 (94.04%) aligned exactly 1 time
        0 (0.00%) aligned >1 times
    94.04% overall alignment rate

I want to relax the edit distance parameter so that each and every read can get aligned. Can somebody suggest how to do it in bowtie. Also i want the set of reads that get perfectly aligned with 0 edit distance. How to do that in bowtie. I tried reading the manual but it is using all the biological definitions and i am myself from computer science background.

Thanks in advance,

alignment bowtie2

If you want to align all reads, I suggest you use BBMap, which is a more sensitive aligner, with the "slow" flag. BBMap also can give you the perfectly aligned reads like this:

bbmap.sh ref=lambda.fa in=reads.fq outm=mapped.sam perfectmode

But, it's possible that the reads that don't align are not aligning for a reason. They might not be from Lambda, for example. Or, you might need to do adapter-trimming first.

1 answer

bowtie2 has very stringent alignment parameters. However you can control them a bit via the D, R N, L and i options. Try to set N to a higher value

@Carambakaracho Max value that i can set for N is 1. Is there any other possible way ? Description for -N <int>- Sets the number of mismatches to allowed in a seed alignment during multiseed alignment. Can be set to 0 or 1. Setting this higher makes alignment slower (often much slower) but increases sensitivity. Default: 0.

@kshitijtayal ok, I never tried it myself, the description suggests that values beyond 1 might be possible. In case reducing the seed length toghether with allowing mismatches is not successful, give Brian Bushnell's suggestion BBMap a try

Log in to answer this question.