joey711 / phyloseq

phyloseq is a set of classes, wrappers, and tools (in R) to make it easier to import, store, and analyze phylogenetic sequencing data; and to reproducibly share that data and analysis with others. See the phyloseq front page:
http://joey711.github.io/phyloseq/
567 stars 187 forks source link

merge_phyloseq with phy_tree containing different number of tips #1718

Closed AngelicaMiraples closed 5 months ago

AngelicaMiraples commented 5 months ago

Hi @joey711!

I have a similar issue as described in issue 825 https://github.com/joey711/phyloseq/issues/825

I have a phyloseq object that I subsetted into two, pse and psl, for separate analyses. Now I would like to merge them back together but am running into errors regarding the tree, as you mentioned in the above thread:

pse phyloseq-class experiment-level object otu_table() OTU Table: [ 156 taxa and 40 samples ] sample_data() Sample Data: [ 40 samples by 7 sample variables ] tax_table() Taxonomy Table: [ 156 taxa by 7 taxonomic ranks ] phy_tree() Phylogenetic Tree: [ 156 tips and 155 internal nodes ] refseq() DNAStringSet: [ 156 reference sequences ]

psl phyloseq-class experiment-level object otu_table() OTU Table: [ 306 taxa and 40 samples ] sample_data() Sample Data: [ 40 samples by 7 sample variables ] tax_table() Taxonomy Table: [ 306 taxa by 7 taxonomic ranks ] phy_tree() Phylogenetic Tree: [ 306 tips and 305 internal nodes ] refseq() DNAStringSet: [ 306 reference sequences ]

mps <- merge_phyloseq(pse, psl) Error in FUN(X[[i]], ...) : one tree has a different number of tips

Any support to get around this?

Thanks!

Angelica