gview: Visualize gene isoforms

Description Usage Arguments Value Examples

View source: R/gview.R

Description

Visualize reference genome. Rectangles represent exons. Arrow represents orientation of transcripts.

Usage

1
2
3
4
gview(ensemblGenome, chr = 1, start = 1,
  end = max(refGenome::getGtf(ensemblGenome)$end), rect_width = 0.3,
  line_width = 0.5, arrow_segments = 10, arrow_width = 30,
  arrow_length = 0.08, arrow_type = "open", text_size = 4)

Arguments

ensemblGenome

A 'ensemblGenome' object derived from running ensemblGenome() function from refGenome package.

chr

Chromosome name. Integer or "X", "Y", "MT".

start

Genomic coordinate of the start position.

end

Genomic coordinate of the end position.

rect_width

Exon widths. Default 0.3.

line_width

Line weight. Default 0.5.

arrow_segments

The number of segments lines be divided to. The greater the number, more arrows there are. Default 10.

arrow_width

The angle of the arrow head in degrees (smaller numbers produce narrower, pointier arrows). Essentially describes the width of the arrow head. Passed to the angle parameter of arrow function. Default 30.

arrow_length

The length of the arrow head. Passed to the length argument of arrow function. Default 0.08.

arrow_type

One of "open" or "closed" indicating whether the arrow head should be a closed triangle. Passed to the type argument of arrow function. Default "open".

text_size

Size of text. Passed to the size argument of the geom_text function. Default 4.

Value

A ggplot object of genomic view

Examples

1
2
3
4
5
gtf <- system.file("extdata", "GRCm38_MT.gtf", package = "scruff")
gtfEG = refGenome::ensemblGenome(dirname(gtf))
refGenome::read.gtf(gtfEG, filename = basename(gtf))
g <- gview(gtfEG, chr = "MT")
g

compbiomed/scruff documentation built on May 30, 2019, 12:48 p.m.