Skip to content

Commit

Permalink
Small correction of recipe in docs
Browse files Browse the repository at this point in the history
  • Loading branch information
gregdenay authored Jun 15, 2024
1 parent d7b4def commit c3e491e
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions docs/recipes/verify_blast.md
Original file line number Diff line number Diff line change
Expand Up @@ -119,10 +119,12 @@ we can simply check wether the agreement rank in either of 'genus' or 'species':

Of course it is possible to follow a similar approach without normalizing the taxonomy. It is however
slightly more complicated. For example checking wether *Bos taurus* (9913) consensus (here genus) is
under the genus level involves determining the correpsonding expected node as before with the unnormalized taxonomy.
under the genus level involves determining the correpsonding expected node with the unnormalized taxonomy.
The trick here is to calculate the distance to the last common ancestor so that different branches length
don't bias the analysis:

``` py
distances = [tax.distance(9913, e) for e in expected]
distances = [tax.distance(9913, tax.lca(9913, e)) for e in expected]
index_corr = distances.index(min(distances))
agreement = expected[index_corr]
```
Expand Down

0 comments on commit c3e491e

Please sign in to comment.