calculateCoverageProfile {RCAS} | R Documentation

## calculateCoverageProfile

### Description

This function checks overlaps between input query regions and annotation features, and then calculates coverage profile along target regions.

### Usage

    calculateCoverageProfile(queryRegions, targetRegions, sampleN = 0,
      bin.num = 100, bin.op = "mean", strand.aware = TRUE)

### Arguments

`queryRegions` | GRanges object imported from a BED file using `importBed` function
`targetRegions` | GRanges object containing genomic coordinates of a target feature (e.g. exons)
`sampleN` | If set to a positive integer, `targetRegions` will be downsampled to `sampleN` regions
`bin.num` | Positive integer value (default: 100) to determine how many bins the targetRegions should be split into (See genomation::ScoreMatrixBin)
`bin.op` | The operation to apply for each bin: 'min', 'max', or 'mean' (default: mean). (See genomation::ScoreMatrixBin)
`strand.aware` | TRUE/FALSE (default: TRUE) The strands of target regions are considered.

### Value

A ScoreMatrix object returned by `genomation::ScoreMatrixBin` function. Target regions are divided into 100 equal sized bins and coverage level is calculated in a strand-specific manner.

### Examples

    data(gff)
    data(queryRegions)
    txdbFeatures <- getTxdbFeaturesFromGRanges(gffData = gff)
    df <- calculateCoverageProfile(queryRegions = queryRegions,
                                  targetRegions = txdbFeatures$exons,
                                        sampleN = 1000)

[Package RCAS version 1.12.0 Index]