This function computes the best lags for a dataset using weighted correlation
best.lag(data, timepoints, max.lag = NULL, C)
a matrix with rows representing genes and columns representing different timepoints
a vector of time points used in the dataset
a numeric value of the maximum lag allowed, if null, defaults to the floor of the number of timepoints divided by 4
a numeric value of C used in computing weighted correlation
a vector of best lags used in the dataset, one per gene