computeOverlapProfile: Compute Overlaps Profile

Description Usage Arguments Value Author(s) See Also Examples

View source: R/profile.R

Description

This function computes the distribution of a subset of regions (GRanges object) over a large region (GRanges object)

Usage

1
2
computeOverlapProfile(subRegions, largeRegion,
  windowSize = floor(width(largeRegion)/500), binary = TRUE, cores = 1)

Arguments

subRegions

a GRanges object with the sub regions; e.g. can be the DMRs.

largeRegion

a GRanges object with the region where to compute the overlaps; e.g. a chromosome

windowSize

The largeRegion is partitioned into equal sized tiles of width windowSize.

binary

a value indicating whether to count 1 for each overlap or to compute the width of the overlap

cores

the number of cores used to compute the DMRs.

Value

a GRanges object with equal sized tiles of the regions. The object has one metadata file score which represents: the number of subRegions overlapping with the tile, in the case of binary = TRUE, and the width of the subRegions overlapping with the tile , in the case of binary = FALSE.

Author(s)

Nicolae Radu Zabet

See Also

plotOverlapProfile, filterDMRs, computeDMRs and mergeDMRsIteratively

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
# load the methylation data
data(methylationDataList)

# load the DMRs in CG context
data(DMRsNoiseFilterCG)

# the coordinates of the area to be plotted
largeRegion <- GRanges(seqnames = Rle("Chr3"), ranges = IRanges(1,1E5))

# compute overlaps distribution
hotspots <- computeOverlapProfile(DMRsNoiseFilterCG, largeRegion,
           windowSize = 10000, binary = FALSE)

Example output

Loading required package: GenomicRanges
Loading required package: stats4
Loading required package: BiocGenerics
Loading required package: parallel

Attaching package: 'BiocGenerics'

The following objects are masked from 'package:parallel':

    clusterApply, clusterApplyLB, clusterCall, clusterEvalQ,
    clusterExport, clusterMap, parApply, parCapply, parLapply,
    parLapplyLB, parRapply, parSapply, parSapplyLB

The following objects are masked from 'package:stats':

    IQR, mad, sd, var, xtabs

The following objects are masked from 'package:base':

    Filter, Find, Map, Position, Reduce, anyDuplicated, append,
    as.data.frame, basename, cbind, colMeans, colSums, colnames,
    dirname, do.call, duplicated, eval, evalq, get, grep, grepl,
    intersect, is.unsorted, lapply, lengths, mapply, match, mget,
    order, paste, pmax, pmax.int, pmin, pmin.int, rank, rbind,
    rowMeans, rowSums, rownames, sapply, setdiff, sort, table, tapply,
    union, unique, unsplit, which, which.max, which.min

Loading required package: S4Vectors

Attaching package: 'S4Vectors'

The following object is masked from 'package:base':

    expand.grid

Loading required package: IRanges
Loading required package: GenomeInfoDb
Calculating overlaps for  Chr3:1..100000  using a window of  10000  bp 

DMRcaller documentation built on Nov. 8, 2020, 5:26 p.m.