Find extrema of a curve
find_extrema_curve.Rd
Find values corresponding to extrema of a curve (x and y dataframe). First, it estimates the first derivate. Then, it identifies extrema thanks to the sign changes in derivates. This function is called by the find_features_order function, where x is the pseudotime and y is the gene expression.
Value
This function returns a vector containing, in this order : - min_x_before : x value corresponding to min_y_before - max_x : x value corresponding to max_y - min_x_after : x value corresponding to min_y_after - min_y : global minimum of y - min_x : x value corresponding to min_y - max_y : global maximum of y - min_y_before : minimum of y just before (min_x_before < max_x < min_x_after) max_y - min_y_after : minimum of y just after (min_x_before < max_x < min_x_after) max_y - max_y2 : second maximum of y - max_x2 : x value corresponding to max_y2 To visualize these values, draw a curve looking like a W, peaking in the middle. The point : - (max_x, max_y) corresponds to the peak, in the middle of the W. - (min_x, min_y) corresponds to the global minimum. The W has two. - (min_x_before, min_y_before) corresponds to the the first minimum in the W. - (min_x_after, min_y_after) corresponds to the the second minimum in the W. - (max_x2, max_y2) corresponds to the second maximum of W.