| plot_genomic_annotations {ALPS} | R Documentation |
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.
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
## 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')