Description Usage Arguments Value Author(s) Examples
Attempt to randomly delete the position of one nucleosome. The function is only used when more than one nucleosome are present.
1 2 | deathMove(paramValues, kValue, muValue, sigmafValue, sigmarValue, deltaValue,
wValue, dfValue, aValue, dimValue)
|
paramValues |
a
|
kValue |
a |
muValue |
a |
sigmafValue |
a |
sigmarValue |
a |
deltaValue |
a |
wValue |
a |
dfValue |
a |
aValue |
a |
dimValue |
a |
a list
containing:
k a integer
, the updated number of nucleosomes.
mu a vector
of numeric
of length
k
, the updated positions of the nucleosomes.
sigmaf a vector
of numeric
of length
k
, the updated variance of the forward reads for each nucleosome.
sigmar a vector
of numeric
of length
k
, the updated variance of the reverse reads for each nucleosome.
delta a vector
of numeric
of length
k
, the updated distance between the maxima of the forward and
reverse reads position densities for each nucleosome.
w a vector
of positive numerical
of length
k
, the updated weight for each nucleosome.
df a vector
of positive numerical
of length
k
, the updated degrees of freedom for each nucleosome.
a a vector
of positive integer
of length
k + 1
, the updated positions, on the chromosome, delimiting the
regions of the reads associated with each nucleosome.
dim a vector
of positive integer
of length
k
, the updated number of reads associated to each nucleosome.
rho a numeric
, the acceptance probability.
Rawane Samb, Pascal Belleau, Astrid Deschenes
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]
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.