matsen/pplacer — Issue #193: `rppr reclass` should suggest updated classifications
Author: matsen
Created: 2011-12-21 12:28:31+00:00
State: open

This extends the work done in #171.

This will only be done with taxids that are less specific than a given rank. The default should be species, but this should be specifiable through a `--max-rank` flag.

For every rank that is is less specific than the max-rank flag,
For every leaf that is not convex at that rank,

- say `orig_taxid` is the original taxid
- run `guppy infer` without the distance requirement, getting a new taxid `new_taxid`
- collect the following information into a CSV file:

- `seq_name`: the leaf sequence name
- `old_taxid`:
- `new_taxid`:
- `old_name`: the name corresponding to `old_taxid`
- `new_name`: the name corresponding to `new_taxid`
- `makes_convex`: does `new_taxid` sit inside the list of taxids that would make the tree convex
- `old_avg_dist`: what is the average distance from the leaf to leaves maintaining their classification of `old_taxid` after the convexify step
- `new_avg_dist`: what is the average distance from the leaf to leaves maintaining their classification of `new_taxid` after the convexify step
- `n_with_old`: number of sequences with the old taxid
- `n_nonconvex`: the number of the sequences with the old taxid that were called nonconvex by the convexify step