Last data update: 2014.03.03

R: Plot exon structure for each transcript of a given gene.
genePlotR Documentation

Plot exon structure for each transcript of a given gene.

Description

Plot exon structure for each transcript of a given gene. Optionally, aligned reads can be added to the plot.

Usage

genePlot(generanges, islandid, genomeDB, reads, exp, names.arg, xlab='',
ylab='', xlim, cex=1, yaxt='n', col, ...)

Arguments

generanges

Object containing the ranges with start/end of each exon.

islandid

If generanges is not specified, transcripts are obtained from island islandid from the annotated genome genomeDB.

genomeDB

Annotated genome produced with the "procGenome" function

reads

pbam object with aligned reads. This is an optional argument.

exp

ExpressionSet object with expression values, as returned by calcExp. This is an optional argument.

names.arg

Optionally, indicate the names of each transcript.

xlab

x-axis label

ylab

y-axis label

xlim

x-axis limits, defaults to start of 1st exon and end of last exon

cex

Character expansion

yaxt

The y-axis in the plot has no interpretation, hence by default it is not displayed.

col

Either single color or vector of colors to be used to draw each transcript. Defaults to rainbow colors.

...

Other arguments to be passed on to plot.

Value

A plot is produced.

Methods

signature(generanges="CompressedIRangesList", islandid="ANY", genomeDB="ANY", reads="ANY", exp="ANY")

Plots a set of transcripts. Each element in the generanges corresponds to a transcript. Each transcript should contain exon start/end positions.

signature(generanges="IRanges", islandid="ANY", genomeDB="ANY", reads="ANY", exp="ANY")

Plots a single transcript. Each range indicates the start/end of a single exon.

signature(generanges="IRangesList", islandid="ANY", genomeDB="ANY", reads="ANY", exp="ANY")

Plots a set of transcripts. Each element in the generanges corresponds to a transcript. Each transcript should contain exon start/end positions.

signature(generanges="GRangesList", islandid="ANY", genomeDB="ANY", reads="ANY", exp="ANY")

Plots a set of transcripts. Each element in the generanges corresponds to a transcript. Each transcript should contain exon start/end positions.

signature(generanges="GRanges", islandid="ANY", genomeDB="ANY", reads="ANY", exp="ANY")

Plots a set of transcripts. Each space in generanges corresponds to a transcript. Each transcript should contain exon start/end positions.

signature(generanges="missing", islandid="character", genomeDB="annotatedGenome", reads="GRanges", exp="ExpressionSet")

Plots all transcripts stored in genomeDB for island with identifier islandid. Individual reads are added to the plot (reads contains start/end of individual read fragments).

signature(generanges="missing", islandid="character", genomeDB="annotatedGenome", reads="missing", exp="missing")

Plots all transcripts stored in genomeDB for island with identifier islandid.

signature(generanges="missing", islandid="character", genomeDB="annotatedGenome", reads="procBam", exp="missing")

Plots all transcripts stored in genomeDB for island with identifier islandid. Individual reads are added to the plot (reads contains start/end of individual read fragments).

signature(generanges="missing", islandid="character", genomeDB="annotatedGenome", reads="procBam", exp="ExpressionSet")

Plots all transcripts stored in genomeDB for island with identifier islandid. Individual reads and estimated expression are added to the plot (reads contains start/end of individual read fragments).

Author(s)

Camille Stephan-Otto Attolini, David Rossell

Examples

data(hg19DB)

#Plot an IRangesList
txs <- transcripts(txid="NM_005158",genomeDB=hg19DB)
genePlot(txs)

#Equivalently, indicate islandid
islandid <- getIsland(txid="NM_005158",genomeDB=hg19DB)
genePlot(islandid=islandid, genomeDB=hg19DB)

Results


R version 3.3.1 (2016-06-21) -- "Bug in Your Hair"
Copyright (C) 2016 The R Foundation for Statistical Computing
Platform: x86_64-pc-linux-gnu (64-bit)

R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under certain conditions.
Type 'license()' or 'licence()' for distribution details.

R is a collaborative project with many contributors.
Type 'contributors()' for more information and
'citation()' on how to cite R or R packages in publications.

Type 'demo()' for some demos, 'help()' for on-line help, or
'help.start()' for an HTML browser interface to help.
Type 'q()' to quit R.

> library(casper)
Loading required package: Biobase
Loading required package: BiocGenerics
Loading required package: parallel

Attaching package: 'BiocGenerics'

The following objects are masked from 'package:parallel':

    clusterApply, clusterApplyLB, clusterCall, clusterEvalQ,
    clusterExport, clusterMap, parApply, parCapply, parLapply,
    parLapplyLB, parRapply, parSapply, parSapplyLB

The following objects are masked from 'package:stats':

    IQR, mad, xtabs

The following objects are masked from 'package:base':

    Filter, Find, Map, Position, Reduce, anyDuplicated, append,
    as.data.frame, cbind, colnames, do.call, duplicated, eval, evalq,
    get, grep, grepl, intersect, is.unsorted, lapply, lengths, mapply,
    match, mget, order, paste, pmax, pmax.int, pmin, pmin.int, rank,
    rbind, rownames, sapply, setdiff, sort, table, tapply, union,
    unique, unsplit

Welcome to Bioconductor

    Vignettes contain introductory material; view with
    'browseVignettes()'. To cite Bioconductor, see
    'citation("Biobase")', and for packages 'citation("pkgname")'.

Loading required package: IRanges
Loading required package: S4Vectors
Loading required package: stats4

Attaching package: 'S4Vectors'

The following objects are masked from 'package:base':

    colMeans, colSums, expand.grid, rowMeans, rowSums

Loading required package: GenomicRanges
Loading required package: GenomeInfoDb
> png(filename="/home/ddbj/snapshot/RGM3/R_BC/result/casper/genePlot.Rd_%03d_medium.png", width=480, height=480)
> ### Name: genePlot
> ### Title: Plot exon structure for each transcript of a given gene.
> ### Aliases: genePlot genePlot-methods
> ###   genePlot,CompressedIRangesList,ANY,ANY,ANY,ANY-method
> ###   genePlot,IRanges,ANY,ANY,ANY,ANY-method
> ###   genePlot,GRangesList,ANY,ANY,ANY,ANY-method
> ###   genePlot,IRangesList,ANY,ANY,ANY,ANY-method
> ###   genePlot,GRanges,ANY,ANY,ANY,ANY-method
> ###   genePlot,missing,character,annotatedGenome,GRanges,ExpressionSet-method
> ###   genePlot,missing,character,annotatedGenome,missing,missing-method
> ###   genePlot,missing,character,annotatedGenome,procBam,ExpressionSet-method
> ###   genePlot,missing,character,annotatedGenome,procBam,missing-method
> ### Keywords: hplot
> 
> ### ** Examples
> 
> data(hg19DB)
> 
> #Plot an IRangesList
> txs <- transcripts(txid="NM_005158",genomeDB=hg19DB)
> genePlot(txs)
> 
> #Equivalently, indicate islandid
> islandid <- getIsland(txid="NM_005158",genomeDB=hg19DB)
> genePlot(islandid=islandid, genomeDB=hg19DB)
> 
> 
> 
> 
> 
> dev.off()
null device 
          1 
>