Automated rank cut-off estimator for input CpGs.

`rankDist(ranks, draw_intersects, noise_perc, mode, return.plot)`

## Arguments

- ranks
getPCRanks output data frame.

- draw_intersects
T/F whether to draw intersect lines if return.plot=T

- noise_perc
Automatic=0.5, numeric between 0 and 1. Fraction of ranks to use to model the background noise. Not recommended to play with this value. Increasing/decreasing returns a looser/stricter threshold, respectively.

- mode
"intersect" or "strict", determine cut-off with "intersect" or "strict" method. "Strict" is recommended for sets with lower variability

- return.plot
T/F, whether to return a plot or a numeric

## Value

If `return.plot=T`

, a `grob`

plotting the estimated `cutoff`

on a plot of absolute eigenvector score vs. absolute rank order is returned. Otherwise, a `numeric`

of the estimated cut-off is returned.

## Examples

```
ranks <- getPCRanks(eigen, IDs = c("trt", "ctl"), PC = 1)
rankDist(ranks, mode="intersect")
#> Estimated rank cut-off for significant CpGs is 980.
```