envis.NB: Visualize The Negative Binomial Model OF A Given Taxon OR...

Description Usage Arguments Value Author(s) Examples

Description

This function plot the negative binomial model for a given otuID or taxon

Usage

1
2
3
4
envis.NB(NB.model="", tax.meta,  taxon="",
         x="", num.col=NULL, group=NULL, group.order=NULL,
         xlab=NULL, ylab=NULL, fill=NULL, facet=NULL,
         file=NULL, ext=NULL, width=8, height=8)

Arguments

NB.model

the negative binomial model. Can be obtained by using assist.NB

tax.meta

the combined taxon/otuID and metadata. Can be obtained by using assist.NB

taxon

the taxon or otuID. Can be obtained by using assist.NB

x

a metadata variable name for x axis.

num.col

optional. A metadata numerical variable that will be used as predictor.

group

optional. A metadata factor variable that will be used as predictor.

group.order

optional. The desired order for the group.

xlab

optional. X axis label.

ylab

optional. Y axis label.

fill

optional. Color for fill different categories.

facet

optional. Metadata category variables as faceting variables.

file

optional. Filename that the plot to be saved to.

ext

optional. Filename extension, type of image to be saved.

width

an integer. Filter OTU table by counts.

height

an integer. Filter OTU table by counts.

Value

This function plot predicted taxon/otuID under the impact of metadata variables.

Author(s)

Wen Chen

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
data(ITS1, meta)
# filter otu table
its1 <- filter.OTU(data=list(ITS1=ITS1), percent=0.01)[[1]]
m <- meta[, c(2,3,5,7)]
## Not run: 
# test the model
nb <- assist.NB(its1, meta=m, rank="g", 
                anov.fac="Harvestmethod",
                taxon=rownames(its1)[1])
NB.model<-nb[[1]]
tax.meta<-nb[[2]]
taxon<-nb[[3]]
envis.NB(NB.model=NB.model, tax.meta=tax.meta,  taxon=taxon,
                x="Ergosterol_ppm", num.col="Ergosterol_ppm",
                group="Crop", group.order=NULL,
                xlab="Ergosterol (ppm)", ylab=NULL,
                fill="Harvestmethod", facet=c("City","Crop"))

## End(Not run)

Example output

Loading required package: vegan
Loading required package: permute
Loading required package: lattice
This is vegan 2.5-4
Loading required package: ggplot2
[1] "26 otus in ITS1 met the filter requirment."
[1] "A total of  0  columns are removed:  "
[1] "columns in exclude list: "
[1] "column# with missing data: "
[1] "columns# with one level: "
[1] "column# that are not numeric or factor: "
Warning message:
In assist.NB(its1, meta = m, rank = "g", anov.fac = "Harvestmethod",  :
  Test an otuID, will ignore the ranks
Warning message:
In envis.NB(NB.model = NB.model, tax.meta = tax.meta, taxon = taxon,  :
  Divide plots to 2 columns

RAM documentation built on May 2, 2019, 3:04 p.m.