make_otu_names: Make OTU Names

Description Usage Arguments Details Value Author(s) Examples

View source: R/make_otu_names.R

Description

This function takes a vector of integers and makes a vector of OTU names.

Usage

1
make_otu_names(otu_nums, otu_format="R")

Arguments

otu_nums

A vector of integers.

otu_format

When equal to "R" (default) OTU names have the form "OTUxxxnn." When equal to "biom", OTU names have the form "cluster_nn."

Details

This function is used by the function clstr2otu to name the columns of the OTU table it returns, but make_otu_names can be used separately if desired.

OTUs may be named in either of two formats, corresponding to those output by the RDP's cluster file formatter with options "R" and "biom." With option "R" (the default), OTU names begin with "OTU" and are padded to equal length with leading zeros, e.g. "OTU00067." Thus they can be sorted in numerical order. With option "biom," OTU names begin with "cluster_" and are not padded with leading zeros, e.g "cluster_67."

Value

A vector of character strings of the form "OTU_xxxnn"" or "cluster_nn."

Author(s)

John Quensen

Examples

1
2
3
n <- c(1:10)
otu.names <- make_otu_names(n)
otu.names

jfq3/RDPutils documentation built on Nov. 8, 2019, 1:05 p.m.