Launch the modeling process

Share:

Description

Launch the modeling process with parameters set with modelingParams

This method model the synthesis, degradation and processign rates after their estimation by the constructor function newINSPEcT. Estimated rates are not guaranteed to optimally describes provided input data yet. To this purpose, modeled rates can be generated and genes can be assigned to a transcriptional regulatory mechanism. Modeled rates can be accessed via the method viewModelRates and gene classification according to the regulatory mechanism can be accessed by geneClass. The modeling procedure can be set by the user by modyging the parameters via modelingParams

Usage

1
2
3
4
5
modelRates(object, seed = NULL, BPPARAM = bpparam(), verbose = NULL)

## S4 method for signature 'INSPEcT'
modelRates(object, seed = NULL, BPPARAM = bpparam(),
  verbose = NULL)

Arguments

object

An object of class INSPEcT

seed

A numeric, indicatindg the seed to be set for reproducible results

BPPARAM

Parallelization parameters for bplapply. By default bpparam()

verbose

Either NULL or logical. If logical indicates whether to output some text during computation or not, if NULL it takes the information from the object (see modelingParams) (Default: NULL) used for parallelization (if nCores=1 doesn't parallelize). If NULL takes the information from the object (see modelingParams) (Default: NULL)

Details

When modeling many genes, parallelization is strongly suggested to reduce computational time. Since all genes run independently, the computational time is diveded by the number of cores used/available. However, when modeling more than 500 genes, it may happen that a single gene returns an error that escapes the try/catch controls of INSPEcT. With the parallel mode, the error will propagate on all genes that have been computed with the same processor (or core). To avoid this, the computation could be splitted in chunks and the whole data set can be obtaied by combining the chunks (see Examples).

Value

An object of class INSPEcT with modeled rates

See Also

viewModelRates, geneClass, modelingParams

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
data('rpkms', package='INSPEcT')
tpts <- c(0, 1/6, 1/3, 1/2, 1, 2, 4, 8, 16)
tL <- 1/6
mycerIds <- newINSPEcT(tpts, tL, rpkms$foursu_exons, rpkms$total_exons, 
	rpkms$foursu_introns, rpkms$total_introns, BPPARAM=SerialParam())
mycerIdsOneGene <- mycerIds[5]
## View modeling parameters
modelingParams(mycerIdsOneGene)
## Run the modeling in a reproducible way (setting seed)
mycerIdsOneGene <- modelRates(mycerIdsOneGene, seed=1, BPPARAM=SerialParam())
## view modeled synthesis rates
viewModelRates(mycerIdsOneGene, 'synthesis')
## view gene classes
geneClass(mycerIdsOneGene)

## Divide a parallel computation into chunks
## Not run: 
nCores(mycerIds) <- parallel::detectCores()
chunkSize <- 100
splitIdx <- ceiling(c(1:nGenes(mycerIds))/chunkSize)
chunks <- lapply(split(mycerIds, splitIdx), modelRates)
mycerIdsModeled <- do.call('combine', chunks)

## End(Not run)

Want to suggest features or report bugs for rdrr.io? Use the GitHub issue tracker.