Skip to contents

Draws 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.

Usage

plot_mapped_reads_distribution(
  screenR_Object,
  palette = NULL,
  alpha = 1,
  type = "boxplot"
)

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".

Value

A ggplot object.

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)