View source: R/batch-effect-explore.R
explore_batch_effect | R Documentation |
Investigate if batch effect exists.
explore_batch_effect(
trainer,
batch_name = "Batch",
classification_name = "Classification",
top_n_rle = 20000,
rle_downsample = 100,
top_n_pca = 20000,
k = 50,
threshold = 0.9
)
trainer |
A S3 object of |
batch_name |
column name of batch in the |
classification_name |
column name of classification in the |
top_n_rle |
an integer of the most variable N loci for relative log expression (RLE) analysis. |
rle_downsample |
if there are many samples, down-sample it to a number while keep the proportion of each group. |
top_n_pca |
an integer of the most variable N loci for PCA. |
k |
Number of eigenvalues requested. |
threshold |
A numeric scalar between 0 to 1 of the threshold of the fraction of variance to choose PC number. Default to 0.9. |
Center and scale.
Compute the correlation/covariance matrix.
Calculate the eigenvectors and eigenvalues.
Choose the PC number. I use Capper's method and fraction of
variance to calculate PC numbers and choose the bigger one
from the two methods. See details at find_pc_number.capper
and find_pc_number.var_frac
.
Project the scaled input matrix onto the new basis.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.