Skip to contents

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

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)
#> phyloseq-class experiment-level object
#> otu_table()   OTU Table:         [ 45 taxa and 137 samples ]
#> sample_data() Sample Data:       [ 137 samples by 7 sample variables ]
#> tax_table()   Taxonomy Table:    [ 45 taxa by 12 taxonomic ranks ]
#> refseq()      DNAStringSet:      [ 45 reference sequences ]