calcBatchEffects {BEclear} | R Documentation |
Calculates for each gene in every batch the median distance to the other batches and the p-value resulting from the Kolmogorov-Smirnov test.
calcBatchEffects(data, samples, adjusted=TRUE, method="fdr", BPPARAM=SerialParam())
data |
a |
samples |
data frame with two columns, the first column has to contain the sample numbers, the second column has to contain the corresponding batch number. Colnames have to be named as "sample_id" and "batch_id". |
adjusted |
should the p-values be adjusted or not, see "method" for available adjustment methods. |
method |
adjustment method for p-value adjustment (if TRUE), default
method is "false discovery rate adjustment", for other available methods
see the description of the used standard R package |
BPPARAM |
An instance of the
|
calcBatchEffects
medians Compares the median value of all beta values belonging to one batch with the median value of all beta values belonging to all other batches. Returns a matrix containing this median difference value for every gene in every batch, columns define the batch numbers, rows the gene names.
p-values Compares the distribution of all beta values corresponding to one batch with the distribution of all beta values corresponding to all other batches and returns a p-value which defines if the distributions are the same or not. Standard two sided Kolmogorov-Smirnov test is used to calculate the (adjusted) p-values.
a matrix containing medians and p-values for all genes in all batches
## Shortly running example. For a more realistic example that takes ## some more time, run the same procedure with the full BEclearData ## dataset. ## Calculate fdr-adjusted p-values in non-parallel mode data(BEclearData) ex.data <- ex.data[31:90, 7:26] ex.samples <- ex.samples[7:26, ] res <- calcBatchEffects(data = ex.data, samples = ex.samples, method = "fdr")