runOnePermutationOnAllGenerations: Run the analysis on one permutation dataset, including all...

Description Usage Arguments Value Author(s) Examples

View source: R/methylInheritanceInternalMethods.R

Description

Run CpG site or region analysis using the methylKit package for each generation present in the dataset. The intersection of conserved elements is obtained for each group of two consecutive generations, as well as, for larger group subset. The output of the analysis is saved in a RDS file when an directory is specified.

Usage

1
2
3
4
5
6
runOnePermutationOnAllGenerations(id, methylInfoForAllGenerations,
  type = c("both", "sites", "tiles"), outputDir = NULL,
  nbrCoresDiffMeth = 1, minReads = 10, minMethDiff = 10,
  qvalue = 0.01, maxPercReads = 99.9, destrand = FALSE,
  minCovBasesForTiles = 0, tileSize = 1000, stepSize = 1000,
  restartCalculation, saveInfoByGeneration)

Arguments

id

an integer, the unique identification of the permutation. When id is 0, the analysis is done on the real dataset.

methylInfoForAllGenerations

a list of methylRawList entries. Each methylRawList entry must contain all the methylRaw entries related to one generation (first entry = first generation, second entry = second generation, etc..). The number of generations must correspond to the number of entries in the methylKitData. At least 2 generations must be present to make a permutation analysis. More information can be found in the methylKit package.

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.

nbrCoresDiffMeth

a positive integer, the number of cores to use for parallel differential methylation calculations.Parameter used for both sites and tiles analysis. The parameter corresponds to the num.cores parameter in the package methylKit. Default: 1 and always 1 for Windows.

minReads

a positive integer Bases and regions having lower coverage than this count are discarded. The parameter correspond to the lo.count parameter in the methylKit package.

minMethDiff

a positive integer betwwen [0,100], the absolute value of methylation percentage change between cases and controls. The parameter correspond to the difference parameter in the package methylKit. Default: 10.

qvalue

a positive double inferior to 1, the cutoff for qvalue of differential methylation statistic. Default: 0.01.

maxPercReads

a double between [0-100], the percentile of read counts that is going to be used as upper cutoff. Bases ore regions having higher coverage than this percentile are discarded. Parameter used for both CpG sites and tiles analysis. The parameter correspond to the hi.perc parameter in the methylKit package. Default: 99.9.

destrand

a logical, when TRUE will merge reads on both strands of a CpG dinucleotide to provide better coverage. Only advised when looking at CpG methylation. Parameter used for both sites and tiles analysis. Default: FALSE.

minCovBasesForTiles

a non-negative integer, the minimum number of bases to be covered in a given tiling window. The parameter corresponds to the cov.bases parameter in the package methylKit. Only used when doingTiles = TRUE. Default: 0.

tileSize

a positive integer, the size of the tiling window. The parameter corresponds to the win.size parameter in the methylKit package. Only used when doingTiles = TRUE. Default: 1000.

stepSize

a positive integer, the step size of tiling windows. The parameter corresponds to the stepSize parameter in the methylKit package. Only used when doingTiles = TRUE. Default: 1000.

restartCalculation

a logical, when TRUE, only permutations that don't have a RDS result final are run.

saveInfoByGeneration

a logical, when TRUE, the information about differentially methylated sites and tiles for each generation is saved in a RDS file. The information is saved in a different file for each permutation. The files are = saved in the outputDir.

Value

a list containing the following elements:

Author(s)

Astrid Deschenes, Pascal Belleau

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
## Load methyl information
data(samplesForTransgenerationalAnalysis)

## Run a permutation analysis
methylInheritance:::runOnePermutationOnAllGenerations(id = 2,
    methylInfoForAllGenerations = samplesForTransgenerationalAnalysis,
    type = "tiles", outputDir = NULL,
    nbrCoresDiffMeth = 1, minReads = 10, minMethDiff = 10, qvalue = 0.01,
    maxPercReads = 99.9, destrand = FALSE, minCovBasesForTiles = 0,
    tileSize = 1000, stepSize = 1000, restartCalculation = FALSE)

methylInheritance documentation built on Nov. 8, 2020, 8:21 p.m.