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

Description Usage Arguments Value See Also Examples

View source: R/plotGenus.R

Description

This function plots the abundance of a particular OTU by class. The function uses the estimated posterior probabilities to make technical zeros transparent.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
plotGenus(
  obj,
  otuIndex,
  classIndex,
  norm = TRUE,
  log = TRUE,
  no = 1:length(otuIndex),
  labs = TRUE,
  xlab = NULL,
  ylab = NULL,
  jitter = TRUE,
  jitter.factor = 1,
  pch = 21,
  ...
)

Arguments

obj

An MRexperiment object with count data.

otuIndex

A list of the otus with the same annotation.

classIndex

A list of the samples in their respective groups.

norm

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

log

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

no

Which of the otuIndex to plot.

labs

Whether to include group labels or not. (TRUE/FALSE)

xlab

xlabel for the plot.

ylab

ylabel for the plot.

jitter

Boolean to jitter the count data or not.

jitter.factor

Factor value for jitter

pch

Standard pch value for the plot command.

...

Additional plot arguments.

Value

plotted data

See Also

cumNorm

Examples

1
2
3
4
5
6
data(mouseData)
classIndex=list(controls=which(pData(mouseData)$diet=="BK"))
classIndex$cases=which(pData(mouseData)$diet=="Western")
otuIndex = grep("Strep",fData(mouseData)$family)
otuIndex=otuIndex[order(rowSums(MRcounts(mouseData)[otuIndex,]),decreasing=TRUE)]
plotGenus(mouseData,otuIndex,classIndex,no=1:2,xaxt="n",norm=FALSE,ylab="Strep normalized log(cpt)")

metagenomeSeq documentation built on Nov. 8, 2020, 5:34 p.m.