unifyRanges: Unification of Exonic ranges.

Description Usage Arguments Details Value Author(s) Examples

Description

Unified ranges are intended to be used as preparation of exonic coordinates for counting of alignments (reads) inside these regions. In order to prevent ambiguities, overlaps between exons are removed.

Usage

1
unifyRanges(object)

Arguments

object

refExons object. Contains exonic coordinates data.

Details

Removal of overlaps works as follows: Ranges are sorted according to their seqid and begin value. Ranges which are contained in a precedent range are removed. For ranges with partial overlap with a precedent range, the start position is shifted to one position after the end of the precedent range. The size of the shift is contained in the 'ubs' value. An overview over the size and the number (begin-) shifts can be obtained using the plotUbs function.

Value

The unifyRanges function returns a refExons object. The data table contains the following columns:

id Numeric index retained from the incoming refExons object.
seqid Chromosome identifier
begin begin of range
end end of range
strand strand for exon (+ or -)
gene_id Fene identifier
transcript_id Transcript identifier
gene_name Gene name
exon_number Exon numbe
ubs Unification begin shift. Number by which begin has been increased during the unification process

Author(s)

Wolfgang Kaisers

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
##-------------------------------------##
## A) Ensembl
##-------------------------------------##
ensfile <- system.file("extdata",
                        "hs.ensembl.62.small.RData", package="refGenome")
ens <- loadGenome(ensfile)
enex <- refExons(ens)

saveGenome(enex,"enex.RData", useBasedir=FALSE)
er <- loadGenome("enex.RData")

# Unify exons
uex <- unifyRanges(enex)
plotUbs(uex, xlim=c(0,400), ylim=c(0,5))

##-------------------------------------##
## B) UCSC
##-------------------------------------##
ucfile <- system.file("extdata", "hs.ucsc.small.RData", package="refGenome")
uc <- loadGenome(ucfile)
ucex <- refExons(uc)
# Unify exons
uex <- unifyRanges(enex)
plotUbs(uex, xlim=c(0,400), ylim=c(0,5))

refGenome documentation built on May 23, 2019, 1:03 a.m.