
Plot the distribution of the mapped reads
Source:R/distribution_mapped_reads.R
plot_mapped_reads_distribution.RdDraws a box plot or a density plot of the number of reads of the barcodes in each sample. It is a quality control plot: samples of good quality have roughly the same distribution.
Arguments
- screenR_Object
The ScreenR object obtained using
create_screenr_object.- palette
An optional vector of colors for the samples (named by sample, or one for each sample in order), which replaces the palette of the object. By default the Sample palette of the object is used when it is set (see
get_palettes), otherwise the default colors of ggplot2.- alpha
The opacity of the boxes or densities, between 0 and 1. Default 1.
- type
The type of plot: "boxplot" (default) or "density".
Examples
object <- get0("object", envir = asNamespace("ScreenR"))
# Box plot
plot_mapped_reads_distribution(object)
# Density
plot_mapped_reads_distribution(object, type = "density")
# Density with transparency
plot_mapped_reads_distribution(object, type = "density", alpha = 0.2)