limma-voom to transform counts and calculate exon-level weights.
Raw counts do not fulfill the statistical assumptions required for linear modeling.
limma-voom methodology transforms counts to log2-counts per million
(logCPM), and calculates exon-level weights based on the observed mean-variance
relationship. Linear modeling methods can then be applied.
For more details, see the documentation for
voom in the
voom assumes that exon bins (rows) with zero or low counts have
already been removed, so this step should be done after filtering with
Normalization factors can be provided in a column named
norm_factors in the
column meta-data (
colData slot) of the
object. These will be used by
voom to calculate normalized library sizes. If
normalization factors are not provided,
voom will use non-normalized library
sizes (columnwise total counts) instead.
The experimental conditions or group labels for each biological sample are assumed to
be in a column named
condition in the column meta-data (
colData slot) of
RegspliceData object. This column is created when the object
is initialized with the
RegspliceData() constructor function.
The transformed counts are stored in the updated
counts matrix, which can be
accessed with the
countsData accessor function. The weights are stored
in a new data matrix labeled
weights, which can be accessed with the
weightsData accessor function. In addition, the normalized library sizes
(if available) are stored in a new column named
lib_sizes in the column
If you are using exon microarray data, this step should be skipped, since exon microarray intensities are already on a continuous scale.
Previous step: Calculate normalization factors with
Next step: Initialize
RegspliceResults object with the
RegspliceData object. Transformed counts are
stored in the
counts matrix, and weights are stored in a new
data matrix. The data matrices can be accessed with the accessor functions
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
file_counts <- system.file("extdata/vignette_counts.txt", package = "regsplice") data <- read.table(file_counts, header = TRUE, sep = "\t", stringsAsFactors = FALSE) head(data) counts <- data[, 2:7] tbl_exons <- table(sapply(strsplit(data$exon, ":"), function(s) s[])) gene_IDs <- names(tbl_exons) n_exons <- unname(tbl_exons) condition <- rep(c("untreated", "treated"), each = 3) rs_data <- RegspliceData(counts, gene_IDs, n_exons, condition) rs_data <- filterZeros(rs_data) rs_data <- filterLowCounts(rs_data) rs_data <- runNormalization(rs_data) rs_data <- runVoom(rs_data)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.