-
Notifications
You must be signed in to change notification settings - Fork 4
Open
Description
f you want to subset the tree in a tse object, because e.g., PhILR requires the rowTree(tse) to match the taxa present in the tse, as in rownames(tse), the recommendation was to use: subsetByLeaf(tse, rowLeaf = rowLinks(tse)$nodeLab)
However, this messes up the connection between the new tree tips (or rowLinks(tse)$nodeLab) and rownames(tse).
Instead, the subsetting done directly with rowtree(tse) <- ape::keep.tip(phy = rowTree(greengenes2_16S), tip = rowLinks(greengenes2_16S)$nodeLab) appears to work without issues
further evidence:
> identical(rownames(tse), rowLinks(tse)$nodeLab)
[1] TRUE
> new_tse <- subsetByLeaf(tse, rowLeaf = rowLinks(tse)$nodeLab)
> identical(rownames(new_tse), rowLinks(new_tse)$nodeLab)
[1] FALSE
> ape_tse <- tse
> rowTree(ape_tse) <- ape::keep.tip(phy = rowTree(ape_tse), tip = rowLinks(ape_tse)$nodeLab)
> identical(rownames(ape_tse), rowLinks(ape_tse)$nodeLab)
[1] TRUE
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels