View source: R/test_enrichment.R
test_enrichment | R Documentation |
Conduct permutation enrichment tests between all combinations of two named lists, each containing one or more GRanges objects. Permutation tests are run using overlapPermTest.
test_enrichment(
grlist1,
grlist2,
ntimes = 100,
genome = "hg19",
alternative = "auto",
min.parallel = 1000,
force.parallel = NULL,
seed = 2022,
mc.set.seed = FALSE,
save_path = tempfile(fileext = "_test_enrichment.rds"),
verbose = TRUE,
...
)
grlist1 |
First list of GRanges objects. |
grlist2 |
Second list of GRanges objects. |
ntimes |
number of permutations |
genome |
The reference genome to use. A valid genome object. Either a GenomicRanges or data.frame containing one region per whole chromosome or a character uniquely identifying a genome in BSgenome (e.g. "hg19", "mm10" but not "hg"). Internally it uses getGenomeAndMask. |
alternative |
the alternative hypothesis must be one of |
min.parallel |
if force.parallel is not specified, this will be used to determine the threshold for parallel computation. If |
force.parallel |
logical indicating if the computation must be paralelized. |
seed |
Set the seed for reproducibility. |
mc.set.seed |
"In order to create reproducible code with functions that use random
numbers such as the permutation testing in regioneR ,
it is necessary to use set.seed.
However, since regioneR uses parallel to perform the test it is
also necessary to set the |
save_path |
Path to save results to as an RDS file.
Set to |
verbose |
Print messages. |
... |
Arguments passed on to
|
data.frame
See section "3.7A note on reproducibility" for info on setting the seed.
dat <- echodata::get_Nalls2019_merged()
grlist1 <- dat[P<5e-8,]
grlist2 <- dat[Support>0,]
enrich <- test_enrichment(grlist1 = grlist1,
grlist2 = grlist2,
ntimes = 25,
force.parallel = FALSE)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.