View source: R/dada_phyloseq.R
add_info_to_sam_data | R Documentation |
Warning: The value nb_seq and nb_otu may be outdated if you transform your
phyloseq object, e.g. using the subset_taxa_pq()
function
add_info_to_sam_data(
physeq,
df_info = NULL,
add_nb_seq = TRUE,
add_nb_otu = TRUE
)
physeq |
(required): a |
df_info |
: A dataframe with rownames matching for sample names of the phyloseq object |
add_nb_seq |
(Logical, default TRUE) Does we add a column nb_seq collecting the number of sequences per sample? |
add_nb_otu |
(Logical, default TRUE) Does we add a column nb_otu collecting the number of OTUs per sample? |
A phyloseq object with an updated sam_data slot
Adrien Taudière
data_fungi <- add_info_to_sam_data(data_fungi)
boxplot(data_fungi@sam_data$nb_otu ~ data_fungi@sam_data$Time)
new_df <- data.frame(
variable_1 = runif(n = nsamples(data_fungi), min = 1, max = 20),
variable_2 = runif(n = nsamples(data_fungi), min = 1, max = 2)
)
rownames(new_df) <- sample_names(data_fungi)
data_fungi <- add_info_to_sam_data(data_fungi, new_df)
plot(data_fungi@sam_data$nb_otu ~ data_fungi@sam_data$variable_1)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.