Description Usage Arguments Value Author(s) References Examples
Call the function to estimate the intrinsic gene indicators.
1 | estimate_IG_indicators(BUSfits, postprob_DE_threshold = 0.5)
|
BUSfits |
The BUSfits object output by the function |
postprob_DE_threshold |
the threshold to call an intrinsic gene indicator to be one or not according to whether its posterior probability is higher than postprob_DE_threshold or not. The default is 0.5. |
est_L |
the estimated intrinsic gene indicators, a matrix where the rows represent genes and the columns correspond to subtypes k=2,...,K |
Xiangyu Luo
Xiangyu Luo, Yingying Wei. Batch Effects Correction with Unknown Subtypes. Journal of the American Statistical Association. Accepted.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 | rm(list = ls(all = TRUE))
set.seed(123)
#a toy example, there are 6 samples and 20 genes in each batch
example_Data <- list()
#batch 1
example_Data[[1]] <- rbind(matrix(c(1,1,5,5,10,10,
3,3,7,7,12,12), ncol=6, byrow=TRUE), matrix(c(1,2),nrow=18, ncol=6))
#batch 2
batch2_effect <- c(2,2,2,1,1)
example_Data[[2]] <- rbind(matrix(c(1,1,5,5,10,10,
3,3,7,7,12,12), ncol=6, byrow=TRUE), matrix(c(1,2),nrow=18, ncol=6)) + batch2_effect
#batch 3
batch3_effect <- c(3,2,1,1,2)
example_Data[[3]] <- rbind(matrix(c(1,1,5,5,10,10,
3,3,7,7,12,12), ncol=6, byrow=TRUE), matrix(c(1,2),nrow=18, ncol=6)) + batch3_effect
set.seed(123)
BUSfits <- BUSgibbs(example_Data, n.subtypes = 3, n.iterations = 100, showIteration = FALSE)
#select the posterior probability threshold to estimate the intrinsic gene indicators
thr0 <- postprob_DE_thr_fun(BUSfits, fdr_threshold=0.1)
est_L <- estimate_IG_indicators(BUSfits, postprob_DE_threshold=thr0)
#obtain the intrinsic gene indicators
intrinsic_gene_indices <- IG_index(est_L)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.