postTreatment: A post treatment function to merge closely positioned...

Description Usage Arguments Value Author(s) Examples

Description

A helper function which merges closely positioned nucleosomes to rectify the over splitting and provide a more conservative approach. Beware that each chromosome must be treated separatly.

Usage

1
2
postTreatment(startPosForwardReads, startPosReverseReads, resultRJMCMC,
  extendingSize = 74L, chrLength)

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.

resultRJMCMC

an object of class "rjmcmcNucleosomes" or "rjmcmcNucleosomesMerge", the information about nucleosome positioning for an entire chromosome or a region that must be treated as one unit.

extendingSize

a positive numeric or a positive integer indicating the size of the consensus region used to group closeley positioned nucleosomes.The minimum size of the consensus region is equal to twice the value of the extendingSize parameter. The numeric will be treated as an integer. Default: 74.

chrLength

a positive numeric or a positive integer indicating the lenght of the current chromosome. The length of the chromosome is used to ensure that the consensus positions are all located inside the chromosome.

Value

a array of numeric, the updated values of the nucleosome positions.

Author(s)

Pascal Belleau, Astrid Deschenes

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
## Fix seed
set.seed(1132)

## Loading dataset
data(reads_demo)

## Nucleosome positioning, running both merge and split functions
result <- rjmcmc(startPosForwardReads = reads_demo$readsForward,
         startPosReverseReads = reads_demo$readsReverse,
         nbrIterations = 1000, lambda = 2, kMax = 30,
         minInterval = 146, maxInterval = 292, minReads = 5)

## Post-treatment function which merged closely positioned nucleosomes
postResult <- postTreatment(startPosForwardReads = reads_demo$readsForward,
         startPosReverseReads = reads_demo$readsReverse, result, 74, 73500)

postResult

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