| collapse_mean | R Documentation |
Calculates the mean of the intensity of technical replicates (e.g., if the same sample was injected multiple times or if multiple workups have been performed on the same starting material). The function assigns new sample names by joining either group and replicate name, or if a batch column is specified group, replicate and batch together with a specified separator. Due to the nature of the function, sample and feature metadata columns will be dropped unless they are specified with the according arguments.
collapse_mean(
data,
group_column = .data$Group,
replicate_column = .data$Replicate,
batch_column = .data$Batch,
feature_metadata_cols = "Feature",
sample_metadata_cols = NULL,
separator = "_"
)
data |
A tidy tibble created by |
group_column |
Which column should be used for grouping? Usually |
replicate_column |
Which column contains replicate information? Usually |
batch_column |
Which column contains batch information? If all samples belong to the same batch (i.e., they all have the same batch identifier in the |
feature_metadata_cols |
A character or character vector containing the names of the feature metadata columns. They are usually created when reading the feature table with |
sample_metadata_cols |
A character or character vector containing the names of the sample metadata columns. They are usually created when joining the metadata with |
separator |
Separator used for joining group and replicate, or group, batch and replicate together to create the new sample names. The new sample names will be Group name, separator, Batch name, separator, Replicate name, or Group name, separator, Replicate name, in case all samples belong to the same batch (i.e., they all have the same batch identifier in the |
A tibble with intensities of technical replicates collapsed.
# uses a slightly modified version of toy_metaboscape_metadata
collapse_toy_metaboscape_metadata <- toy_metaboscape_metadata
collapse_toy_metaboscape_metadata$Replicate <- 1
toy_metaboscape %>%
join_metadata(collapse_toy_metaboscape_metadata) %>%
impute_lod() %>%
collapse_mean(group_column = Group, replicate_column = Replicate)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.