plotFeature: Basic plot function of the raw or normalized data.

View source: R/plotFeature.R

plotFeatureR Documentation

Basic plot function of the raw or normalized data.

Description

This function plots the abundance of a particular OTU by class. The function is the typical manhattan plot of the abundances.

Usage

plotFeature(
  obj,
  otuIndex,
  classIndex,
  col = "black",
  sort = TRUE,
  sortby = NULL,
  norm = TRUE,
  log = TRUE,
  sl = 1000,
  ...
)

Arguments

obj

A MRexperiment object with count data.

otuIndex

The row to plot

classIndex

A list of the samples in their respective groups.

col

A vector to color samples by.

sort

Boolean, sort or not.

sortby

Default is sort by library size, alternative vector for sorting

norm

Whether or not to normalize the counts - if MRexperiment object.

log

Whether or not to log2 transform the counts - if MRexperiment object.

sl

Scaling factor - if MRexperiment and norm=TRUE.

...

Additional plot arguments.

Value

counts and classindex

See Also

cumNorm

Examples


data(mouseData)
classIndex=list(Western=which(pData(mouseData)$diet=="Western"))
classIndex$BK=which(pData(mouseData)$diet=="BK")
otuIndex = 8770

par(mfrow=c(2,1))
dates = pData(mouseData)$date
plotFeature(mouseData,norm=FALSE,log=FALSE,otuIndex,classIndex,
col=dates,sortby=dates,ylab="Raw reads")


HCBravoLab/metagenomeSeq documentation built on March 17, 2024, 3:21 p.m.