Skip to contents

Synchronize ref_seq with the current variable_info.

Usage

align_ref_seq(object, drop_unmatched = TRUE)

Arguments

object

A microbiome_dataset object.

drop_unmatched

Should unmatched sequences be dropped? Defaults to TRUE.

Value

A microbiome_dataset object.

Examples

data("global_patterns", package = "microbiomedataset")

x <- prune_taxa(global_patterns, variable_id = global_patterns@variable_info$variable_id[1:120])
x <- microbiomedataset::convert2microbiome_dataset(
  microbiomedataset::convert2phyloseq(x)
)
#> Found more than one class "phylo" in cache; using the first, from namespace 'phyloseq'
#> Also defined by ‘tidytree’
#> Found more than one class "phylo" in cache; using the first, from namespace 'phyloseq'
#> Also defined by ‘tidytree’
#> Found more than one class "phylo" in cache; using the first, from namespace 'phyloseq'
#> Also defined by ‘tidytree’
#> Found more than one class "phylo" in cache; using the first, from namespace 'phyloseq'
#> Also defined by ‘tidytree’
x@ref_seq <- Biostrings::DNAStringSet(rep("ACGT", nrow(x@variable_info)))
x <- align_ref_seq(x)
names(x@ref_seq)[1]
#> [1] "549322"