Description Usage Arguments Value Examples
View source: R/sampleSizeCal.R
Run sample size calculation for pilot data for reference dataset
1 2 3 4 5 6 7 8 9 10 11 12 |
exprsMat |
A matrix of expression matrix of pilot dataset (log-transformed, or normalised) |
cellTypes |
A vector of cell types of pilot dataset |
n_list |
A vector of integer indicates the sample size to run. |
num_repeat |
An integer indicates the number of run for each sample size will be repeated. |
level |
An integer indicates the accuracy rate is calculate based on the n-th level from top of cell type tree. If it is NULL (by default), it will be the bottom of the cell type tree. It can not be larger than the total number of levels of the tree. |
cellType_tree |
A list indicates the cell type tree (optional), if it is NULL, the accuracy rate is calculate based on the provided cellTypes. |
BPPARAM |
A |
subset_test |
A ogical input indicates whether we used a subset of data (fixed number for each sample size) to test instead of all remaining data. By default, it is FALSE. |
num_test |
An integer indicates the size of the test data. |
... |
other parameter from scClassify |
A matrix of accuracy matrix, where columns corresponding to different sample sizes, rows corresponding to the number of repetation.
1 2 3 4 5 6 7 8 9 10 | data("scClassify_example")
xin_cellTypes <- scClassify_example$xin_cellTypes
exprsMat_xin_subset <- scClassify_example$exprsMat_xin_subset
exprsMat_xin_subset <- as(exprsMat_xin_subset, "dgCMatrix")
set.seed(2019)
accMat <- runSampleCal(exprsMat_xin_subset,
xin_cellTypes,
n_list = seq(20, 100, 20),
num_repeat = 5, BPPARAM = BiocParallel::SerialParam())
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.