View source: R/detect_batch_effect.R
detect_batch_effect | R Documentation |
This function is used for batch effect detection in multidimensional datasets. The function applies a SOM-based clustering to a dataset in order to compare not only marker expression differences across batches, but also the cluster percentages in each batch to detect possible populations that are over-/under-represented in a single batch. This is coupled with UMAP plots to assist the interpretation of the results. However, this is primarily meaningful for sets with 3-30 batches - in cases outside this range, only the UMAPs will be generated.
detect_batch_effect(
df,
out_dir,
downsample = NULL,
norm_method = "scale",
xdim = 8,
ydim = 8,
seed = 382,
markers = NULL,
batch_col = "batch",
label_col = "label",
name = "raw data"
)
df |
Tibble containing the expression data and batch information. See prepare_data. |
out_dir |
Directory for plot output |
downsample |
Number of cells to include in detection. If not specified all cells will be used. One should be careful with the downsampling here as too strong downsampling leads to spurious results. |
norm_method |
Normalization methods (options = 'scale' and 'rank') |
xdim |
Grid size in x-axis for SOM (default = 8) |
ydim |
Grid size in y-axis for SOM (default = 8) |
seed |
Random seed for reproducibility |
markers |
If only some markers should be used this parameter is used to define them. If not set, all markers are used. |
batch_col |
Name of column containing batch information |
label_col |
If existing labels should be used, this column must be present in the data |
name |
Name of dataset - used for plot titles |
Other detect_batch_effect:
detect_batch_effect_express()
## Not run:
detect_batch_effect(df = exprs)
detect_batch_effect(df = exprs, xdim = 8, ydim = 8, seed = 382,
markers = c('CD3', 'CD4', 'CD8a', 'CD20', 'CD19', 'CD56', 'CD33'))
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.