Description Usage Arguments Details Value Author(s) References Examples
Cell type-specific differential expression detection given heterogeneous gene expression matrix, cell type-specific cell proportions, and a vector of group assignment (e.g., case-control study).
1 2 | lrcde(het.sub, cell.props, groups, output.file = "LRCDE_power_analysis.csv",
VERBOSE = TRUE, method = "dual", direction = "two.sided")
|
het.sub |
the samples (rows) by genes (columns) heterogeneous gene expression matrix. Should contain non-median-centered, non-standardized, positive values. log2-transformation recommended. Required |
cell.props |
the cell proportion matrix, cell types (rows) by samples (columns). The proportion should be relative, e.g., sum up to ~1 per sample. Required |
groups |
a vector of 1's and 2's indicating group assignment. Should correspond to the sample order in het.sub and cell.props. Required |
output.file |
file name to output the comma-separated results. Default: LRCDE_power.analysis.csv. |
VERBOSE |
boolean, whether to output progess to console. Default is TRUE. |
method |
cpecifies which type of regression deconvolution to perform. Only "dual" method (deconvolution of each group separately) is implemented in the current version (default). Future methods may include "ridge" and/or "single". |
direction |
the type of test to perform. Should be one of "two.sided" (default), "up", or "down". |
Each row of the results data.frame contains cell type-specific differential expression analysis statistics. Each column contains:
gene index, each gene is tested for differential expression in each cell type
cell type-specific gene expression estimate in _group 1_ (e.g., controls)
cell type-specific gene expression estimate in _group 2_ (e.g., cases)
cell type-specific gene expression difference estimate. Larger differences are of interest, given sufficient power
cell type-specific mean squared error gene expression estimatefor group 1/2, respectively
cell type-specific index
cell type-specific standard deviation across samples
group-specific condition number for the cell proportion matrixes, for group 1/2, respectively
t-statistics cutoff to reject the null hypothesis of no cell type-specific differential expression
observed t-statistics/p-value, respectively, for the cell type-specific differential expression analysis. Not corrected for multiple testing. ToDo: use '1 - p' for negative diff.est
standard error of the cell type-specific gene expression estimates for group 1/2, respectively
power of the cell type-specific differential analysis. Non-siginficant power defaults to p.val.t, power at p.val.t < 0.05 indicates potentially significant cell type-specific differences. Larger power (> 0.8) corresponds to more significant differences.
A list with three elements. The first contains a data.frame of analysis results. The second contains a list of parameters supplied to the lrcde function.
Edmund R Glass, Edmund.Glass@gmail.com, Mikhail G Dozmorov, Mikhail.Dozmorov@vcuhealth.org
https://github.com/ERGlass/lrcde.dev
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 | ## Not run:
library("lrcde")
library(CellMix)
library(GEOquery)
gedDataInfo() # Data sets in CellMix to select from
mix <- ExpressionMix("GSE19830") # Example dataset with gene expression form mixture of tissues
p.sub <- subset(pData(mix), select = c(Liver, Brain, Lung, characteristics_ch1))
het <- t(exprs(mix)) # Heterogeneous expression matrix
cell.props <- t(coef(mix)) # Cell proportions matrix
apply(cell.props, 2, sd) # SD of cell proportions should not be 0
# Cell proportion standard deviation > 0.06 across samples should
# produce reasonable differential detection power.
apply(cell.props, 1, sum) # These sum perfectly to 1.
# Create (artificially) two groups, Brain and Lung vs. Liver
p.sub.1 <- p.sub[(p.sub$Brain + p.sub$Lung) > (p.sub$Liver), ]
# Heterogeneous matrixes for each group
het.1 <- het[rownames(het) %in% rownames(p.sub.1), ]
het.2 <- het[!(rownames(het) %in% rownames(p.sub.1)), ]
het2use <- rbind(het.1, het.2) # Combined matrix
# Cell proportions for each group
cells.1 <- cell.props[rownames(cell.props) %in% rownames(p.sub.1), ]
cells.2 <- cell.props[!(rownames(cell.props) %in% rownames(p.sub.1)), ]
cell.props <- rbind(cells.1, cells.2) # Combined cell proportions
# Group vector
groups <- c(rep(1, dim(het.1)[1]), rep(2, dim(het.2)[1]))
# Now apply the lrcde function in order to deconvolve cell
# type-specific expression and perform power analysis on differential
# expression detection:
power.analysis.df <- lrcde(het2use,
cell.props,
groups,
output.file = "LRCDE_power_analysis_results.csv",
VERBOSE = TRUE,
method = "dual",
direction = "two.sided")
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.