I built a protozoa kraken 2 database ("db1"), from which I further built two other databases ("db2" and "db3") by adding extra genomes in the Leishmania sub-genus*.
When comparing results obtained when analyzing sequencing data using these databases, I noticed a strange increase in the number of reads assigned to the Leishmania chagasi species (which is a terminal node in the taxonomy for both databases) when going from db2 to db3.
According to my superficial understanding of kraken, I didn't expect this to happen, because db3 was built using a higher diversity of genomes outside the L. chagasi species than db2. If I expected any effect, this should have reduced the number of k-mers that are found specifically in L. chagasi, because some of these k-mers in db2 could have been present in the new genomes added to db3.
This increase in analysis reports parallels an increase in the number of minimizers as reported by kraken2-inspect
. Below is a table comparing the kraken2-inspect
reports for db2 and db3.
I only show the lines corresponding to Leishmania subgenus and its parents.
Compared to the kraken2-inspect
output, I removed the taxid and re-ordered columns, for readability. nb_min
and nb_min_lvl
correspond to the number of minimizers reported on columns 2 and 3 of the kraken2-inspect
default output (See https://github.com/DerrickWood/kraken2/blob/master/docs/MANUAL.markdown#inspecting-a-kraken-2-databases-contents).
The line for L. chagasi is in bold, and shows a substantial increase (more than 20-fold) from 63874 minimizers in db2 to 1389504 in db3:
taxname | lvl | % (db2) | nb_min (db2) | nb_min_lvl (db2) | % (db3) | nb_min (db3) | nb_min_lvl (db3) |
---|---|---|---|---|---|---|---|
root | R | 100.0 | 228330589 | 0 | 100 | 254009353 | 0 |
cellular organisms | R1 | 100.0 | 228330589 | 0 | 100 | 254009353 | 0 |
Eukaryota | D | 100.0 | 228330589 | 4685 | 100 | 254009353 | 6669 |
Discoba | D1 | 23.4 | 53431766 | 0 | 31.14 | 79110530 | 0 |
Euglenozoa | P | 23.4 | 53431766 | 0 | 31.14 | 79110530 | 0 |
Kinetoplastea | C | 23.4 | 53431766 | 0 | 31.14 | 79110530 | 0 |
Metakinetoplastina | C1 | 23.4 | 53431766 | 0 | 31.14 | 79110530 | 0 |
Trypanosomatida | O | 23.4 | 53431766 | 0 | 31.14 | 79110530 | 0 |
Trypanosomatidae | F | 23.4 | 53431766 | 1645 | 31.14 | 79110530 | 2029 |
Leishmaniinae | F1 | 19.87 | 45358915 | 0 | 27.97 | 71037679 | 0 |
Leishmania | G | 19.87 | 45358915 | 259764 | 27.97 | 71037679 | 305088 |
Leishmania | G1 | 14.67 | 33503508 | 4587885 | 23.3 | 59182271 | 12771940 |
Leishmania donovani species complex | G2 | 3.61 | 8243592 | 6215217 | 5.01 | 12729716 | 1378715 |
Leishmania donovani | S | 0.63 | 1439307 | 1439307 | 3.71 | 9428437 | 8055955 |
Leishmania donovani Ld 2001 | S1 | 0.48 | 1207432 | 1207432 | |||
Leishmania donovani Ld 39 | S1 | 0.06 | 165050 | 165050 | |||
Leishmania chagasi | S | 0.03 | 63874 | 63874 | 0.55 | 1389504 | 1389504 |
Leishmania infantum | S | 0.23 | 525194 | 520206 | 0.21 | 533060 | 528882 |
Leishmania infantum JPCM5 | S1 | 0.0 | 4988 | 4988 | 0 | 4178 | 4178 |
Leishmania mexicana species complex | G2 | 4.39 | 10033887 | 4875993 | 4.18 | 10626363 | 5076482 |
Leishmania amazonensis | S | 1.22 | 2782684 | 2782684 | 1.23 | 3123079 | 3123079 |
Leishmania mexicana | S | 1.04 | 2375210 | 0 | 0.96 | 2426802 | 2191283 |
Leishmania mexicana MHOM/GT/2001/U1103 | S1 | 1.04 | 2375210 | 2375210 | 0.09 | 235519 | 235519 |
Leishmania martiniquensis | S | 3.44 | 8749402 | 8749402 | |||
Leishmania major species complex | G2 | 2.49 | 5691012 | 0 | 2.35 | 5980712 | 0 |
Leishmania major | S | 2.49 | 5691012 | 5634913 | 2.35 | 5980712 | 5350171 |
Leishmania major strain LV39c5 | S1 | 0.17 | 419323 | 419323 | |||
Leishmania major strain SD 75.1 | S1 | 0.08 | 192440 | 192440 | |||
Leishmania major strain Friedlin | S1 | 0.02 | 56099 | 56099 | 0.01 | 18778 | 18778 |
Leishmania tropica species complex | G2 | 1.89 | 4803669 | 0 | |||
Leishmania tropica | S | 1.89 | 4803669 | 4796954 | |||
Leishmania tropica L590 | S1 | 0 | 6715 | 6715 | |||
Leishmania aethiopica species complex | G2 | 2.17 | 4947132 | 0 | 1.39 | 3520469 | 0 |
Leishmania aethiopica | S | 2.17 | 4947132 | 0 | 1.39 | 3520469 | 3057668 |
Leishmania aethiopica L147 | S1 | 2.17 | 4947132 | 4947132 | 0.18 | 462801 | 462801 |
Viannia | G1 | 5.08 | 11595643 | 5588978 | 4.55 | 11550320 | 5553385 |
Leishmania braziliensis species complex | G2 | 1.33 | 3037436 | 0 | 1.19 | 3032336 | 0 |
Leishmania braziliensis | S | 1.33 | 3037436 | 0 | 1.19 | 3032336 | 0 |
Leishmania braziliensis MHOM/BR/75/M2904 | S1 | 1.33 | 3037436 | 3037436 | 1.19 | 3032336 | 3032336 |
Leishmania guyanensis species complex | G2 | 1.3 | 2969229 | 0 | 1.17 | 2964599 | 0 |
Leishmania panamensis | S | 1.3 | 2969229 | 2969229 | 1.17 | 2964599 | 2964599 |
My question: How is such an increase possible, when the only genomes added are outside the clade?
I don't know if this can help understanding what happens, but L. chagasi could actually be considered a sub-clade of L. infantum (chagasi is the descendant of infantum brought to the New world by European conquistadores), but in the NCBI taxonomy used to build the databases, they are sister S-level taxa within the G2 "L. donovani species complex" (together with the L. donovani species, that has two S1-level strains added in db3 compared to db2).
* Here is how I built the databases
kraken2-build --download-taxonomy --db protozoa
kraken2-build --download-library protozoa --db protozoa
cp -r protozoa db2
cp -r protozoa db3
mv protozoa db1
kraken2-build --build --threads 16 --db db1
# Download genomes
# Add genomes to db2 using `kraken2-build --add-to-library <genome>/*.fna --db db2`
kraken2-build --build --threads 16 --db db2
# Add even more genomes do db3 using `kraken2-build --add-to-library <genome>/*.fna --db db3`
kraken2-build --build --threads 16 --db db3