buildResamplingFile.Rd
Currently the 'permutation' approach is implemented. If output
is specified,
the resampling matrix will be written to disk, and can be connected to with resamplingFile
,
otherwise a matrix is returned. Can be used in combination with assocTest
to perform
resampling tests.
buildResamplingFile(
nSamples,
nResampling = 1000,
memlimit = 1000,
methodResampling = "permutation",
output = NULL
)
Number of samples
Number of resamplings. Defaults to 1000.
Chunk sizes (when writing to output)
Resampling method, currently 'permutation' is implemented.
File path (.gz extension) to write output to. If not specified, a matrix with resamplings is returned.
library(rvatData)
# build and connect to a resamplingFile
file <- tempfile(fileext = ".gz")
buildResamplingFile(nSamples = 25000,
nResampling = 100,
output = file)
resamplingfile <- resamplingFile(file)
# perform resampled association tests
gdb <- gdb(rvat_example("rvatData.gdb"))
assoc <- assocTest(
gdb,
VAR_id = 1:10,
cohort = "pheno",
pheno = "pheno",
covar = paste0("PC", 1:4),
test = c("skat"),
resamplingFile = resamplingfile,
verbose = FALSE
)