<p>I assume that the aligner uses terminology similar to <a href="https://en.wikipedia.org/wiki/Smith%E2%80%93Waterman_algorithm" rel="nofollow noreferrer">Smith-Waterman Alignment</a>.</p>
<p><em>[Can't quickly find an explainer elsewhere, so I might as well write it out here in full...]</em></p>
<p>In other words, each match attempt has a particular score threshold that needs to be passed for a match to be identified. This score is constructed based on a local alignment between the query and reference sequences, looking at the differences between the sequences. INDELs (i.e. insertions and deletions of any length) are treated separately from substitutions (i.e. single-base changes), because they represent different molecular processes. Using the KMA terminology and manual information, I would guess the following:</p>
<ul>
<li><code>-reward</code> - amount to add to the score when a single base in the alignment matches</li>
<li><code>-penalty</code> - amount to <em>add</em> to the score when a single base in the alignment does not match (note: this is usually a negative value)</li>
<li><code>-gapopen</code> - amount to add to the score when a gap (i.e. insertion or deletion) is formed in the alignment; usually negative</li>
<li><code>-gapextend</code> - amount to add to the score when a gap (i.e. insertion or deletion) is <em>extended</em> in the alignment (i.e. for each base greater than 1); usually negative</li>
<li><code>-mrs</code> - minimum read scoring threshold, normalised to the length of the alignment; if the total score is less than (this threshold multiplied by the alignment length), then the alignment is rejected as not being a match.</li>
</ul>
<p>Depending on the actual implementation of the algorithm, the <code>-gapextend</code> parameter may be added to the <code>-gapopen</code> parameter for the first base.</p>
<p>There also appears to be a <code>-per</code> option [reward for pairing reads] that seems important, but without more understanding of the precise algorithm, I don't know how it would be used.</p>
<p>Adjusting these values is typically used when changing the type of things being compared away from their expected values. For example, an algorithm might be designed to match a sequence from an individual to an accurate reference from that same species, whereas the actual match attempted might be a population mix from a related species. It's not particularly helpful to speculate on this in a StackExchange answer because there are so many different variables at play; if you have a specific context in which you're matching, please add that to your question.</p>

CC BY-SA 4.0
2024-08-09T10:18:49.357Z
thanks, I do have a slightly different question now. more general. thanks again
dim
CC BY-SA 4.0
2024-07-23T07:58:28.283Z
2024-07-23T07:58:28.283Z
gringer
<p>I am currently utilizing the KMA aligner developed by Clausen et al., as detailed in their BMC Bioinformatics article (<a href="https://bmcbioinformatics.biomedcentral.com/articles/10.1186/s12859-018-2336-6" rel="nofollow noreferrer">https://bmcbioinformatics.biomedcentral.com/articles/10.1186/s12859-018-2336-6</a>). Within the range of adjustable parameters (<a href="https://gensoft.pasteur.fr/docs/kma/1.3.4/KMAspecification.pdf" rel="nofollow noreferrer">https://gensoft.pasteur.fr/docs/kma/1.3.4/KMAspecification.pdf</a>), I have encountered the &quot;-reward &quot; setting, which is defined as the reward allocated for a nucleotide match, with the default value being 1.</p>
<p>Could someone please explain the implications of modifying this reward value? For instance, if the reward is increased from the default of 1 to 10, does this simply amplify the score for each nucleotide match by a factor of ten? Additionally, what are the practical reasons or scenarios in which adjusting this parameter would be beneficial?</p>
<p>Thank you for your insights.</p>

<phylogenetics>
What is the Impact of Adjusting the -reward Parameter in KMA Aligner?
# What is the Impact of Adjusting the -reward Parameter in KMA Aligner?

(Asked by: username_0 on 2024-07-22)

I am currently utilizing the KMA aligner developed by Clausen et al., as detailed in their BMC Bioinformatics article (<https://bmcbioinformatics.biomedcentral.com/articles/10.1186/s12859-018-2336-6>). Within the range of adjustable parameters (<https://gensoft.pasteur.fr/docs/kma/1.3.4/KMAspecification.pdf>), I have encountered the "-reward " setting, which is defined as the reward allocated for a nucleotide match, with the default value being 1.

Could someone please explain the implications of modifying this reward value? For instance, if the reward is increased from the default of 1 to 10, does this simply amplify the score for each nucleotide match by a factor of ten? Additionally, what are the practical reasons or scenarios in which adjusting this parameter would be beneficial?

Thank you for your insights.

**Tags:** phylogenetics

---

## 1 answers

### Answer by username_1 on 2024-07-23. Score: 1 | Accepted answer

I assume that the aligner uses terminology similar to [Smith-Waterman Alignment](https://en.wikipedia.org/wiki/Smith%E2%80%93Waterman_algorithm).

*[Can't quickly find an explainer elsewhere, so I might as well write it out here in full...]*

In other words, each match attempt has a particular score threshold that needs to be passed for a match to be identified. This score is constructed based on a local alignment between the query and reference sequences, looking at the differences between the sequences. INDELs (i.e. insertions and deletions of any length) are treated separately from substitutions (i.e. single-base changes), because they represent different molecular processes. Using the KMA terminology and manual information, I would guess the following:

* `-reward` - amount to add to the score when a single base in the alignment matches
* `-penalty` - amount to *add* to the score when a single base in the alignment does not match (note: this is usually a negative value)
* `-gapopen` - amount to add to the score when a gap (i.e. insertion or deletion) is formed in the alignment; usually negative
* `-gapextend` - amount to add to the score when a gap (i.e. insertion or deletion) is *extended* in the alignment (i.e. for each base greater than 1); usually negative
* `-mrs` - minimum read scoring threshold, normalised to the length of the alignment; if the total score is less than (this threshold multiplied by the alignment length), then the alignment is rejected as not being a match.

Depending on the actual implementation of the algorithm, the `-gapextend` parameter may be added to the `-gapopen` parameter for the first base.

There also appears to be a `-per` option [reward for pairing reads] that seems important, but without more understanding of the precise algorithm, I don't know how it would be used.

Adjusting these values is typically used when changing the type of things being compared away from their expected values. For example, an algorithm might be designed to match a sequence from an individual to an accurate reference from that same species, whereas the actual match attempted might be a population mix from a related species. It's not particularly helpful to speculate on this in a StackExchange answer because there are so many different variables at play; if you have a specific context in which you're matching, please add that to your question.

> **Comments:**
> **username_0**: thanks, I do have a slightly different question now. more general. thanks again  

---

