Description Usage Arguments Details Value
View source: R/calc_norm_counts.R
This function performs a number of operations on a counts object. It filters the counts to include only samples matching a sample annotation object. It optionally filters out low-count genes. It optionally normalizes, log2-transforms, and/or transposes counts. Finally, it can return either a DGEList object or a data frame.
1 2 3 4 5 6 |
counts |
a matrix or data frame of gene expression counts. Should have sample in columns and genes in rows. |
design |
a data frame of sample information. At minimum, must contain a column corresponding to sample identifiers matching column names of |
libID_col |
numeric index or character name of column in |
min_count |
numeric, the minimum count for a library to be considered passing threshold for a given gene. |
min_cpm |
numeric, the minimum counts per million for a library to be considered passing threshold for a given gene. |
min_libs_perc |
numeric, the minimum percentage of libraries that must meet |
normalize |
logical, whether to normalize counts using |
norm_method |
character, the method by which to normalize counts; passed to |
log2_transform |
logical, whether to log2 transform the counts. Defaults to |
transpose |
logical, whether to transpose the matrix or data frame of counts. |
return_DGEcounts |
logical, whether to return return counts as a |
... |
(optional) parameters passed to normalization functions. |
This function utilizes design_filter_counts
and (optionally) min_filter_counts
to filter the counts object. Genes are filtered by expression if a non-Null value is provided for either
min_count
or min_cpm
. It then (optionally) normalizes the counts, using
edgeR::calcNormFactors
. It then (optionally) log2-transforms the counts and/or transposes
the counts object. Finally, it returns the counts either as a data frame, or as a DGEList
object.
For WGCNA analyses, should use log2_transform=TRUE, transpose=TRUE, return_DGECounts=FALSE
.
For limma analyses, should use log2_transform=FALSE, transpose=FALSE, return_DGECounts=TRUE
.
a data frame or DGEList
object containing the processed counts.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.