Plot counts per feature
Source:R/AllGenerics.R, R/plotCountsPerFeature-methods.R
plotCountsPerFeature.RdGenerally, we expect similar count spreads for all genes between samples unless the library sizes or total RNA expression are different.
Usage
plotCountsPerFeature(object, ...)
# S4 method for bcbioRNASeq
plotCountsPerFeature(
object,
normalized = c("tmm", "tpm", "sf", "fpkm", "vst", "rlog", "rle"),
...
)
plotCountDensity(object, ...)Arguments
- object
Object.
- normalized
character(1)orlogical(1). Normalization method to apply:FALSE: Raw counts. When using a tximport-compatible caller, these are length scaled by default (seecountsFromAbundanceargument). When using a featureCounts-compatible caller, these areinteger.
tximport caller-specific normalizations:
"tpm": Transcripts per million.
Additional gene-level-specific normalizations:
TRUE/"sf": Size factor (i.e. library size) normalized counts.
SeeDESeq2::sizeFactorsfor details."fpkm": Fragments per kilobase per million mapped fragments.
Requiresfast = FALSEinbcbioRNASeq()call and gene annotations inrowRanges()with definedwidth().
SeeDESeq2::fpkm()for details."vst": Variance-stabilizing transformation (log2).
Requiresfast = FALSEto be set duringbcbioRNASeq()call.
SeeDESeq2::varianceStabilizingTransformation()for more information."tmm": Trimmed mean of M-values.
Calculated on the fly.
SeeedgeR::calcNormFactors()for details."rle": Relative log expression transformation.
Calculated on the fly.
SeerelativeLogExpression()for details."rlog": Deprecated. Regularized log transformation (log2).
No longer calculated automatically duringbcbioRNASeq()call, but may be defined in legacy objects.
SeeDESeq2::rlog()for details.
Note that VST is more performant and now recommended by default instead.
Note that
logical(1)support only applies tocounts(). Other functions in the package requirecharacter(1)and usematch.arg()internally.- ...
Passthrough to
SummarizedExperimentmethod defined in AcidPlots. SeeAcidPlots::plotCountsPerFeature()for details.
Functions
plotCountsPerFeature(SingleCellExperiment): AppliesaggregateCellsToSamples()calculation to summarize at sample level prior to plotting.
Passes...toSummarizedExperimentmethod.
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.