counts2lFC
calculates log2FoldChange from counts.
counts2lFC(countData, colData, condition, ref, type = "apeglm",
apeAdapt = FALSE, ...)
a matrix of counts.
a data.frame with at least a single column. Rows of colData correspond to columns of countData.
the formula expresses how the counts for each gene depend on the variables in colData. The comparisons will be based on the alphabetical order of the levels by default. You can also specify the reference level by ref parameter
specifying the reference level
shrinkage estimator, default is "apeglm", the adaptive t prior shrinkage estimator from the 'apeglm' package.
logical, should apeglm use the MLE estimates of LFC to adapt the prior, or use default.
refer to DESeq2::lfcShrink() for more detailed parameters.
resLFC a dataframe contains log2FoldChange.
# Please note this is a downsampling of the original data.