plotSingleFeature: Plot features

Description Usage Arguments Value Author(s) Examples

View source: R/intra_functions.R

Description

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

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
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

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

microbiomeExplorer documentation built on Nov. 8, 2020, 8:16 p.m.