Helper function to calculate the induced sparsity
calculate_sparsity_stats.RdHelper function to calculate the induced sparsity
Arguments
- object
synthetic_bulk_dataobject. You need to have runsimulate_dropouts()for this function to work.- no_exp_bins
Integer. Number of expression bins to check. Defaults to
10L.
Value
A list with various statistics about the sparsity
original_sparsity - Original proportion of zeroes in the counts.
final_sparsity - Sparsity after applying
simulate_dropouts().added_sparsity - Added sparsity.
gene_sparsity_mean - Mean sparsity for the genes.
gene_sparsity_sd - SD sparsity form the genes.
sample_sparsity_mean - Mean sparsity for the genes.
sample_sparsity_sd - SD sparsity for the genes.
dropout_by_expression - Dropout per expression bin level.