plotCoverageData | R Documentation |
Does not work on Windows, because rtracklayer cannot read BigWig files on Windows.
plotCoverageData( coverage_data_list, heights = c(0.75, 0.25), alpha = 1, fill_palette = c("#a1dab4", "#41b6c4", "#225ea8"), connect_exons = TRUE, transcript_label = TRUE, return_subplots_list = FALSE, coverage_type = "area", show_legend = FALSE )
coverage_data_list |
List of required from the extractCoverageData function:
|
heights |
Specifies the proportion of the height that is dedicated to coverage plots (first value) relative to transcript annotations (second value). (default: c(0.75,0.25)) |
alpha |
Transparency (alpha) value for the read coverage tracks. Useful to set to something < 1 when overlaying multiple tracks (see track_id). (default: 1) |
fill_palette |
Vector of fill colours used for the coverage tracks. Length must be equal to the number of unique values in track_data$colour_group column. |
connect_exons |
Print lines that connect exons together. Set to FALSE when plotting peaks (default: TRUE). |
transcript_label |
If TRUE then transcript labels are printed above each transcript. (default: TRUE). |
return_subplots_list |
Instead of a joint plot return a list of subplots that can be joined together manually. |
coverage_type |
Specifies if the read coverage is represented by either 'line', 'area' or 'both'. The 'both' option tends to give better results for wide regions. (default: area). |
show_legend |
display legend for the colour_group next to the read coverage plot (default: FALSE). |
Either object from cow_plot::plot_grid() function or a list of subplots (if return_subplots_list == TRUE)
require("dplyr") require("GenomicRanges") sample_data = dplyr::data_frame(sample_id = c("aipt_A", "aipt_C", "bima_A", "bima_C"), condition = factor(c("Naive", "LPS", "Naive", "LPS"), levels = c("Naive", "LPS")), scaling_factor = 1) %>% dplyr::mutate(bigWig = system.file("extdata", paste0(sample_id, ".str2.bw"), package = "wiggleplotr")) track_data = dplyr::mutate(sample_data, track_id = condition, colour_group = condition) selected_transcripts = c("ENST00000438495", "ENST00000392477") #Plot only two transcripts of the gens ## Not run: cov_data = extractCoverageData(ncoa7_exons[selected_transcripts], ncoa7_cdss[selected_transcripts], ncoa7_metadata, track_data) plotCoverageData(cov_data, heights = c(2,1), fill_palette = getGenotypePalette()) ## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.