function to calculate the fraction smoothed over nearest neighbors

smoothed_fraction(counts, marker, selection, nn_subset, gamma)

Arguments

counts

sparse matrix, containing counts (cols = cells, genes = rows)

marker

string, selected marker gene

selection

logical array, used to subset cells belonging to the selected sample

nn_subset

list, nearest neighbor indices and distances for cells in the sample

gamma

numeric, gamma-correction factor