Description Usage Arguments Value Author(s) Examples
get the data of specified taxonomy
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 | get_taxadf(obj, ...)
## S4 method for signature 'phyloseq'
get_taxadf(obj, taxlevel = 2, type = "species", ...)
## S4 method for signature 'data.frame'
get_taxadf(
obj,
taxda,
taxa_are_rows,
taxlevel,
sampleda = NULL,
type = "species",
...
)
|
obj |
phyloseq, phyloseq class or data.frame the shape of data.frame (nrow sample * column feature taxa_are_rows set FALSE, nrow feature * ncol sample, taxa_are_rows set TRUE). |
..., |
additional parameters. |
taxlevel |
character, the column names of taxda that you want to get. when the input is phyloseq class, you can use 1 to 7. |
type |
character, the type of datasets, default is "species", if the dataset is not about species, such as dataset of kegg function, you should set it to "others". |
taxda |
data.frame, the classifies of feature contained in obj(data.frame). |
taxa_are_rows |
logical, if the column of data.frame are features, it should be set FALSE. |
sampleda |
data.frame, the sample information. |
phyloseq class contained tax data.frame and sample information.
Shuangbin Xu
1 2 3 4 5 6 7 | library(ggplot2)
data(test_otu_data)
phytax <- get_taxadf(test_otu_data, taxlevel=2)
phytax
head(phyloseq::otu_table(phytax))
phybar <- ggbartax(phytax) +
xlab(NULL) + ylab("relative abundance (%)")
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.