calcCoverage: Calculate coverages over a genomic region

View source: R/coverage.R

calcCoverageR Documentation

Calculate coverages over a genomic region

Description

This function returns a coverage list for the genomic regions in mask argument. Generally it should not be used alone and is intended for internal use, although it is useful for calculating stand-alone coverages.

Usage

    calcCoverage(input, mask, strand = NULL,
        ignore.strand = TRUE, rc = NULL)

Arguments

input

a GRanges object or a list of GRanges (not a GRangesList!) or the path to a BAM or BigWig file.

mask

a GRanges or GRangesList object.

strand

see the strandedParams in the main recoup function.

ignore.strand

see the strandedParams in the main recoup function.

rc

fraction (0-1) of cores to use in a multicore system. It defaults to NULL (no parallelization).

Details

input contains the short reads in one of the formats described in the arguments section. When input is a list, this list should contain one member per chromosome of the organism of interest.

mask contains the genomic regions over which the coverage will be calculated from the input reads. When calculating RNA-Seq profiles, mask must be a named GRangesList where each member represents the exons of the respective gene.

Value

A list of Rle objects representing the genomic coverages of interest.

Author(s)

Panagiotis Moulos

Examples

# Load some data
data("recoup_test_data",package="recoup")

# Calculate coverage Rle
mask <- makeGRangesFromDataFrame(df=test.genome,
    keep.extra.columns=TRUE)
small.cov <- calcCoverage(test.input[[1]]$ranges,mask)

pmoulos/recoup documentation built on May 20, 2024, 2:22 a.m.