Learn R Programming

groHMM (version 1.6.0)

getTxDensity: getTxDensity Calculates transcript density.

Description

Calculates transcript density for transcripts which overlapps with annotations. For 'run genes together' or 'broken up a single annotation' errors, best overlapped transcripts or annotations are used.

Usage

getTxDensity(tx, annox, plot = TRUE, scale = 1000L, nSampling = 0L, samplingRatio = 0.1, ...)

Arguments

tx
GRanges of transcripts.
annox
GRanges of non-overlapping annotatoins.
plot
Logical. If TRUE, plot transcript density. Default: TRUE
scale
Numeric. Scaled size of a gene for transcript density calculation. Default: 1000L
nSampling
Numeric. Number of subsampling. Default: 0L
samplingRatio
Numeric. Ratio of sampling for annotations. Default: 0.1
...
Extra argument passed to mclapply.

Value

Returns a list of FTD, TTD, PostTTS, and AUC.

Details

Supports parallel processing using mclapply in the 'parallel' package. To change the number of processors set the option 'mc.cores'.

Examples

Run this code
tx <- GRanges("chr7", IRanges(start=seq(1000,4000, by=1000),
width=seq(1000, 1300, by=100)), strand=rep("+", 4))
annox <- GRanges("chr7", IRanges(start=seq(1100,4100, by=1000),
width=seq(900, 1200, by=100)), strand=rep("+", 4))
## Not run:
# density <- getTxDensity(tx, annox)

Run the code above in your browser using DataLab