bowtie2
bowtie2 copied to clipboard
preset parameters not overridden
According to the manual:
As of Bowtie2 v2.4.0, individual preset values can be overridden by providing the specific options e.g. the configured seed length of 20 in the [--very-senitive] preset above can be changed to 25 by also specifying the -L 25 parameter anywhere on the command line.
At least in v2.4.5, this doesn't seem to be the case. Whenever I specify a preset, the output is identical regardless of whether any of the individual parameters (-D
, -R
, -N
, -L
, -i
) are explicitly modified or not; this seems to be true regardless of whether they are specified before or after the preset (see https://github.com/BenLangmead/bowtie2/issues/242; as shown above, the manual says the individual parameters can be specified 'anywhere on the command line' i.e. they should always take precedence over the preset options).
Explicitly specifying every one of the parameters -D
, -R
, -N
, -L
, -i
without specifying a preset seems to produce the expected output, including recapitulating any preset. So they work; it's just that the presets seem to take precedence, rather than the other way around.
We made an attempt to fix this by having specific parameters override the presets if specified later on the command line. I however forgot to remove some old code, so the change did seem to take effect. I've cleaned up the code in the bug_fixes
branch to resolve this. Here's an example:
/bowtie2 $ ./bowtie2-align-s -x example/index/lambda_virus example/reads/longreads.fq --very-sensitive -L30 --verbose -u1
Applying preset: 'very-sensitive' using preset menu 'V0'
Final policy string: 'SEED=0;SEEDLEN=20;DPS=20;ROUNDS=3;IVAL=S,1,0.50;SEEDLEN=30'
Input bt2 file: "example/index/lambda_virus"
...
As seen in the above output "SEEDLEN=30" gets specified later in the "Final policy string" which will cause the initial value of "SEEDLEN=20" to be overridden during parsing.
Feel free to give this a go and let me know if this fits your use-case.
FYI -- this change is already available in production.