determine_bin_cutoff {scFeatureFilter} | R Documentation |
Takes the output of get_mean_median
and decide until which window to keep
based on background level and a threshold.
determine_bin_cutoff(metric_table, threshold = 2, selected_metric = c("mean", "median", "score"), random_function_summarisation = mean)
metric_table |
A data frame, usually the output of |
threshold |
How many time higher than the background should the last bin be? Default to 2. |
selected_metric |
Which metric to use (i.e. which column from metric_table to work with).
Default to |
random_function_summarisation |
A function used to aggregate the
randomised control across
bin. Default to |
Background level is estimated by averaging correlation coefficient obtained from the top window randomisations.
Bins (or windows) of features are kept until the mean (or median)
correlation coefficient falls under
a threshold value threshold x background level
.
A number, the first bin of features to discard.
myData <- tibble::tibble( bin = rep(c(1, 2, 3), each = 3), window = rep(c("top_window", "shuffled_top_window_1", "shuffled_top_window_2"), 3), mean = c(0.8, 0.1, 0.11, 0.14, 0.12, 0.09, 0.10, 0.13, 0.08) ) determine_bin_cutoff(myData)