-
Notifications
You must be signed in to change notification settings - Fork 27
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add tree collapse to subsetByPrevalentTaxa and other related methods #198
Comments
Good suggestion, but the wrong package. The However, this subject was brought up before: markrobinsonuzh/TreeSummarizedExperiment#34 edit: The summary of the discussion in that thread: Mutliple rows can be linked to a leaf. Therefore, automatic trimming is not really an option
We discussed this at some point on slack and you convinced me add some of the subset functions as a legacy function matching phyloseq functionality. I am happy to remove them. |
How about providing an option to collapse the tree (default FALSE)? I assume that this is possible in many practical cases. And when it is not, the function could provide error and an informative message that informs the user that it is not possible to collapse the tree due to the above mentioned reason? Or I could suggest to add this to TreeSE |
@TuomasBorman it seems to me that this has already been dealt with in the current updated methods? |
Hmm is this one ready? |
Will be fixed by this #656 and this microbiome/OMA#633. |
Feature subsetting methods include at least
subsetByRareTaxa
andsubsetByPrevalentTaxa
.The problem is that these do not collapse the
rowTree
. That has to be done separately:However, tree collapsing is available through
TreeSummarizedExperiment::subsetByLeaf
, if one does subsetting by specifying taxa.It would be convenient if the tree collapse step could be directly included in the dedicated subsetting functions such as
subsetByPrevalentTaxa
andsubsetByRareTaxa
.Both of them use the
tse[ , ]
mechanism for subsetting internally. Ideally, that could be modified into something liketse[ , , collapseTree=TRUE]
. If this is not feasible, one could useTreeSummarizedExperiment::subsetByLeaf
to allow tree collapse within those functions.If we do not want to allow tree collapse as part of these subsetting functions, then I propose to remove these subsetting functions entirely, and point users to doing this in two steps: 1) identify the feature subset; 2) do subsetting (and optionally collapse the tree). As in the latter example above.
The text was updated successfully, but these errors were encountered: