Answers.Body: <p>Aln score - is the Needlman-Wunsch score for every single read.</p>
  <p>For clarity, let’s say we have multiple reads (the one on the figure is just one of the many) with individual alignment scores like this (for example):</p>
  <ul>
  <li>95, 95, 95, 95, 95</li>
  <li>94, 94, 94, 94, 94</li>
  <li>93, 93, 93, 93</li>
  <li>85</li>
  </ul>
  <p>(all of them for template number 1)</p>
  <p>Summing these alignment scores for a template would yield:
  95 x 5 + 94 x 5 + 93 x 4 + 85 = 1402</p>
  <p>Yes, the ConClave score is a measure of the combined alignment quality for each template.</p>
  <p>The Depth here is the average number of times a template has been covered, so yes that is directly influenced by the length of the template.</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2024-07-29T09:56:03.040Z
Answers.LastActivityDate: 2024-07-30T09:53:51.860Z
Answers.LastEditDate: 2024-07-30T09:53:51.860Z
Answers.UserDisplayName: dim
Body: <p>I am currently analyzing my nanopore metagenomic sequencing data. After demultiplexing and trimming, I am using the KMA (k-mer alignment) aligner by Clausen et al. (<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>). Utilizing the ResFinder database, I obtain a results table that looks like the following:</p>
  <pre><code>Template,Score,Expected,Template_length,Template_Identity,Template_Coverage,Query_Identity,Query_Coverage,Depth,q_value,p_value
  aph(6)-Id_1_M28829,5209,41,837,100.00,100.00,100.00,100.00,6.75,5085.53,1.E-26
  aph(3'')-Ib_4_AF313472,6069,39,804,99.88,100.00,99.88,100.00,7.79,5950.52,1.E-26
  ant(3'')-Ia_1_X02340,3257,48,972,89.71,100.00,89.71,100.00,2.73,3113.99,1.E-26
  aadA6_1_AF140629,3582,42,846,99.05,100.00,99.05,100.00,2.21,3457.15,1.E-26
  blaOXA-397_1_KM087865,1507,42,843,96.92,100.00,96.92,100.00,1.90,1384.40,1.E-26
  blaOXA-541_1_FM179467,1767,41,828,98.31,100.00,98.31,100.00,1.72,1645.96,1.E-26
  blaOXA-10_1_J03427,3129,40,801,100.00,100.00,100.00,100.00,4.00,3010.77,1.E-26
  blaOXA-119_1_DQ767903,2112,40,801,97.75,100.00,97.75,100.00,2.15,1994.34,1.E-26
  blaOXA-129_1_FJWZ01000025,805,40,804,89.43,100.00,89.43,100.00,2.13,691.14,1.E-26
  blaOXA-205_1_JF800667,1725,40,801,100.00,100.00,100.00,100.00,2.27,1607.86,1.E-26
  blaOXA-372_1_KJ746496,892,39,774,91.99,100.00,91.99,100.00,1.99,781.48,1.E-26
  cfxA4_1_AY769933,2055,48,966,99.59,100.00,99.59,100.00,1.95,1913.93,1.E-26
  blaOXA-20_2_AF024602,5683,39,801,99.88,100.00,99.88,100.00,7.71,5564.87,1.E-26
  erm(F)_3_M17808,19645,37,801,99.63,100.00,99.63,100.00,27.24,19531.66,1.E-26
  msr(E)_1_FR751518,4836,73,1476,99.12,100.00,99.12,100.00,2.96,4620.04,1.E-26
  mph(A)_2_U36578,1881,46,921,98.26,100.00,98.26,100.00,2.00,1746.60,1.E-26
  mph(B)_1_D85892,1103,45,909,84.82,100.00,84.82,100.00,1.25,972.91,1.E-26
  sul1_5_EU780013,3831,43,867,99.77,100.00,99.77,100.00,5.15,3703.07,1.E-26
  sul2_2_AY034138,3784,40,816,99.51,100.00,99.51,100.00,4.39,3663.50,1.E-26
  tet(C)_3_AF055345,5899,59,1191,99.58,100.00,99.58,100.00,5.04,5724.18,1.E-26
  tet(Q)_1_L33696,2186,96,1926,84.48,100.00,84.48,100.00,2.51,1912.27,1.E-26
  tet(X)_2_M37699,13319,56,1167,99.83,100.00,99.83,100.00,11.26,13150.69,1.E-26
  tet(X6)_1_MN507533,2091,57,1137,97.36,100.00,97.36,100.00,2.00,1925.77,1.E-26
  </code></pre>
  <p>I understand that the &quot;Score&quot; column represents the ConClave score described in the paper, which measures the combined alignment quality for each template. I am trying to understand the relationship between &quot;Depth&quot; (which appears to be the relative depth and is described in the official documentation as the depth of coverage of the template) and &quot;Template_length.&quot;</p>
  <p>According to the paper, the ConClave score requires that all best-matching templates are initially accepted for all best-matching query sequences. The alignment scores obtained are then summed together for each template candidate to form the ConClave score, thereby reflecting a maximum score for each template.</p>
  <p><a href="https://i.sstatic.net/oJzCgokA.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/oJzCgokA.png" alt="{picture of scoring part}" /></a></p>
  <p>My questions are as follows:</p>
  <ol>
  <li>What exactly are these &quot;alignment scores obtained&quot;? Specifically, where does the Aln Score of 95 come from, and how is it calculated?</li>
  <li>How are these alignment scores summed to produce the ConClave scores, such as 1402 or 989?</li>
  <li>Can I rely on the &quot;Score&quot; column to confirm the reliability of my list of genes?</li>
  </ol>
  <p>From my understanding, columns 5, 6, and 9 in the .res file contain the template identity (Template_Identity), coverage (Template_Coverage), and depth (Depth), which are good indicators of gene presence/absence. However, I am unclear on how the Score reflects the gene list and if there is any relationship between depth, template length, and the Score numbers.</p>
  <p>Any insights or explanations on these points would be greatly appreciated. Thank you!</p>
  <p>It looks like it is possible to use on nanopore reads (<a href="https://academic.oup.com/jac/article/75/12/3491/5890997" rel="nofollow noreferrer">https://academic.oup.com/jac/article/75/12/3491/5890997</a>) though the primary question of how exactly this ConClave is calculated remains. In fact, it is explicitly noted on an official page of kma: <a href="https://bitbucket.org/genomicepidemiology/kma/src/master/" rel="nofollow noreferrer">https://bitbucket.org/genomicepidemiology/kma/src/master/</a>
  &quot;It works for long low quality reads as well, such as those from Nanopore.&quot;</p>
  <p>What is this &quot;Aln Score&quot; of 95 and how is it related to, say ConClave score of 1402? Is 95 just a single query score aligned with a template 1 or all four templates?</p>
  
Tags: <phylogenetics><metagenome>
Title: Understanding the Relationship Between ConClave Score, Depth, and Template Length in KMA Aligner Results
ThreadText: # Understanding the Relationship Between ConClave Score, Depth, and Template Length in KMA Aligner Results
  
  (Asked by: username_0 on 2024-07-19)
  
  I am currently analyzing my nanopore metagenomic sequencing data. After demultiplexing and trimming, I am using the KMA (k-mer alignment) aligner by Clausen et al. (<https://bmcbioinformatics.biomedcentral.com/articles/10.1186/s12859-018-2336-6>). Utilizing the ResFinder database, I obtain a results table that looks like the following:
  
  ```
  Template,Score,Expected,Template_length,Template_Identity,Template_Coverage,Query_Identity,Query_Coverage,Depth,q_value,p_value
  aph(6)-Id_1_M28829,5209,41,837,100.00,100.00,100.00,100.00,6.75,5085.53,1.E-26
  aph(3'')-Ib_4_AF313472,6069,39,804,99.88,100.00,99.88,100.00,7.79,5950.52,1.E-26
  ant(3'')-Ia_1_X02340,3257,48,972,89.71,100.00,89.71,100.00,2.73,3113.99,1.E-26
  aadA6_1_AF140629,3582,42,846,99.05,100.00,99.05,100.00,2.21,3457.15,1.E-26
  blaOXA-397_1_KM087865,1507,42,843,96.92,100.00,96.92,100.00,1.90,1384.40,1.E-26
  blaOXA-541_1_FM179467,1767,41,828,98.31,100.00,98.31,100.00,1.72,1645.96,1.E-26
  blaOXA-10_1_J03427,3129,40,801,100.00,100.00,100.00,100.00,4.00,3010.77,1.E-26
  blaOXA-119_1_DQ767903,2112,40,801,97.75,100.00,97.75,100.00,2.15,1994.34,1.E-26
  blaOXA-129_1_FJWZ01000025,805,40,804,89.43,100.00,89.43,100.00,2.13,691.14,1.E-26
  blaOXA-205_1_JF800667,1725,40,801,100.00,100.00,100.00,100.00,2.27,1607.86,1.E-26
  blaOXA-372_1_KJ746496,892,39,774,91.99,100.00,91.99,100.00,1.99,781.48,1.E-26
  cfxA4_1_AY769933,2055,48,966,99.59,100.00,99.59,100.00,1.95,1913.93,1.E-26
  blaOXA-20_2_AF024602,5683,39,801,99.88,100.00,99.88,100.00,7.71,5564.87,1.E-26
  erm(F)_3_M17808,19645,37,801,99.63,100.00,99.63,100.00,27.24,19531.66,1.E-26
  msr(E)_1_FR751518,4836,73,1476,99.12,100.00,99.12,100.00,2.96,4620.04,1.E-26
  mph(A)_2_U36578,1881,46,921,98.26,100.00,98.26,100.00,2.00,1746.60,1.E-26
  mph(B)_1_D85892,1103,45,909,84.82,100.00,84.82,100.00,1.25,972.91,1.E-26
  sul1_5_EU780013,3831,43,867,99.77,100.00,99.77,100.00,5.15,3703.07,1.E-26
  sul2_2_AY034138,3784,40,816,99.51,100.00,99.51,100.00,4.39,3663.50,1.E-26
  tet(C)_3_AF055345,5899,59,1191,99.58,100.00,99.58,100.00,5.04,5724.18,1.E-26
  tet(Q)_1_L33696,2186,96,1926,84.48,100.00,84.48,100.00,2.51,1912.27,1.E-26
  tet(X)_2_M37699,13319,56,1167,99.83,100.00,99.83,100.00,11.26,13150.69,1.E-26
  tet(X6)_1_MN507533,2091,57,1137,97.36,100.00,97.36,100.00,2.00,1925.77,1.E-26
  
  ```
  
  I understand that the "Score" column represents the ConClave score described in the paper, which measures the combined alignment quality for each template. I am trying to understand the relationship between "Depth" (which appears to be the relative depth and is described in the official documentation as the depth of coverage of the template) and "Template\_length."
  
  According to the paper, the ConClave score requires that all best-matching templates are initially accepted for all best-matching query sequences. The alignment scores obtained are then summed together for each template candidate to form the ConClave score, thereby reflecting a maximum score for each template.
  
  [![{picture of scoring part}](https://i.sstatic.net/oJzCgokA.png)](https://i.sstatic.net/oJzCgokA.png)
  
  My questions are as follows:
  
  1. What exactly are these "alignment scores obtained"? Specifically, where does the Aln Score of 95 come from, and how is it calculated?
  2. How are these alignment scores summed to produce the ConClave scores, such as 1402 or 989?
  3. Can I rely on the "Score" column to confirm the reliability of my list of genes?
  
  From my understanding, columns 5, 6, and 9 in the .res file contain the template identity (Template\_Identity), coverage (Template\_Coverage), and depth (Depth), which are good indicators of gene presence/absence. However, I am unclear on how the Score reflects the gene list and if there is any relationship between depth, template length, and the Score numbers.
  
  Any insights or explanations on these points would be greatly appreciated. Thank you!
  
  It looks like it is possible to use on nanopore reads (<https://academic.oup.com/jac/article/75/12/3491/5890997>) though the primary question of how exactly this ConClave is calculated remains. In fact, it is explicitly noted on an official page of kma: <https://bitbucket.org/genomicepidemiology/kma/src/master/>
  "It works for long low quality reads as well, such as those from Nanopore."
  
  What is this "Aln Score" of 95 and how is it related to, say ConClave score of 1402? Is 95 just a single query score aligned with a template 1 or all four templates?
  
  **Tags:** phylogenetics, metagenome
  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_0 on 2024-07-29. Score: 2 | Accepted answer
  
  Aln score - is the Needlman-Wunsch score for every single read.
  
  For clarity, let’s say we have multiple reads (the one on the figure is just one of the many) with individual alignment scores like this (for example):
  
  * 95, 95, 95, 95, 95
  * 94, 94, 94, 94, 94
  * 93, 93, 93, 93
  * 85
  
  (all of them for template number 1)
  
  Summing these alignment scores for a template would yield:
  95 x 5 + 94 x 5 + 93 x 4 + 85 = 1402
  
  Yes, the ConClave score is a measure of the combined alignment quality for each template.
  
  The Depth here is the average number of times a template has been covered, so yes that is directly influenced by the length of the template.
  
  
  ---
  
  