denovoExpr {casper} | R Documentation

## Estimate expression for de novo splicing variants.

### Description

Obtains expression estimates from `denovoGenomeExpr` objects, as returned by `calcDenovo`. When `rpkm` is set to `TRUE`, fragments per kilobase per million are returned. Otherwise relative expression estimates are returned.

The estimates can be obtained by Bayesian model averaging (default) or by selecting the model with highest posterior probability. See details.

### Usage

    denovoExpr(x, pc, rpkm = TRUE, summarize = "modelAvg", minProbExpr = 0.5, minExpr = 0.05)

### Arguments

`x` | `denovoGenomeExpr` object returned by `calcExp`
`pc` | Named vector of exon path counts as returned by `pathCounts`
`rpkm` | Set to `FALSE` to return relative expression levels, i.e. the proportion of reads generated from each variant per gene. These proportions add up to 1 for each gene. Set to `TRUE` to return fragments per kilobase per million (RPKM).
`summarize` | Set to `"modelAvg"` to obtain model averaging estimates, or to `"bestModel"` to select the model with highest posterior probability. We recommend the former, as even the best model may have low posterior probability.
`minProbExpr` | Variants with (marginal posterior) probability of being expressed below `minProbExpr` are omitted from the results. This argument is useful to eliminate variants that are not at least moderately supported by the data.
`minExpr` | Variants with relative expression `minExpr` are omitted from the results. This is useful to eliminate variants to which few reads are assigned, e.g. due to read miss-alignments or biases.

### Value

Expression set with expression estimates. The `featureData` indicates the gene island id, posterior probability that each variant is expressed (column `"probExpressed"`) and the number of aligned reads per gene island (column `"explCnts"`).

### Author(s)

David Rossell

### References

Rossell D, Stephan-Otto Attolini C, Kroiss M, Stocker A. Quantifying Alternative Splicing from Paired-End RNA-sequencing data. Annals of Applied Statistics, 8(1):309-330.

### Examples

    ## NOTE: toy example with few reads & genes to illustrate code usage
    ##       Results with complete data are much more interesting!

    data(K562.r1l1)
    data(hg19DB)

    #Pre-process
    bam0 <- rmShortInserts(K562.r1l1, isizeMin=100)
    pbam0 <- procBam(bam0)

    #Estimate distributions, get path counts
    distrs <- getDistrs(hg19DB,bam=bam0,readLength=75)
    pc <- pathCounts(pbam0, DB=hg19DB)

    #Set prior distrib on model space
    mprior <- modelPrior(hg19DB, maxExons=40, smooth=FALSE)

    #Fit model
    denovo <- calcDenovo(distrs,targetGenomeDB=hg19DB,pc=pc,readLength=75,priorq=3,mprior=mprior,minpp=0)

    head(names(denovo))
    denovo[['6499']]
    posprob(denovo[['6499']])

    #Get estimates
    eset <- denovoExpr(denovo, pc=pc, rpkm=TRUE, minProbExpr=0.5)

    head(exprs(eset))
    head(fData(eset))

[Package casper version 2.24.2 Index]