Open Marcelara opened 1 year ago
You can set the phy_tree
slot of the phyloseq object to null:
require("phyloseq")
data("GlobalPatterns")
GlobalPatterns@phy_tree <- NULL
Alternatively, you can create a new object from your existing object without the tree:
ps_no_tree <- phyloseq(otu_table(GlobalPatterns), tax_table(GlobalPatterns), sample_data(GlobalPatterns))
Hello! I would like to remove the phylogenetic tree from two of my phyloseq objects in order to merge them later on. If I try to do it now I get the
Error in FUN(X[[i]], ...) : one tree has a different number of tips
error.I've tried
phy_tree(ps) <- NA
but I getError in (function (classes, fdef, mtable) : unable to find an inherited method for function ‘phy_tree<-’ for signature ‘"phyloseq", "logical"’
So far I've looked everywhere but I haven't found how to remove one item from a phyloseq object (i.e. if you want to remove the OTU table for instance or in my case now the phylogenetic tree).
Many thanks in advance!