I came across this problem when translating this program to Python (here is a link to it), and the details are stated there.
In brief, when the random permutation number N is too small or when the min_count is set too high, fewer lengths of peaks will be identified, and the regression will skip those peak min values. But in the following function, these uninitialized values will still be used to calculate for an expectation number of occurrence, thus leading to problem.
I came across this problem when translating this program to Python (here is a link to it), and the details are stated there.
In brief, when the random permutation number
Nis too small or when themin_countis set too high, fewer lengths of peaks will be identified, and the regression will skip those peak min values. But in the following function, these uninitialized values will still be used to calculate for an expectation number of occurrence, thus leading to problem.