Skip to content

Commit

Permalink
Merge pull request #5 from belleau/master
Browse files Browse the repository at this point in the history
move u initialisation outside of the if-else
  • Loading branch information
adeschen committed Jun 9, 2016
2 parents 74629a4 + 0e18345 commit 7849252
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions R/rjmcmcMethod.R
Original file line number Diff line number Diff line change
Expand Up @@ -212,10 +212,10 @@ rjmcmc <- function(startPosForwardReads, startPosReverseReads,
for (i in 2:nbrIterations) {
## List of current values that is going to be passed to sub-functions
varTilde <- list()

u <- runif(1)
if (kValue == 1L) {
## CASE : Number of nucleosomes equal to 1
u <- runif(1)


if (u <= 0.5) {
## Birth move in case k=1
Expand All @@ -233,7 +233,6 @@ rjmcmc <- function(startPosForwardReads, startPosReverseReads,
} ## end CASE : Number of nucleosomes equal to 1
else {
## CASE : Number of nucleosomes larger than 1
u<-runif(1)

if (u <= Dk(kValue, lambda, kMax)) {
## Death move
Expand Down

0 comments on commit 7849252

Please sign in to comment.