Description Usage Arguments Value Author(s) Examples
View source: R/plot-ggdiffbartaxa.R
significantly discriminative feature barplot
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 | ggdifftaxbar(obj, ...)
ggdiffbartaxa(obj, ...)
## S4 method for signature 'diffAnalysisClass'
ggdifftaxbar(
obj,
filepath = NULL,
output = "biomarker_barplot",
removeUnknown = TRUE,
figwidth = 6,
figheight = 3,
ylabel = "relative abundance",
format = "pdf",
dpi = 300,
...
)
## S3 method for class 'featureMeanMedian'
ggdifftaxbar(
obj,
featurename,
classgroup,
subclass,
xtextsize = 3,
factorLevels = NULL,
coloslist = NULL,
ylabel = "relative abundance",
...
)
|
obj |
object, diffAnalysisClass see also
|
... |
additional arguments. |
filepath |
character, default is NULL, meaning current path. |
output |
character, the output dir name, default is "biomarker_barplot". |
removeUnknown |
logical, whether do not show unknown taxonomy, default is TRUE. |
figwidth |
numeric, the width of figures, default is 6. |
figheight |
numeric, the height of figures, default is 3. |
ylabel |
character, the label of y, default is 'relative abundance'. |
format |
character, the format of figure, default is pdf, png, tiff also be supported. |
dpi |
numeric, the dpi of output, default is 300. |
featurename |
character, the feature name, contained at the objet. |
classgroup |
character, factor name. |
subclass |
character, factor name. |
xtextsize |
numeric, the size of axis x label, default is 3. |
factorLevels |
list, the levels of the factors, default is NULL, if you want to order the levels of factor, you can set this. |
coloslist |
vector, color vector, if the input is phyloseq, you should use this to adjust the color, not scale_color_manual. |
the figures of features show the distributions in samples.
Shuangbin Xu
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 | data(kostic2012crc)
kostic2012crc
head(phyloseq::sample_data(kostic2012crc),3)
kostic2012crc <- phyloseq::rarefy_even_depth(kostic2012crc,
rngseed=1024)
table(phyloseq::sample_data(kostic2012crc)$DIAGNOSIS)
#set.seed(1024)
#diffres <- diff_analysis(kostic2012crc, classgroup="DIAGNOSIS",
# mlfun="lda", filtermod="fdr",
# firstcomfun = "kruskal.test",
# firstalpha=0.05, strictmod=TRUE,
# secondcomfun = "wilcox.test",
# subclmin=3, subclwilc=TRUE,
# secondalpha=0.01, ldascore=3)
# not run in example
#ggdifftaxbar(diffres, output="biomarker_barplot")
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.