Skip to content
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

Trying to merge_phyloseq but problem with trees #1647

Open
xaalii opened this issue Dec 15, 2022 · 1 comment
Open

Trying to merge_phyloseq but problem with trees #1647

xaalii opened this issue Dec 15, 2022 · 1 comment

Comments

@xaalii
Copy link

xaalii commented Dec 15, 2022

Hi,

I am trying to merge two phyloseq objects containing samples from different environments. I have used QIIME2 and Deblur to clean the data and obtain the phylogenetic tree, etc.

I can successfully make two phyloseq objects. However, when I try to merge the phyloseq objects, I can the following error:
"Error in FUN(X[[i]], ...) : one tree has a different number of tips"

Please can somebody clarify why this might be and how I get around it?

I know I can make the objects without trees, but I need them to be able to calculate UniFrac distances later on.

Thanks!

@AngelicaMiraples
Copy link

AngelicaMiraples commented Jan 16, 2024

Hi @joey711 and @xaalii

I have a similar issue as described above.

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants