bin_columns_into_quantiles
is an internal function used to convert a
vector of specificity into a vector of specificity quantiles.
This function can be iterated across a matrix using apply
to create a matrix of specificity quantiles.
bin_columns_into_quantiles(
vec,
numberOfBins = 40,
defaultBin = as.integer(numberOfBins/2)
)
The vector of gene of specificity values.
Number of quantile bins to use (40 is recommended).
Which bin to assign when there's only one non-zero quantile. In situations where there's only one non-zero quantile, cut throws an error. Avoid these situations by using a default quantile.
A vector with same length as vec
but with columns storing
quantiles instead of specificity.