add_dna_to_phyloseq: Add dna in 'refseq' slot of a 'physeq' object using taxa...

View source: R/dada_phyloseq.R

add_dna_to_phyloseqR Documentation

Add dna in refseq slot of a physeq object using taxa names and renames taxa using prefix_taxa_names and number (default Taxa_1, Taxa_2 ...)

Description

lifecycle-stable

Useful in targets bioinformatic pipeline.

Usage

add_dna_to_phyloseq(physeq, prefix_taxa_names = "Taxa_")

Arguments

physeq

(required) a phyloseq-class object obtained using the phyloseq package.

prefix_taxa_names

(default "Taxa_"): the prefix of taxa names (eg. "ASV_" or "OTU_")

Value

A new phyloseq-class object with refseq slot and new taxa names

Author(s)

Adrien Taudière

Examples

pq_seq_names <- phyloseq::phyloseq(
  phyloseq::otu_table(data_fungi_mini),
  phyloseq::sample_data(data_fungi_mini),
  phyloseq::tax_table(data_fungi_mini)
)
phyloseq::taxa_names(pq_seq_names) <- as.character(phyloseq::refseq(data_fungi_mini))
add_dna_to_phyloseq(pq_seq_names)

MiscMetabar documentation built on June 8, 2026, 5:07 p.m.