read.OTU: Open OTU Table

Description Usage Arguments Value Note Author(s) See Also Examples

Description

Opens the given file and returns a data frame representing the OTU table. This function use read.table function so is quite slow for large data sets, for which we recommend to use fread.OTU instead.

Usage

1
read.OTU(file, sep=",")

Arguments

file

a character vector specifying the file path to your file.

sep

the character used to separate cells in the file.

Value

Returns a data frame with the information from the file. The first row and column are used for the names of the other rows and columns.

Note

The OTU table should only contain classifications for the seven major taxonomic ranks, additional ranks will break some functions in the package. To remove those other classifications, try running sed -i.backup -e 's/s[a-z]__[^;]*; //g' -e 's/t__[^;]*; //g' $FILE where $FILE is your OTU table. The letter t can be replaced in the second expression for any other letter which appears as a prefix. For example, adding -e 's/u__[^;]*; //g' before $FILE would remove any entries formatted like u__test_classification;. Additionally, if your OTU table starts with the entry #OTU ID, that cell needs to be removed before the table can be read with read.OTU.

Author(s)

Wen Chen and Joshua Simpson.

See Also

getwd, setwd, read.table

Examples

1
2
3
## Not run: 
my.OTU <- read.OTU("path/to/otu", sep=",")
## End(Not run)

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