Keep or remove selected sequences from ref_seq without changing the
abundance matrix.
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)))
names(x@ref_seq) <- x@variable_info$variable_id
x <- prune_ref_seq(x, variable_id = x@variable_info$variable_id[1:5])
length(x@ref_seq)
#> [1] 5
