This is a test version of Biostars. For the public version, visit https://www.biostars.org.
Clarifying the meaning of Bowtie2's default alignment mode (noob question)

The default alignment mode of bowtie2 is "search for multiple alignments, report the best one".

As far as I understand this means that secondary and supplementary alignments will not be reported. Which means that

samtools view -f2304 sample_bowtie2Mapped.bam | wc -l

will always yield zero.

1) Is that correct?

2) How can multiple alignments be fetched nevertheless?

bowtie2

1 answer

Have the flags explained

samtools flags 2304
0x900   2304    SECONDARY,SUPPLEMENTARY

then -f means:

 -f INT   only include reads with all  of the FLAGs in INT present [0]

can an alignment be both secondary and supplementary at the same time? These are mutually exclusive terms.

If you wanted to include only the non-primary alignments and that you would need to do it in two steps.

First select the secondary, then the supplementary.

Log in to answer this question.