Visualize The Negative Binomial Model OF A Given Taxon OR OTUID

Share:

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)

Want to suggest features or report bugs for rdrr.io? Use the GitHub issue tracker.