microbiome / mia

Microbiome analysis
https://microbiome.github.io/mia/
Artistic License 2.0
46 stars 27 forks source link

Faith bugfix #447

Closed TuomasBorman closed 11 months ago

TuomasBorman commented 11 months ago

There were some special cases where Faith index was not working. For example, 1) if no taxa was present in a sample or 2) if taxon was not found from tree tip but from internal node.

I simplified the code. Now if taxa is present, pruning is done for the tree one layer at the time until all tips can be found from the TreeSE rows. This ensures that taxon, that was initially in internal node, is not lost. Faith is calculated directly from pruned tree.

antagomir commented 11 months ago

OK!

However it will be good to make clear in manpage @details how those cases are treated. If the internal node thing has alternative solutions, it would be good to mention them briefly - for instance just discarding such cases could be an option? (and even give an example on how to do that in case user prefers that).

TuomasBorman commented 11 months ago

Added