Skip to contents

Plot transcript models

Usage

trackplot_gene(
  transcripts,
  region,
  exon_size = 2.5,
  gene_size = 0.5,
  label_size = 11 * 0.8/ggplot2::.pt,
  track_label = "Genes",
  return_data = FALSE
)

Arguments

transcripts

Transcipt features given as GRanges, data.frame, or list. See help("genomic-ranges-like") for details on format and coordinate systems. Required attributes:

  • chr, start, end: genomic position

  • strand: +/- or TRUE/FALSE for positive or negative strand

  • feature: Only entries marked as "transcript" or "exon" will be considered

  • gene_name: Symbol or gene ID to display

  • transcript_id: Transcritp identifier to link transcripts and exons

Usually given as the output from read_gencode_transcripts()

region

Region to plot, e.g. output from gene_region(). String of format "chr1:100-200", or list/data.frame/GRanges of length 1 specifying chr, start, end. See help("genomic-ranges-like") for details

exon_size

size for exon lines in units of mm

gene_size

size for intron/gene lines in units of mm

label_size

size for transcript labels in units of mm

return_data

If true, return data from just before plotting rather than a plot.

labels

Character vector with labels for each item in transcripts. NA for items that should not be labeled

transcript_size

size for transcript lines in units of mm

Value

Plot of gene locations