calculateCoverageProfileFromTxdb {RCAS} | R Documentation

## calculateCoverageProfileFromTxdb

### Description

This function overlaps the input query regions with a target list of annotation features and calculates the coverage profile along the target regions.

### Usage

    calculateCoverageProfileFromTxdb(queryRegions, txdb, type, sampleN = 0)

### Arguments

`queryRegions` | GRanges object imported from a BED file using `importBed` function
`txdb` | A txdb object obtained by using `GenomicFeatures::makeTxDb` family of functions
`type` | A character string defining the type of gene feature for which a profile should be calculated. The options are: transcripts, exons, introns, promoters, fiveUTRs, threeUTRs, and cds.
`sampleN` | If set to a positive integer, the targetRegions will be downsampled to `sampleN` regions

### Value

A data.frame object consisting of two columns: 1. coverage level 2. bins. The target regions are divided into 100 equal sized bins and coverage level is summarized in a strand-specific manner using the `genomation::ScoreMatrixBin` function.

### Examples

    data(gff)
    data(queryRegions)
    txdb <- GenomicFeatures::makeTxDbFromGRanges(gff)
    df <- calculateCoverageProfileFromTxdb(queryRegions = queryRegions,
                                                   type = 'exons',
                                                   txdb = txdb,
                                                sampleN = 1000)

[Package RCAS version 1.4.4 Index]