gene_tracks: Gene Tracks

Description Usage Arguments Details Value Examples

View source: R/gene_tracks.R

Description

Generate gene tracks with GViz.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
gene_tracks(
  experiment,
  feature_name,
  genome_annotation = NULL,
  feature_type = "gene",
  samples = "all",
  threshold = NULL,
  upstream = 250,
  downstream = 250,
  promoter_only = FALSE,
  use_normalized = FALSE,
  tss_colors = "black",
  tsr_colors = "black",
  axis_scale = 0.25,
  ymax = NA,
  anno_pos = "top"
)

Arguments

experiment

TSRexploreR object.

feature_name

Name of gene or transcript to visualize

genome_annotation

Genome annotation in GTF, GFF3, or TxDb format.

feature_type

Either 'gene' or 'transcript'

samples

Names of samples to plot. Append sample names with 'TSS:' or 'TSR:' for TSS and TSR tracks, respectively.

threshold

TSSs or TSRs with a score below this value will not be considered.

upstream

Bases upstream to extend gene or promoter track.

downstream

Bases downstream to extend gene or promoter track.

promoter_only

Instead of plotting the entire gene, plot only the promoter region.

use_normalized

Whether to use the normalized (TRUE) or raw (FALSE) counts.

tss_colors

Either a single color value for all TSS tracks, or a vector of colors.

tsr_colors

Either a single color value for all TSR tracks, or a vector of colors.

axis_scale

Relative size scale for axis text and title.

ymax

Maximum value on y-axis for all TSS tracks.

anno_pos

Genome annotation and axis track position. Either 'top' or 'bottom'.

Details

This function generates a GViz gene track of either the promoter region, or the specified gene or transcript and surrounding region. The gene or transcript name should be supplied to 'feature_name'. 'promoter_only' controls whether the plot is of the feature promoter or the entire gene. 'upstream' and 'downstream' is relative to either the the TSS (if promoter only) or the feature boundaries (if gene/transcript).

Value

GViz gene track plot.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
data(TSSs_reduced)
annotation <- system.file("extdata", "S288C_Annotation.gtf", package="TSRexploreR")

exp <- TSSs_reduced %>%
  tsr_explorer(genome_annotation=annotation) %>%
  format_counts(data_type="tss") %>%
  tss_clustering(threshold=3)

## Not run: 
gene_tracks(exp, "YDR418W", samples=c(TSS="S288C_D_1", TSR="S288C_D_1"))

## End(Not run)

rpolicastro/tsrexplorer documentation built on Oct. 17, 2021, 3:02 p.m.