Description Usage Arguments Value Examples
View source: R/plot_genomic_annotations.R
plot the annotations of genomic regions
either as stacked bar
or heatmap
.
The function takes the output of get_genomic_annotations
directly or it is also compatible with a similar data.frame.
1 | plot_genomic_annotations(annotations_df, plot_type = "bar", col = NULL)
|
annotations_df |
a data.frame of genomic annotations. It can either be of one sample or of multiple samples as a data.frame |
plot_type |
either |
col |
vector of colors for each feature in |
ggplot2
plot
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)
g_annotations <- get_genomic_annotations(data_table = chr21_data_table,
merge_level = 'group_level')
plot_genomic_annotations(annotations_df = g_annotations, plot_type = 'heatmap')
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.