calculateStats {derfinder} | R Documentation |
After defining the models of interest (see makeModels) and pre-processing the data (see preprocessCoverage), use calculateStats to calculate the F-statistics at base-pair resolution.
calculateStats(coveragePrep, models, lowMemDir = NULL, ...)
coveragePrep |
A list with |
models |
A list with |
lowMemDir |
The directory where the processed chunks are saved when
using preprocessCoverage with a specified |
... |
Arguments passed to other methods and/or advanced arguments. Advanced arguments:
Passed to define_cluster. |
A numeric Rle with the F-statistics per base pair that passed the cutoff.
Leonardo Collado-Torres
makeModels, preprocessCoverage
## Collapse the coverage information collapsedFull <- collapseFullCoverage(list(genomeData$coverage), verbose = TRUE ) ## Calculate library size adjustments sampleDepths <- sampleDepth(collapsedFull, probs = c(0.5), verbose = TRUE) ## Build the models group <- genomeInfo$pop adjustvars <- data.frame(genomeInfo$gender) models <- makeModels(sampleDepths, testvars = group, adjustvars = adjustvars) ## Preprocess the data prep <- preprocessCoverage(genomeData, cutoff = 0, scalefac = 32, chunksize = 1e3, colsubset = NULL ) ## Run the function fstats <- calculateStats(prep, models, verbose = TRUE, method = "regular") fstats ## Not run: ## Compare vs pre-packaged F-statistics library("testthat") expect_that(fstats, is_equivalent_to(genomeFstats)) ## End(Not run)