segmentation: Split a 'GRanges' containing reads in a list of smaller...

Description Usage Arguments Value Author(s) Examples

View source: R/rjmcmcMethod.R

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

1
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

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
## 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)

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