rjmcmcNucleo: Interface for the RJMCMC nucleosome mapping method in C++

Description Usage Arguments Value Author(s) Examples

View source: R/rjmcmcMethodsIntern.R View source: R/RcppExports.R

Description

Function that calls the core of the nucleosome positioning mapping function that is implemented in C++.

Usage

1
2
3
rjmcmcNucleo(startPosForwardReads, startPosReverseReads, nbrIterations, kMax,
  lambda, minInterval, maxInterval, minReads = 5L,
  adaptIterationsToReads = TRUE, vSeed = -1)

Arguments

startPosForwardReads

a vector of numeric, the start position of all the forward reads.

startPosReverseReads

a vector of numeric, the start position of all the reverse reads. Beware that the start position of a reverse read is always higher that the end positition.

nbrIterations

a positive integer or numeric, the number of iterations. Non-integer values of nbrIterations will be casted to integer and truncated towards zero.

kMax

a positive integer or numeric, the maximum number of nucleosomes per region. Non-integer values of kMax will be casted to integer and truncated towards zero.

lambda

a positive numeric, the theorical mean of the Poisson distribution. Default: 3.

minInterval

a numeric, the minimum distance between two nucleosomes.

maxInterval

a numeric, the maximum distance between two nucleosomes.

minReads

a positive integer or numeric, the minimum number of reads in a potential canditate region. Non-integer values of minReads will be casted to integer and truncated towards zero. Default: 5.

adaptIterationsToReads

a logical indicating if the number of iterations must be modified in function of the number of reads. Default: TRUE.

vSeed

a integer. A seed used when reproducible results are needed. When a value inferior or equal to zero is given, a random integer is used. Default: -1.

Value

a list containing:

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
data(reads_demo_01)

forward <- start(reads_demo_01[strand(reads_demo_01) == "+"])
reverse <- end(reads_demo_01[strand(reads_demo_01) == "-"])

## Run nucleosome positioning
result <- RJMCMCNucleosomes:::rjmcmcNucleo(
            startPosForwardReads = forward,
            startPosReverseReads = reverse,
            nbrIterations = 1000, lambda = 2, kMax = 30,
            minInterval = 146, maxInterval = 292, minReads = 5,
            adaptIterationsToReads = TRUE, vSeed = -1)

## Print the final estimation of the number of nucleosomes
result$k

## Print the position of nucleosomes
result$mu

RJMCMCNucleosomes documentation built on Nov. 8, 2020, 8:20 p.m.