segmentation {RJMCMCNucleosomes} | R Documentation

## Split a `GRanges` containing reads in a list of smaller segments for the `rjmcmc` function.

### Description

Split a `GRanges` of reads (as example, the reads from a chromosome) in a `list` of smaller `GRanges` sot that the `rjmcmc` function can be run on each segments.

### Usage

    segmentation(reads, zeta = 147, delta, maxLength)

### Arguments

`reads` | a `GRanges`, the reads that need to be segmented.
`zeta` | a positive `integer` or `numeric`, the length of the nucleosomes. Default: 147.
`delta` | a positive `integer` or `numeric`, the accepted range of overlapping section between segments. The overlapping section being `zeta` + `delta`.
`maxLength` | a positive `integer` or `numeric`, the length of each segment.

### Value

a `GRangesList` containing all the segments.

### Author(s)

Pascal Belleau, Astrid Deschenes

### Examples

    ## Load synthetic dataset of reads
    data(syntheticNucleosomeReads)

    ## Use dataset of reads to create GRanges object
    sampleGRanges <- GRanges(seqnames = syntheticNucleosomeReads$dataIP$chr,
        ranges = IRanges(start = syntheticNucleosomeReads$dataIP$start,
        end = syntheticNucleosomeReads$dataIP$end),
        strand = syntheticNucleosomeReads$dataIP$strand)

    # Segmentation of the reads
    segmentation(reads = sampleGRanges, zeta = 147, delta = 50,
    maxLength = 1000)

[Package RJMCMCNucleosomes version 1.18.0 Index]