Description Usage Arguments Value Author(s) See Also Examples
This function takes a phyloseq-class
and parse it to a treedata object, that can be further
visualized by the tree.backbone function. The tax_table slot
must not be empty in the phyloseq object.
| 1 2 3 4 5 6 | parsePhyloseq(
  physeq,
  use_abundance = TRUE,
  node.size.scale = 1,
  node.size.offset = 1
)
 | 
| physeq | A phyloseq object. The tax_table slot must not be empty. | 
| use_abundance | Boolean variable whether to set node sizes according to abundance. If FALSE, all nodes will have the same size. | 
| node.size.scale | the parameter 'a' controlling node size: nodeSize=a*log(relative_abundance)+b | 
| node.size.offset | the parameter 'b' controlling node size: nodeSize=a*log(relative_abundance)+b | 
a treeio::treedata object
Chenghao Zhu, Chenhao Li, Guangchuang Yu
tree.backbone, parseMetaphlanTSV,
phyloseq-class
| 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 | data("GlobalPatterns")
GP = GlobalPatterns
otu_table = otu_table(GP)
tax_table = tax_table(GP)
# Use the OTUs that make up 99% of the total
lib_size = colSums(otu_table)
mat = sapply(1:ncol(otu_table), function(i)
    otu_table[,i]/lib_size[i] >= 0.01)
ind = rowSums(mat)>=1
otu_table = otu_table[ind,]
tax_table = tax_table[ind,]
physeq = phyloseq(otu_table, tax_table) %>%
    fix_duplicate_tax()
tr = parsePhyloseq(physeq, use_abundance = F)
p = tree.backbone(tr, size=1)
 | 
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.