Description Usage Arguments Value Author(s) See Also Examples
View source: R/methylInheritanceMethods.R
Run a permutation analysis, based on Monte Carlo sampling, for testing the hypothesis that the number of conserved differentially methylated elements (sites, tiles or both), between several generations, is associated to an effect inherited from a treatment and that stochastic effect can be dismissed.
The multi-generational dataset or the name of the RDS file that contains the dataset can be used as input.
The observation analysis can also be run (optional). All permutation results are saved in RDS files.
1 2 3 4 5 6 7 | runPermutation(methylKitData, type = c("both", "sites", "tiles"),
outputDir = "output", runObservationAnalysis = TRUE,
nbrPermutations = 1000, nbrCores = 1, nbrCoresDiffMeth = 1,
minReads = 10, minMethDiff = 10, qvalue = 0.01,
maxPercReads = 99.9, destrand = FALSE, minCovBasesForTiles = 0,
tileSize = 1000, stepSize = 1000, vSeed = -1,
restartCalculation = FALSE, saveInfoByGeneration = FALSE)
|
methylKitData |
a |
type |
One of the "sites","tiles" or "both" strings. Specifies the type of differentially methylated elements should be returned. For retrieving differentially methylated bases type="sites"; for differentially methylated regions type="tiles". Default: "both". |
outputDir |
a string, the name of the directory that will contain
the results of the permutation. If the directory does not
exist, it will be created. Default: |
runObservationAnalysis |
a |
nbrPermutations, |
a positive |
nbrCores |
a positive |
nbrCoresDiffMeth |
a positive |
minReads |
a positive |
minMethDiff |
a positive |
qvalue |
a positive |
maxPercReads |
a |
destrand |
a |
minCovBasesForTiles |
a non-negative |
tileSize |
a positive |
stepSize |
a positive |
vSeed |
a |
restartCalculation |
a |
saveInfoByGeneration |
a |
0
.
Astrid Deschenes, Pascal Belleau
mergePermutationAndObservation
for detail
description, in the Value section, of the
methylInheritanceAllResults
object as
well as its PERMUTATION
section.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 | ## Load methylKit information
data(samplesForTransgenerationalAnalysis)
## Run a permutation analysis using the methylKit dataset
## A real analysis would require a much higher number of permutations
runPermutation(methylKitData = samplesForTransgenerationalAnalysis,
outputDir = "test_01", runObservationAnalysis = FALSE, type = "sites",
nbrPermutations = 2, vSeed = 221)
## Get results
results_01 <- loadAllRDSResults(analysisResultsDir = NULL,
permutationResultsDir = "test_01", doingSites = TRUE,
doingTiles = FALSE)
## Remove results directory
if (dir.exists("test_01")) {
unlink("test_01", recursive = TRUE, force = TRUE)
}
## Path to a methylKit RDS file
methylFile <- system.file("extdata", "methylObj_001.RDS",
package = "methylInheritance")
## Run a permutation analysis using RDS file name
## A real analysis would require a much higher number of permutations
runPermutation(methylKitData = methylFile, type = "tiles",
outputDir = "test_02", nbrPermutations = 2, minCovBasesForTiles = 10,
vSeed = 2001)
## Get results
results_02 <- loadAllRDSResults(analysisResultsDir = NULL,
permutationResultsDir = "test_02", doingSites = FALSE,
doingTiles = TRUE)
## Remove results directory
if (dir.exists("test_02")) {
unlink("test_02", recursive = TRUE, force = TRUE)
}
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.