plotPromoters: Visualizes promoter activity and transcript model for a gene...

Description Usage Arguments Value Examples

View source: R/plot-proActiv.R

Description

Visualizes promoter activity and transcript model for a gene of interest

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
plotPromoters(
  result,
  gene,
  txdb,
  ranges,
  cex.title = 0.9,
  cex.axis = 0.9,
  cex.main = 1,
  blk.width = 500,
  blk.fill = "grey",
  blk.border = "darkgrey",
  label.col = "black",
  label.size = 0.7,
  arrow.width = NULL,
  arrow.fill = "transparent",
  arrow.border = "grey"
)

Arguments

result

A SummarizedExperiment object with assays giving promoter counts and activity with gene expression stored as column data and promoter gene id mapping stored as row data

gene

A character vector of length 1. Single gene of interest to be plotted

txdb

A TxDb object. The txdb must correspond to the genome version used in running proActiv. Here, it is recommended to use the same txdb in generating promoter annotations

ranges

A list of GRanges. Each entry in the list should correspond to a transcript that will be visualized, with Genomic Ranges giving the exons corresponding to that transcript

cex.title

A numeric value. Size of axis labels. Defaults to 0.9

cex.axis

A numeric value. Size of axis and axis ticks. Defaults to 0.9

cex.main

A numeric value. Size of plot name. Defaults to 1

blk.width

A numeric value. The width of promoters blocks in the data track. Defaults to 500 (bases)

blk.fill

A character vector of length 1. The fill colour of the promoter blocks in the data track. Defaults to 'grey'

blk.border

A character vector of length 1. The border colour of the promoter blocks in the data track. Defaults to 'darkgrey'

label.col

A character vector of length 1. The font colour of the promoter ID label in the annotation track. Defaults to 'black'

label.size

A numeric value. The size of the promoter ID label in the annotation track. Defaults to 0.7

arrow.width

A numeric value. The width of promoter arrows in the annotation track. This value is internally calculated based on the gene of interest

arrow.fill

A character vector of length 1. The fill colour of the promoter arrows in the annotation track. Defaults to 'transparent'

arrow.border

A character vector of length 1. The border colour of the promoter arrows in the annotation track. Defaults to 'grey'

Value

Outputs a plot of the promoters of the gene of interest across conditions, along with a model of transcripts belonging to the gene

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
 
## First, run proActiv to generate a summarizedExperiment result
files <- list.files(system.file('extdata/vignette/junctions', 
                       package = 'proActiv'), 
                       full.names = TRUE)
promoterAnnotation <- promoterAnnotation.gencode.v34.subset
result <- proActiv(files = files,
                       promoterAnnotation  = promoterAnnotation,
                       condition = rep(c('A549','HepG2'), each=3),
                       ncores = 1)
## Read in pre-computed ranges
txdb <- AnnotationDbi::loadDb(system.file('extdata/vignette/annotations',
                                   'gencode.v34.annotation.rap1gap.sqlite',
                                   package = 'proActiv'))
## Declare a gene of interest
gene <- 'ENSG00000076864.19'
## Call plot 
plotPromoters(result = result, gene = gene, txdb = txdb)
                           

proActiv documentation built on Nov. 8, 2020, 8:14 p.m.