spliceGene: Calculate Splicing Scores for One Gene

Description Usage Arguments Details Value References See Also Examples

View source: R/spliceGene.R

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

1
2
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.

References

Yu, H., Du, Q., Campbell, M., Yu, B., Walia, H. and Zhang, C. (2021), Genome‐Wide Discovery of Natural Variation in Pre‐mRNA Splicing and Prioritizing Causal Alternative Splicing to Salt Stress Response in Rice. New Phytol. https://doi.org/10.1111/nph.17189

See Also

spliceGenome, which calculates splicing scores in whole genome.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
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)]

vasp documentation built on Jan. 25, 2021, 2 a.m.