Description Usage Arguments Value See Also Examples
View source: R/helpers_plots.R
This function creates stacked barplot explaining reads heterogeneity. It groups reads by user defined levels and measures how unique are reads in this level. Uniqueness of reads is simplified to the bins and colored according to the color gradient. Default color black indicates very high heterogeneity of the reads. The more yellow (default) the more similar are reads and less heterogeneous.
1 2 | plot_heterogeneity(alignments, config, level = "ID",
colors = c("#000000", "#F0E442"), bins = c(0, 5, seq(10, 100, 10)))
|
alignments |
(data.frame) Loaded alignment information from alignments_events.csv file. |
config |
(data.frame) Loaded table from config_summary.csv file. |
level |
(string) Name of the column from config file specifying levels to group by. |
colors |
(html colors vector) Two colours for gradient, eg. c('#000000', '#F0E442'). |
bins |
(numeric vector) Numeric vector from 0 to 100 specifying bins eg. c(0, 5, seq(10, 100, 10)). |
(heterogeneity plot) ggplot2 object of heterogeneity plot
Other specialized plots: metaplot_deletions
,
metaplot_insertions
,
metaplot_mismatches
,
plot_cuts
, plot_deletions
,
plot_insertions
,
plot_mismatches
,
plot_variants
1 2 3 4 5 6 7 8 9 | #example config
config <- read.csv(system.file("extdata", "results", "config_summary.csv",
package = "amplican"))
#example alignments results
alignments_file <- system.file("extdata", "results", "alignments",
"events_filtered_shifted_normalized.csv",
package = "amplican")
alignments <- read.csv(alignments_file)
plot_heterogeneity(alignments[alignments$consensus, ], config)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.