View source: R/permTestTx_customAll.R
| permTestTx_customAll | R Documentation |
Perform permutation test for evaluating spatial association between region sets. This permutation test function receives two region sets and a set of randomized region sets of one of them. It evaluates if there is an association between these two region sets.
permTestTx_customAll(RSL = NULL, RS1 = NULL, RS2 = NULL,
ev_function_1 = overlapCountsTx, ev_function_2 = overlapCountsTx, pval_t = FALSE, ...)
RSL |
Randomized region sets of |
RS1 |
The region set. It should be in the |
RS2 |
The region set to be compared with. It should be in the |
ev_function_1 |
Evaluation function defines what statistic to be tested between RS1 and RS2. Default is |
ev_function_2 |
Evaluation function defines what statistic to be tested between each element in RSL and RS2. Default is |
pval_t |
Boolean. Default is FALSE. If FALSE, p-value is calculated based on the number of random evaluations is larger or less than the initial evaluation. If TRUE, p-value is calculated based on a t-test. |
... |
Any additional parameters needed. |
permTestTx_customAll will use evaluation function ev_function_1 to calculate the test statistic between RS1 and RS2, and use ev_function_2 to evaluate the statistic between RSL and RS2. It will also return a p-value and a z-score.
A list object, which is defined to be permTestTx.results class. It contains the following items:
RSL: Randomized region sets of RS1.
RS1: The feature set to be randomized.
RS2: The region set to be compared with the feature set.
orig.ev: The value of overlapping counts between RS1 and RS2.
rand.ev: The values of overlapping counts between each element in RSL and RS2.
pval: p-value of the test.
zscore: Standard score of the test.
library(TxDb.Hsapiens.UCSC.hg19.knownGene)
txdb <- TxDb.Hsapiens.UCSC.hg19.knownGene
trans.ids1<- c("170")
RS1 <- randomizeTx(txdb = txdb, trans_ids = trans.ids1,
random_num = 20, random_length = 100)
RS2 <- randomizeTx(txdb = txdb, trans_ids = trans.ids1,
random_num = 20, random_length = 100)
trans.ids2 <- c("170", "782", "974", "1364", "1387")
RSL <- randomizeTx(txdb = txdb, trans_ids = trans.ids2,
random_num = 20, random_length = 100, N = 10)
permTestTx_results <- permTestTx_customAll(RSL = RSL, RS1 = RS1, RS2 = RS2)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.