Plot counts

plotCounts(object, ...)

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

Arguments

object

Object.

genes

character. Gene identifiers.

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:

...

Passthrough to SummarizedExperiment method defined in acidplots. See acidplots::plotCounts() for details.

Value

  • style = "facet": ggplot grouped by sampleName, with ggplot2::facet_wrap() applied to panel the samples.

  • style = "wide": ggplot in wide format, with genes on the x-axis.

Note

Updated 2019-09-18.

See also

Examples

data(bcb) g2s <- basejump::Gene2Symbol(bcb) geneIDs <- head(g2s[["geneID"]]) print(geneIDs)
#> [1] "ENSMUSG00000000001" "ENSMUSG00000000003" "ENSMUSG00000000028" #> [4] "ENSMUSG00000000049" "ENSMUSG00000000058" "ENSMUSG00000000078"
geneNames <- head(g2s[["geneName"]]) print(geneNames)
#> [1] "Gnai3" "Pbsn" "Cdc45" "Apoh" "Cav2" "Klf6"
plotCounts(bcb, genes = geneIDs, style = "facet")
#> Using tpm counts.
#> Applying 'log2(x + 1L)' transformation.
plotCounts(bcb, genes = geneNames, style = "wide")
#> Using tpm counts.
#> Applying 'log2(x + 1L)' transformation.