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/
582 stars 187 forks source link

Change in internal nodes when appending phylogenetic tree to phyloseq #1622

Open LaraMacheriotou opened 2 years ago

LaraMacheriotou commented 2 years ago

Dear Joey,

I have made a GTR tree using phangorn which I then root at midpoint. The resulting tree has 8548 tips and 8547 internal nodes. I then append this tree to my phyloseq object and the number of internal nodes drops to 4041. This then gives me many errors when trying to plot ordinations etc. What could be going on?

I have attached the rooted tree and my phyloseq object.

package.version("phyloseq") [1] "1.40.0"

This is my code and output.

Read tree

treeGTR.rooted<-read.tree("Nematoda_metanalysis_treeGTR_rooted_mid_8548.nwk")

treeGTR.rooted

Phylogenetic tree with 8548 tips and 8547 internal nodes.

Tip labels: ASV4871, ASV7845, ASV4317, ASV2740, ASV5587, ASV6759, ...

Rooted; includes branch lengths.

Append tree to phyloseq

phylo.rare<-merge_phyloseq(phylo.rare, treeGTR.rooted)

phylo.rare phyloseq-class experiment-level object otu_table() OTU Table: [ 8548 taxa and 33 samples ] sample_data() Sample Data: [ 33 samples by 9 sample variables ] tax_table() Taxonomy Table: [ 8548 taxa by 6 taxonomic ranks ] phy_tree() Phylogenetic Tree: [ 8548 tips and 4041 internal nodes ] refseq() DNAStringSet: [ 8548 reference sequences ]

Nematoda_metanalysis_treeGTR_rooted_mid_8548.zip Nematoda_metanalysis_phylo.rare.rds.zip

Thank you for your help!