getSim: Simulate the proportion of C/T at each site of synthetic CHR...

Description Usage Arguments Value Author(s) Examples

View source: R/methylInheritanceSimInternalMethods.R

Description

For each control and case, generate the proportion of C/T at each of the synthetic CHR.

Usage

1
2
getSim(nbCtrl, nbCase, generation, stateInfo, stateDiff, stateInherite,
  diffValue, propDiff, propDiffsd, propInheritance, propHetero)

Arguments

nbCtrl

a positive integer, the number of controls.

nbCase

a positive integer, the number of cases.

generation

a positive integer, the number of generations.

stateInfo

a GRanges object, the synthetic chromosome generated by getSyntheticChr function.

stateDiff

a vector of integer (0 and 1) with length corresponding the length of stateInfo. The vector indicates, using a 1, the positions where the CpG sites are differentially methylated.

stateInherite

a vector of integer (0 and 1) with length corresponding the length of stateInfo. The vector indicates, using a 1, the positions where the CpG values are inherited.

diffValue

a non-negative double between between [0,1], the proportion of C/T for a case differentially methylated following a beta distribution where the mean is shifted of diffValue from the CTRL distribution.

propDiff

a double superior to 0 and inferior or equal to 1, the mean value for the proportion of samples that will have, for a specific position, differentially methylated values. It can be interpreted as the penetrance.

propDiffsd

a non-negative double, the standard deviation associated to the propDiff.

propInheritance

a non-negative double between [0,1], the proportion of case that inherite differentially methylated sites.

propHetero

a non-negative double between [0,1], the reduction of vDiff for the second and following generations.

Value

a GRangesList, the object contains information about the simulation. The file have four metadata related to the real dataset:

Author(s)

Pascal Belleau, Astrid Deschenes

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
## Fix seed to have reproducible results
set.seed(312)

## Load dataset
data("samplesForChrSynthetic")

## Generate a stateInfo object using samples
stateInformation <- methInheritSim:::getSyntheticChr(methInfo = 
    samplesForChrSynthetic, nbBlock = 1, nbCpG = 3)

## Generate a stateDiff and stateInherite objects with length corresponding 
## to nbBlock * nbCpG from stateInformation
stateDiff  <- c(1, 0, 1)
stateInherite <- c(1, 0, 0)

## Create a simulation using stateInformation, stateDiff and stateInherite
methInheritSim:::getSim(nbCtrl = 3, nbCase = 2, generation = 3, 
    stateInfo = stateInformation, stateDiff = stateDiff, 
    stateInherite = stateInherite, diffValue = 10, 
    propDiff = 0.8, propDiffsd = 0.2, propInheritance = 0.8, 
    propHetero = 0.1)

methInheritSim documentation built on Nov. 8, 2020, 7:54 p.m.