This function is used to deconvolve bulk RNA-seq data using single-cell reference generated under a different clinical condition. Cell-type-specific differentially expressed (DE) genes are defined using a T statistics, calculated as the ratio of the mean to the standard deviation of the log fold change of cell-type-specific expression between conditions over all resampling iterations.
music2_prop_t_statistics(
bulk.control.mtx,
bulk.case.mtx,
sc.sce,
clusters,
samples,
select.ct,
expr_low = 20,
prop_r = 0.1,
eps_c = 0.05,
eps_r = 0.01,
n_resample = 20,
sample_prop = 0.5,
cutoff_expr = 0.05,
cutoff_fc = 2,
cutoff_c = 0.05,
cutoff_r = 0.01,
maxiter = 200,
markers = NULL,
cell_size = NULL,
ct.cov = FALSE,
centered = FALSE,
normalize = FALSE
)
Matrix of expression for bulk data, control group
Matrix of expression for bulk data, case group
SingleCellExperiment for single cell data
character, the phenoData of single cell dataset used as clusters;
character, the phenoData of single cell dataset used as samples;
vector of cell types, default as NULL. If NULL, then use all cell types provided by the single cell dataset;
numeric, cutoff on gene expression of the bulk data. Genes with mean expression across samples in bulk data < expr_low will be excluded from cell-type-specific DE gene detection. Default is 20;
numeric, cutoff on cell type proportions for defining rare cell types. Cell types with mean proportion across samples in bulk data < prop_r will be characterized as rare cell types. Otherwise, will be characterized as common cell types. Default is 0.1;
numeric, convergence cutoff for common cell types. The cell type proportion estimate is converged if absolute relative change of proportion estimates for the current iteration against the previous iteration < eps_c. Default is 0.05;
numeric, convergence cutoff for rare cell types. The cell type proportion estimate is converged if absolute change of proportion estimates for the current iteration against the previous iteration < eps_r. Default is 0.01;
numeric, number of resamples used for detecting cell-type-specific DE genes. Default is 20;
numeric, proportion of samples to be randomly sampled without replacement under each condition at each resampling iteration. Default is 0.5;
numeric, cutoff on gene expression over resamples. Genes with average cell-type-specific expression calculated over all resamples in the lower cutoff_expr quantile are excluded from cell-type-specific DE gene detection. Default is 0.05;
numeric, cutoff on fold change over resamples. Genes with absolute value of the mean fold change calculated over all resamples < cutoff_fc are excluded from cell-type-specific DE gene detection. Default is 2;
numeric, cutoff on T statistics for defining cell-type-specific DE genes for common cell types. Genes with the value of T statistic in the upper cutoff_c quantile are considered as cell-type-specific DE genes. Default is 0.05;
numeric, cutoff on T statistics for defining cell-type-specific DE genes for rare cell types. Genes with the value of T statistic in the upper cutoff_r quantile are considered as cell-type-specific DE genes. Default is 0.01;
numeric, maximum number of iterations. Default is 200;
vector or list of gene names. Default as NULL, i.e., use all genes that provided by both bulk and single cell datasets;
data.frame of cell sizes. 1st column contains the names of cell types, 2nd column has the cell sizes per cell type. Default as NULL. If NULL, then estimate cell size from data;
logical. If TRUE, use the covariance across cell types;
logic, subtract avg of Y and D;
logic, divide Y and D by their standard deviation;
If MuSiC2 converges, return:
Est.prop: matrix, cell type proportion estimates.
convergence: logical, whether MuSiC2 converged or not.
n.iter: numeric, number of iterations.
DE.genes: vector, cell-type-specific DE genes being removed.
Or if MuSiC2 does not converge, return:
Est.prop: matrix, cell type proportion estimates.
convergence: logical, whether MuSiC2 converged or not.
id.not.converge: vector, sample ids that failed to converge.