bowtie2 icon indicating copy to clipboard operation
bowtie2 copied to clipboard

version 2.2.5 had almost opposite mapping results with version 2.3 or 2.4

Open ezioljj opened this issue 2 years ago • 6 comments

Hi,

#I used old version (2.2.5) for mapping, and I got around 90% overall alignment rate. However, when I used new version, I could only get overall alignment rate less than 0.1%. I used the same fastq files, index and commands, I would like to know if any fundamental changes between different version has led to this issue? (samtools version are same, version 1.9)

best regards

The following are detailed information:

**version:** 
2.2.5
**Command:** 
bowtie2 -p $CPU --local -x $ref -U ${path}/DNA_reads.${sample}.merged.fq | samtools view -Sbq 2 - > ./DNA.${sample}.bam
**Result:**
250000 reads; of these:
  250000 (100.00%) were unpaired; of these:
    27169 (10.87%) aligned 0 times
    37352 (14.94%) aligned exactly 1 time
    185479 (74.19%) aligned >1 times
89.13% overall alignment rate

**version:** 
2.3.4.3 and 2.4.5
**Command:** 
bowtie2 -p $CPU --local -x $ref -U ${path}/DNA_reads.${sample}.merged.fq | samtools view -Sbq 2 - > ./DNA.${sample}.bam
**Result:**
250000 reads; of these:
  250000 (100.00%) were unpaired; of these:
    249825 (99.93%) aligned 0 times
    120 (0.05%) aligned exactly 1 time
    55 (0.02%) aligned >1 times
0.07% overall alignment rate

ezioljj avatar Feb 28 '22 02:02 ezioljj

Hello,

Can you try adding --score-min G,1,10 to your command line when using v2.3 or later? Please let me know if this affects your alignment rate.

ch4rr0 avatar Mar 01 '22 17:03 ch4rr0

Hi,

#Thank you for this kind help, it worked. However, the mapping rate between v2.2 and v2.3 are different, here are detailed results:

v2.3:
250000 reads; of these:
  250000 (100.00%) were unpaired; of these:
    37118 (14.85%) aligned 0 times
    54109 (21.64%) aligned exactly 1 time
    158773 (63.51%) aligned >1 times
85.15% overall alignment rate

v2.2:
250000 reads; of these:
  250000 (100.00%) were unpaired; of these:
    27169 (10.87%) aligned 0 times
    37352 (14.94%) aligned exactly 1 time
    185479 (74.19%) aligned >1 times
89.13% overall alignment rate

#I would like to know why --score-min G,1,10 leads to this successful mapping in v2.3? and why v2.2 and v2.3 exhibited different mapping rate? Best regards,

Hello,

Can you try adding --score-min G,1,10 to your command line when using v2.3 or later? Please let me know if this affects your alignment rate.

ezioljj avatar Mar 04 '22 01:03 ezioljj

This change was highlighted in the release notes for v2.3.1

  * The default `--score-min` for `--local` mode is now `G,20,8`.
    That was the stated default in the documentation for a while,
    but the actual default was `G,0,10` for many versions.  Now the
    default matches the documentation and, we find, yields more
    accurate alignments than `G,0,10`

I wanted confirmation from you before letting the cat out of the bag.

ch4rr0 avatar Mar 04 '22 02:03 ch4rr0

This change was highlighted in the release notes for v2.3.1

  * The default `--score-min` for `--local` mode is now `G,20,8`.
    That was the stated default in the documentation for a while,
    but the actual default was `G,0,10` for many versions.  Now the
    default matches the documentation and, we find, yields more
    accurate alignments than `G,0,10`

I wanted confirmation from you before letting the cat out of the bag.

Thank you for this explanation. I stilll have one question, what is the actual meaning of the 1 in G,1,10, and what is the actual meaning of the 10. (in my case, the reads used for mapping ranged from 17-21 bp, which is very short).

best regards,

ezioljj avatar Mar 04 '22 02:03 ezioljj

From the manual:

Setting function options

Some Bowtie 2 options specify a function rather than an individual number or setting. In these cases the user specifies three parameters: (a) a function type F, (b) a constant term B, and (c) a coefficient A. The available function types are constant (C), linear (L), square-root (S), and natural log (G). The parameters are specified as F,B,A - that is, the function type, the constant term, and the coefficient are separated by commas with no whitespace. The constant term and coefficient may be negative and/or floating-point numbers.

For example, if the function specification is L,-0.4,-0.6, then the function defined is:

f(x) = -0.4 + -0.6 * x

If the function specification is G,1,5.4, then the function defined is:

f(x) = 1.0 + 5.4 * ln(x)

See the documentation for the option in question to learn what the parameter x is for. For example, in the case if the --score-min option, the function f(x) sets the minimum alignment score necessary for an alignment to be considered valid, and x is the read length.

ch4rr0 avatar Mar 04 '22 18:03 ch4rr0

From the manual:

Setting function options

Some Bowtie 2 options specify a function rather than an individual number or setting. In these cases the user specifies three parameters: (a) a function type F, (b) a constant term B, and (c) a coefficient A. The available function types are constant (C), linear (L), square-root (S), and natural log (G). The parameters are specified as F,B,A - that is, the function type, the constant term, and the coefficient are separated by commas with no whitespace. The constant term and coefficient may be negative and/or floating-point numbers.

For example, if the function specification is L,-0.4,-0.6, then the function defined is:

f(x) = -0.4 + -0.6 * x

If the function specification is G,1,5.4, then the function defined is:

f(x) = 1.0 + 5.4 * ln(x)

See the documentation for the option in question to learn what the parameter x is for. For example, in the case if the --score-min option, the function f(x) sets the minimum alignment score necessary for an alignment to be considered valid, and x is the read length.

Thank you very much for this kind and professional guidance.

ezioljj avatar Mar 08 '22 11:03 ezioljj