plotLongFeature: Plot longitudinal features

View source: R/longitudinal_functions.R

plotLongFeatureR Documentation

Plot longitudinal features

Description

This function plots the reads of a particular feature over different time points.

Usage

plotLongFeature(
  aggdat,
  feature,
  x_var,
  id_var = "SAMPLE_ID",
  plotTitle = NULL,
  ylab = "Reads",
  log = FALSE,
  showLines = TRUE,
  fixedHeight = NULL,
  x_levels = NULL,
  pwidth = 650
)

Arguments

aggdat

aggregated MRExperiment

feature

Feature to plot.

x_var

Phenotype to show along on X-axis.

id_var

phenotype used to connect data points. Default is "SAMPLE_ID"

plotTitle

Plot title. Default shows no title.

ylab

Y-axis label. Default is "Reads"

log

Log2 transform data. Default is FALSE.

showLines

add lines between the points

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 object holding long feature plot

Author(s)

Janina Reeder, Mo Huang

Examples

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


zoecastillo/microbiomeExplorer documentation built on Sept. 11, 2022, 7:40 a.m.