reduce.exons: Merges exons to create a unique set of exons for each gene

Description Usage Arguments Value Author(s) Examples

View source: R/metaseqr.count.R

Description

This function uses the "reduce" function of IRanges to construct virtual unique exons for each gene, so as to avoid inflating the read counts for each gene because of multiple possible transcripts. If the user wants transcripts instead of genes, they should be supplied to the original annotation table.

Usage

1
    reduce.exons(gr, multic = FALSE)

Arguments

gr

a GRanges object created from the supplied annotation (see also the read2count and get.annotation functions.

multic

a logical value indicating the presence of multiple cores. Defaults to FALSE. Do not change it if you are not sure whether package parallel has been loaded or not.

Value

A GRanges object with virtual merged exons for each gene/transcript.

Author(s)

Panagiotis Moulos

Examples

1
2
3
4
5
6
7
8
9
    require(GenomicRanges)
    multic <- check.parallel(0.8)
    ann <- get.annotation("mm9","exon")
    gr <- makeGRangesFromDataFrame(
        df=ann,
        keep.extra.columns=TRUE,
        seqnames.field="chromosome"
    )
    re <- reduce.exons(gr,multic=multic)

pmoulos/metaseqR documentation built on Dec. 21, 2020, 6:19 a.m.