Learn R Programming

inDAGO (version 1.0.0)

barplotExp: barplotExp

Description

Create a barplot of library sizes per sample, optionally using effective library sizes.

Usage

barplotExp(x, palette, main, selectOrder, effecLibSize)

Value

A "ggplot" object showing per-sample barplots of library size in millions.

Arguments

x

A DGEList object from "edgeR".

palette

Character. Name of a discrete color palette from the "paletteer" package.

main

Character. Title for the barplot.

selectOrder

Character. Either "Groups" (order samples by group) or "Samples" (order by sample name).

effecLibSize

Logical. If TRUE, use effective library size (norm factors × raw size); otherwise use raw size.

Details

This function extracts library size information from an "edgeR" "DGEList", computes effective library sizes if requested, orders samples by group or name, and plots library sizes (in millions) colored by group.

  1. Extracts or computes (effecLibSize = TRUE) the library size for each sample.

  2. Orders samples by group or sample name per selectOrder.

  3. Plots bar heights as library size (×10^6) with white fill and colored borders.