calculate_first_minimum_density: Function to find the first local minimum of the density of a vector
Description
This function is used to estimate the first local minimum of the
density of a vector.
It is meant to be used on the distribution of expression of genes in a sample;
since the distribution tails off, finding the global minimum is not appropriate.
The plot option can be used to visualise the process.
matrix whose columns will be used; usually an expression matrix; it
can also be a vector
log.transform
whether to log-transform the data before the density estimation;
default is TRUE
adjust
adjust factor for the smoothing, passed to density(); default is 2
makeplots
a logical value of whether a plot with a vertical line on the minimum found
should be printed for each column of the matrix.
Value
The function outputs a single value corresponding to the median of the minima calculated
for each column of the matrix. floor() is taken as a conservative estimate