rename_otu: OTU renaming: from hash to rank abundance prefix

Description Usage Arguments Details Value Examples

View source: R/convenience_functions.R

Description

OTU names when generated with vsearch for example corresponds to sequence SHA1 hash value. Despite being unique, this notation is not human readable. This function transform these hashes into easier OTU names. Ex: 'e443b18' to 'OTU_1' for the most abundant OTU

Usage

1
rename_otu(physeq, hash2id_file)

Arguments

physeq

phyloseq-class

hash2id_file

A character giving the filename to write the correspondence table between the hash and the new ID or "" for output to the console.

Details

This renaming also has the advantage to ease subsetting with OTU names because OTU names are the row.names of several phyloseq object.

Value

physeq phyloseq-class with OTU renamed.

Examples

1
2
3
4
require(phyloseq)
data(esophagus)
taxa_names(esophagus)[1:6]
taxa_names( rename_otu( esophagus, hash2id_file = "" ) )[1:6]

cpauvert/psadd documentation built on Nov. 22, 2020, 9:19 a.m.