Skip to contents

Generally, we expect similar count spreads for all genes between samples unless the library sizes or total RNA expression are different.

Usage

plotCountsPerFeature(object, ...)

plotCountsPerGene(object, ...)

# S4 method for bcbioRNASeq
plotCountsPerFeature(
  object,
  normalized = c("tmm", "tpm", "sf", "fpkm", "vst", "rlog", "rle"),
  ...
)

plotCountDensity(object, ...)

Arguments

object

Object.

...

Passthrough to SummarizedExperiment method defined in AcidPlots. See AcidPlots::plotCountsPerFeature() for details.

normalized

character(1) or logical(1). Normalization method to apply:

  • FALSE: Raw counts. When using a tximport-compatible caller, these are length scaled by default (see countsFromAbundance argument). When using a featureCounts-compatible caller, these are integer.

tximport caller-specific normalizations:

  • "tpm": Transcripts per million.

Additional gene-level-specific normalizations:

  • TRUE / "sf": Size factor (i.e. library size) normalized counts.
    See DESeq2::sizeFactors for details.

  • "fpkm": Fragments per kilobase per million mapped fragments.
    Requires fast = FALSE in bcbioRNASeq() call and gene annotations in rowRanges() with defined width().
    See DESeq2::fpkm() for details.

  • "vst": Variance-stabilizing transformation (log2).
    Requires fast = FALSE to be set during bcbioRNASeq() call.
    See DESeq2::varianceStabilizingTransformation() for more information.

  • "tmm": Trimmed mean of M-values.
    Calculated on the fly.
    See edgeR::calcNormFactors() for details.

  • "rle": Relative log expression transformation.
    Calculated on the fly.
    See relativeLogExpression() for details.

  • "rlog": Deprecated. Regularized log transformation (log2).
    No longer calculated automatically during bcbioRNASeq() call, but may be defined in legacy objects.
    See DESeq2::rlog() for details.
    Note that VST is more performant and now recommended by default instead.

Note that logical(1) support only applies to counts(). Other functions in the package require character(1) and use match.arg() internally.

Value

ggplot.

Note

Updated 2022-03-07.

Functions

  • plotCountsPerFeature,SingleCellExperiment-method: Applies aggregateCellsToSamples() calculation to summarize at sample level prior to plotting.
    Passes ... to SummarizedExperiment method.

Author

Michael Steinbaugh, Rory Kirchner, Victor Barrera

Examples

data(bcb)

## bcbioRNASeq ====
plotCountsPerFeature(bcb)
#>  Using "tmm" counts.
#> → Applying trimmed mean of M-values (TMM) normalization.
#>  Filtered zero count rows and columns:
#> - 90 / 100 rows (90%)
#> - 6 / 6 columns (100%)
#> → Applying `log2(x + 1L)` transformation.