spliceGene {vasp} | R Documentation

## Calculate Splicing Scores for One Gene

### Description

Calculate splicing Scores from ballgown object for a given gene. This function can only calculate one gene. Please use function `spliceGenome` to obtain genome-wide splicing scores.

### Usage

    spliceGene(bg, gene, samples = sampleNames(bg),junc.type = c("score", "count"),
        trans.select = "rowMaxs(x)>=1", junc.select = "rowMaxs(x)>=5")

### Arguments

`bg` | ballgown object
`gene` | a character string specifying gene id
`samples` | names of samples
`junc.type` | type of junction estimate ('score' for junction score; 'count' for junction read count)
`trans.select` | logical expression-like string, indicating transcript rows to select from a matrix of transcript coverages: NA value keeps all transcripts. e.g. use trans.select='rowMaxs(x)>=1' to filter the transcrpts with the maximium coverage among all the samples less than 1.
`junc.select` | logical expression-like string, indicating junction rows to select from a matrix of junction counts: NA value keeps all junctions. e.g. use junc.select='rowMaxs(x)>=5' to filter the junctions with the maximium read count among all the samples less than 5.

### Details

score = junction count/gene-level per base read coverage. Row functions for matrices are useful to select transcripts and junctions. See `matrixStats` package.

### Value

a matrix of junction scores with intron rows and sample columns.

### See Also

`spliceGenome`, which calculates splicing scores in whole genome.

### Examples

    data(rice.bg)
    rice.bg
    head(geneIDs(rice.bg))

    score<-spliceGene(rice.bg,'MSTRG.183',junc.type='score')
    count<-spliceGene(rice.bg,'MSTRG.183',junc.type='count')

    ## compare
    tail(score)
    tail(count)

    ## get intron structrue
    intron<-structure(rice.bg)$intron
    intron[intron$id%in%rownames(score)]

[Package vasp version 0.99.26 Index]