ggdifftaxbar {MicrobiotaProcess} | R Documentation

## significantly discriminative feature barplot

### Description

significantly discriminative feature barplot

### Usage

    ggdifftaxbar(obj, ...)

    ## S4 method for signature 'diffAnalysisClass'
    ggdifftaxbar(
      obj,
      filepath = NULL,
      output = "biomarker_barplot",
      removeUnkown = TRUE,
      figwidth = 6,
      figheight = 3,
      ylabel = "relative abundance",
      ...
    )

    ## S3 method for class 'featureMeanMedian'
    ggdifftaxbar(
      obj,
      featurename,
      classgroup,
      subclass,
      xtextsize = 3,
      factorLevels = NULL,
      coloslist = NULL,
      ylabel = "relative abundance",
      ...
    )

### Arguments

`obj` | object, diffAnalysisClass see also `diff_analysis` or feMeanMedian class, see also `get_mean_median`.
`...` | additional arguments.
`filepath` | character, default is NULL, meaning current path.
`output` | character, the output dir name, default is "biomarker_barplot".
`removeUnkown` | logical, whether do not show unkown 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'.
`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.

### Value

the figures of features show the distributions in samples.

### Author(s)

Shuangbin Xu

### Examples

    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")

[Package MicrobiotaProcess version 1.0.5 Index]