microbiome / mia

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

addHierarchyTree replaces existing tree #498

Open TuomasBorman opened 4 months ago

TuomasBorman commented 4 months ago

Currently, addHierarchyTree (addTaxonomyTree) replaces existing tree. Consider adding option for adding tree instead of replacing.

Daenarys8 commented 1 month ago

should we implement an addTree option to append the rowTree and colTree slots ?

TuomasBorman commented 1 month ago

Maybe there could be name parameter. By default, it could be "phylo". Then you could check if a tree named "phylo" is already existing and give warning if it is.

The created internal function could follow this structure https://github.com/microbiome/mia/blob/b627edce620807af20d3ed85c6667f4b8ef8f2ea/R/utils.R#L310. Also take into account the MARGIN in this internal function .