plot_browser_tracks: UCSC Genome browser like plots

Description Usage Arguments Value Examples

Description

Function to plot genome browser like plots given a very minimal information such as a set of bigwig files and a genomics region. Tracks are arranged as they are in given input data.frame. Function uses highly customizable Gviz R/bioconductor package to plot browser like plots.

Usage

1
2
plot_browser_tracks(data_table, gene_range = NULL, ref_gen = "hg38",
  cex.axis = 0.5, cex.title = 0.8, ...)

Arguments

data_table

a dataframe that contains bw_path, sample_id and color_code. Tracks are colored according to color_code. Default NULL

gene_range

genomic region for which browser-like plots needed in format chr:start-end. Default NULL

ref_gen

reference genome, to get gene annotations, currently supports hg19 and hg38. Default, hg38

cex.axis

axis label size, default 0.5

cex.title

axis title size, default 0.8

...

additional arguments to change the appearence of a plot. All arguments that can be passed to base R graphics are supported

Value

plot of genome browser tracks

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
## load example data

chr21_data_table <- system.file('extdata/bw', 'ALPS_example_datatable.txt', package = 'ALPS', mustWork = TRUE)

## attach path to bw_path and bed_path
d_path <- dirname(chr21_data_table)

chr21_data_table <- read.delim(chr21_data_table, header = TRUE)
chr21_data_table$bw_path <- paste0(d_path, '/', chr21_data_table$bw_path)
chr21_data_table$bed_path <- paste0(d_path, '/', chr21_data_table$bed_path)

gene_range = 'chr21:45643725-45942454'

plot_browser_tracks(data_table = chr21_data_table,
gene_range = gene_range, ref_gen = 'hg38')

ALPS documentation built on Nov. 8, 2020, 5:52 p.m.