| saveInterGenerationResults {methylInheritance} | R Documentation |
Save the result of on CpG site or tile analysis on all generations. The results are saved in a RDS file. The anaysis can have been done on the observed or shuffled dataset. Each permutation is saved using its identifiant in the file name.
saveInterGenerationResults(
outputDir,
permutationID,
type = c("sites", "tiles"),
interGenerationResult
)
outputDir |
a string of |
permutationID |
an |
type |
One of the |
interGenerationResult |
a |
0 indicating that all parameters validations have been
successful.
Astrid Deschenes, Pascal Belleau
## Load permutation results on sites
permutationResultsFile <- system.file("extdata",
"permutationResultsForSites.RDS", package="methylInheritance")
permutationResults <- readRDS(permutationResultsFile)
## Transform result to GRanges
resultsGR <- methylInheritance:::getGRangesFromMethylDiff(methDiff =
permutationResults, pDiff = 10, qvalue = 0.01, type = "hyper")
## Extract inter-generationally conserved sites
interGenerationResult <- methylInheritance:::interGeneration(resultsGR)
## Create directories
dir.create("TEST", showWarnings = TRUE)
dir.create("TEST/SITES", showWarnings = TRUE)
## Save results
methylInheritance:::saveInterGenerationResults(
outputDir = "TEST/", permutationID=100, type = "sites",
interGenerationResult = interGenerationResult)