accessors: Accessor functions for OTUset and TAXset objects

Description Usage Arguments Value See Also Examples

Description

These functions provide access to some of the slots of OTUset and TAXset objects. otuID returns the otuID slot of OTUset objects. sampleID returns the sampleID slot of both OTUset and TAXset objects. tax and tax<- return and replace the tax slot of TAXset objects.

Usage

1
2
3
4
    sampleID(object, ...)
    otuID(object, ...)
    tax(object, ...)
    tax(object)<-value

Arguments

object

An OTUset or a TAXset object

value

The replacement value for tax

...

Added for completeness. Enables the passing of arguments.

Value

sampleID and otuID return a character. tax returns a data.frame.

See Also

ShortRead

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
## locate directory with data
dirPath <- system.file("extdata/Sogin_2006", package="OTUbase")

## read in data into OTUset object
soginOTU <- readOTUset(dirPath=dirPath, level="0.03", samplefile="sogin.groups", fastafile="sogin.fasta", otufile="sogin.unique.filter.fn.list", sampleADF="sample_metadata.txt")

## get the sampleID slot
sampleID(soginOTU) 

## get the otuID slot
otuID(soginOTU)

OTUbase documentation built on Nov. 8, 2020, 8:24 p.m.