This function is used to deconvolve bulk RNA-seq data using single-cell reference generated under a different clinical condition. Cell-type-specific DE genes are defined using TOAST (Li et al. 2019 Bioinformatics) based on cell-type-specific FDR adjusted p-values.
music2_prop_toast(
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,
cutoff_c = 10^(-3),
cutoff_r = 10^(-3),
cap = 0.3,
maxiter = 200
)
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, cutoff on FDR adjusted p-values for defining cell-type-specific DE genes for common cell types. Genes with FDR adjusted p-value <= cutoff_c are considered as cell-type-specific DE genes. Default is 10^(-3);
numeric, cutoff on FDR adjusted p-values for for defining cell-type-specific DE genes for rare cell types. Genes with FDR adjusted p-value <= cutoff_r are considered as cell-type-specific DE genes. Default is 10^(-3);
numeric, cutoff on maximum number of genes removed for each cell type. For each cell type, at the maximum, genes with FDR adjusted p-value within the lower cap quantile are removed. Default is 0.3;
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, substract 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.