splicePlot {VaSP} | R Documentation

## Gene Splicing Plot

### Description

Visualization of read coverage, splicing information and gene information in a gene region. This function is a wrapper of `getDepth`, `getGeneinfo`, `spliceGene`, `plotBedgraph` and `plotGenes`.

### Usage

    splicePlot(bg, gene, samples, bam.dir = NA, start = NA, end = NA,
                labels = samples, junc.type = c("score", "count"), junc.text = TRUE,
                trans.select = "rowMaxs(x)>=1", junc.select = "rowMaxs(x)>=5",
                col = SushiColors(2)(length(samples) + 1)[-1],transparency = 0.5,
                scale = "Kb", plotgenetype = "arrow", ...)

### Arguments

`bg` | ballgown object. See `ballgown`.
`gene` | string indicating a gene ID (must be in the 'bg')
`samples` | names of the samples to be shown (must be in the 'bg' and have bam files in the 'bam.dir')
`bam.dir` | bam file directory of the samples. If NA, instead of read depth, conserved exons are drawn.
`start` | start position to be shown. If NA, start position of the gene will be used.
`end` | stop position to be shown. If NA, end position of the gene will be used.
`labels` | labels for samples (default: sample names). If it is NA, neigher sample names nor gene names will be labeled
`junc.type` | type of junction estimates to be shown ('score' for junction score; count' for junction read count)
`junc.text` | TRUE/FALSE indicating whether junction estimates should be labeled
`trans.select` | logical expression-like string, indicating transcript rows to select from a matrix of transcript coverages: NA value keeps all transcripts. See `spliceGene`
`junc.select` | logical expression-like string, indicating junction rows to select from a matrix of junction counts: NA value keeps all junctions. See `spliceGene`
`col` | a vector of length(samples) specifying colors of read depths.
`transparency` | value between 0 and 1 indicating the degree of transparency of read depths.
`scale` | scale of the `labelgenome` ('bp','Kb','Mb')
`plotgenetype` | string specifying whether the genes should resemble a 'box' or a 'arrow'. See `plotGenes`.
`...` | values to be passed to `plotGenes`.

### Value

see `plotGenes`.

### Examples

    data(rice.bg)
    rice.bg

    samples <- paste('Sample', c('027','102','237'),sep='_')
    bam.dir <- system.file('extdata',package = 'VaSP')

    ## plot the whole gene region
    splicePlot(rice.bg,samples,bam.dir,gene='MSTRG.183',bheight=0.2)

    ## plot the alternative splicing region
    splicePlot(rice.bg,samples,bam.dir,gene='MSTRG.183',start=1179000)

[Package VaSP version 1.2.5 Index]