plotSingleFeature {microbiomeExplorer} | R Documentation

## Plot features

### Description

This function plots the reads of a particular feature or set of features.

### Usage

    plotSingleFeature(
      aggdat,
      feature = "other",
      x_var = "SAMPLE_ID",
      ind = seq_len(10),
      plotTitle = NULL,
      ylab = "Reads",
      xlab = NULL,
      facet1 = NULL,
      facet2 = NULL,
      log = FALSE,
      showPoints = FALSE,
      fixedHeight = NULL,
      x_levels = NULL,
      pwidth = 500
    )

### Arguments

`aggdat` | aggregated MRExperiment
`feature` | Feature to plot.
`x_var` | Phenotype to aggregate over on X-axis. Default by "SAMPLE_ID".
`ind` | Indices of top abundant features to plot. Needed to determine appropriate color
`plotTitle` | Plot title. Default shows no title.
`ylab` | Y-axis label. Default is "Reads"
`xlab` | X-axis label. If NULL, x_var will be used as label.
`facet1` | Phenotype for facet 1.
`facet2` | Phenotype for facet 2.
`log` | Log2 transform data. Default is FALSE.
`showPoints` | add points for each sample on plot
`fixedHeight` | sets a specific plot height (differential analysis)
`x_levels` | restrict to specific levels of x_var (differential analysis)
`pwidth` | overall plot width; default is 650

### Value

plotly plot object

### Author(s)

Janina Reeder

### Examples

    data("mouseData", package = "metagenomeSeq")
    aggdat <- aggFeatures(mouseData, level = "genus")
    plotSingleFeature(aggdat, feature = "Prevotella", x_var = "diet")

[Package microbiomeExplorer version 1.4.0 Index]