deathMove: Death move when more than one nucleosome are present

Description Usage Arguments Value Author(s) Examples

Description

Attempt to randomly delete the position of one nucleosome. The function is only used when more than one nucleosome are present.

Usage

1
2
deathMove(paramValues, kValue, muValue, sigmafValue, sigmarValue, deltaValue,
  wValue, dfValue, aValue, dimValue)

Arguments

paramValues

a list containing:

  • startPSF a vector of positive integer, the start position of all the forward reads.

  • startPSR a vector of positive integer, the start position of all the reverse reads.

  • kmax a integer the maximum number of nucleosomes allowed.

  • lambda a positive numeric, the theorical mean of the Poisson distribution.

  • minReads a integer, the minimum number of reads in a potential canditate region.

  • y a vector of numeric, the position of all reads ( including forward and reverse reads).

  • nr a integer, the number of reverse reads.

  • nf a integer, the number of forward reads.

  • nbrReads a integer, the total number of reads (including forward and reverse reads).

  • zeta integer, the length of a nucleosome.

  • deltamin a integer, the minimum distance between the maxima of the forward and reverse reads position densities for each nucleosome.

  • deltamax a integer, the maximum distance between the maxima of the forward and reverse reads position densities for each nucleosome.

  • minReadPos a numeric, the minimum position of the reads.

  • maxReadPos a numeric, the maximum position of the reads.

kValue

a integer, the number of nucleosomes.

muValue

a vector of numeric of length kValue, the positions of the nucleosomes.

sigmafValue

a vector of numeric of length kValue, the variance of the forward reads for each nucleosome.

sigmarValue

a vector of numeric of length kValue, the variance of the reverse reads for each nucleosome.

deltaValue

a vector of numeric of length kValue, the distance between the maxima of the forward and reverse reads position densities for each nucleosome.

wValue

a vector of positive numerical of length kValue, the weight for each nucleosome.

dfValue

a vector of positive numerical of length kValue, the degrees of freedom for each nucleosome.

aValue

a vector of positive numerical of length kValue + 1, the positions, on the chromosome, delimiting the regions of the reads associated with each nucleosome.

dimValue

a vector of positive integer of length kValue, the number of reads associated to each nucleosome.

Value

a list containing:

Author(s)

Rawane Samb, 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
22
23
24
25
26
27
28
29
## Load dataset
data(reads_demo)

## Create a list containing the mandatory parameters
paramList <- list(kmax = 5L, nf = length(reads_demo$readsForward),
nr = length(reads_demo$readsReverse),
nbrReads = length(reads_demo$readsForward) + length(reads_demo$readsReverse),
y = sort(c(reads_demo$readsForward, reads_demo$readsReverse)),
startPSF = reads_demo$readsForward,
startPSR = reads_demo$readsReverse, lambda = 2,
zeta = 147, deltamin = 142, deltamax = 152,
minReadPos = min(c(reads_demo$readsReverse, reads_demo$readsForward)),
maxReadPos = max(c(reads_demo$readsReverse, reads_demo$readsForward)))

## Initial position of the nucleosomes
muPosition <- c(72800, 73000)
muPosition

## Death move
result <- RJMCMC:::deathMove(paramValues = paramList, kValue = 2L,
muValue = muPosition, sigmafValue = c(100, 120), sigmarValue = c(120, 100),
deltaValue = c(200, 210), wValue = c(0.5, 0.5), dfValue = c(3, 4),
aValue = c(min(c(reads_demo$readsReverse, reads_demo$readsForward)), 73150,
max(c(reads_demo$readsReverse, reads_demo$readsForward))),
dimValue = c(length(reads_demo$readsForward),
length(reads_demo$readsReverse)))

## Final position of the nucleosomes
result$mu[1:2]

ArnaudDroitLab/RJMCMC documentation built on May 5, 2019, 7:06 a.m.