format_to_besthit: Formatting the 'phyloseq-class' Object advanced

View source: R/format_to_besthit.R

format_to_besthitR Documentation

Formatting the phyloseq-class Object advanced

Description

Format the phyloseq object to add the best taxonomy in phyloseq object (tax_table and otu_table).

Usage

format_to_besthit(x, prefix = NULL)

Arguments

x

phyloseq-class object

prefix

Prefered prefix e.g. OTU-d__denovo161:Roseburia or ASV-d__denovo161:Roseburia

Details

Most commonly it is observed that the taxonomy file has classification until a given taxonomic level. row.names for both tax_table and otu_table have best hit, until maximun genus level (species classification with short amplicons is a myth)is made available. This code is a slight modification of the code from ampvis phyloseq-class. Here, we directly take the phyloseq object as input and make the necessary formatting.

Value

phyloseq-class object

Examples

## Not run: 
# Example data
library(microbiome)
library(microbiomeutilities)
library(dplyr)
data("zackular2014")
p0 <- zackular2014
p0.f <- format_to_besthit(p0, prefix = "OTU-")

## End(Not run)

microsud/microbiomeutilities documentation built on Nov. 29, 2022, 12:18 a.m.