pw_outlier | R Documentation |
Pairwise outlier removal of replicate samples within analytical batches.
This is useful for example to identify technical errors, particularly when there is not extensive replication among samples to conduct more conventional outlier detection.
pw_outlier(
df = NULL,
n.cores = 1,
mad_threshold = 3,
pw_threshold = 0.95,
peak_shrinkage = TRUE,
grouping_factor = "batch",
return_plot = FALSE,
plot_name = "pw_outlier_plot",
samps_exclude = "QC"
)
df |
The dataframe containing peak data. At minimum it should contain columns labeled: name, sample, batch, compound, area, rep, rep_tech |
n.cores |
|
mad_threshold |
|
pw_threshold |
|
peak_shrinkage |
|
grouping_factor |
The column label containing the grouping factor from which pairwise differences will be calculated. Default is batch column. |
return_plot |
|
plot_name |
|
samps_exclude |
|
list()
containing:
df (original input data)
df_cleaned (pairwise outlier cleaned data).
df_rm (samples removed by the pairwise outlier elimination).
batch_plots plots of quantile threshold for each batch. Only returned if return_plot is set to TRUE.
pw_out = pw_outlier(
df = dat,
samps_exclude = "QC",
n.cores = 2,
mad_threshold = 3,
pw_threshold = 0.95,
peak_shrinkage = TRUE,
grouping_factor = "batch",
return_plot = FALSE,
plot_name = "pw_outlier_plot")
list2env(pw_out ,.GlobalEnv)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.