Skip to contents

Calculate the cell probability z-score for each cell and bulk sample. Cell probability z-score associated with query sample_i: z-score_i = (ConDecon_obj$Normalized_cell.prob[,i] - rowMeans(ConDecon_obj$Normalized_cell.prob)) / RowSds(ConDecon_obj$Normalized_cell.prob)

Usage

CalcRelativeCellProb(ConDecon_obj, rm_outliers = FALSE)

Arguments

ConDecon_obj

ConDecon object (output from RunConDecon)

rm_outliers

Boolean indicating whether to remove outlier cell probability values from the z-score calculation based on +- 1.5*IQR (default = FALSE)

Value

Relative_cell.prob matrix within ConDecon object containing the z-score cell probability values for each query bulk sample

Examples

data(counts_gps)
data(latent_gps)
data(bulk_gps)
data(variable_genes_gps)

# For this example, we will reduce the training size to max.iter = 50 to reduce run time
ConDecon_obj = RunConDecon(counts = counts_gps, latent = latent_gps, bulk = bulk_gps,
variable.features = variable_genes_gps, max.iter = 50)
#> Warning: Y is the same as X, did you mean to use dist instead?

# Recalc relative cell probability
ConDecon_obj = CalcRelativeCellProb(ConDecon_obj)