Chenhao Li, Guangchuang Yu, Chenghao Zhu
- parse taxonomic profiling table
- GraPhlAn like tree visualization and annotation
- support cladograme visualization from phyloseq objects and .biom files
## ## run the following command first if you don't have ggtree installed.
## setRepositories(ind=1:2)
devtools::install_github("lch14forever/microbiomeViz")
library(microbiomeViz)
data("SRS014459_Stool_profile")
tr <- parseMetaphlanTSV(SRS014459_Stool_profile)
p <- tree.backbone(tr)
p
anno.data <- data.frame(node=c("g__Roseburia", "c__Clostridia", "s__Bacteroides_ovatus"),
color='red', stringsAsFactors = FALSE)
p <- clade.anno(p, anno.data)
p
library(phyloseq)
data("GlobalPatterns")
GP = GlobalPatterns
GP = transform_sample_counts(GlobalPatterns, function(otu) otu/sum(otu))
GP = filter_taxa(GP, function(x) max(x)>=0.01,TRUE)
GP = fix_duplicate_tax(GP)
tr = parsePhyloseq(GP)
p = tree.backbone(tr, size=1)
The phyloseq package can import the otu table from .biom files.
rich_dense_biom = system.file("extdata", "rich_dense_otu_table.biom", package="phyloseq")
rich_dense = import_biom(rich_dense_biom, parseFunction=parse_taxonomy_greengenes)
tr = parsePhyloseq(rich_dense)
p = tree.backbone(tr, size=1)