New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
parameter estimation issues #29
Comments
Hi - sorry for the late reply but I was traveling this month. I would be interested in seeing the bedgraphs and also the stats file. Not sure why it only works for k=4. |
Thanks. I'm actually unable to consistently reproduce, and still trying to get a minimally working example. However, would it be possible to add some error checking in |
@rr1859 is there an email I could send you some problematic bedgraphs? |
This error still seems to happen randomly. Admittedly the data did not pass QC. But the |
Hi @rr1859 -
For a 4-bp cutter experiment with 3 replicates, using the recommend k=3 or k=5 in a near-bait analysis causes lots of warnings ("Warning: only 1 iteration. Using starting parameters") followed by the error
Error in 2:nrow(windows) : argument of length 0
. Interestingly this does not happen with k=4.This appears to be from repeated calls to
parameterEstimationCis
, which is returning parameters identical to the starting parameters. When this happens enough times, the value oflower
is finally small enough to exit out of the while-loop in nearBaitAnalysis. At that point, thepar_est_results$mod_fit
is still the same as the starting parameters.So that explains the "Using starting parameters" errors, but not the "Error in 2:nrow(windows)" error.
Tracking this down further, it appears that the error is from
viterbi3State
, in this line:R.4Cker/R/viterbi3State.R
Line 106 in db41c4d
table_intersect
dataframe, there are no regions that are called as high-interacting in all replicates, and sofinal_intersect_trim_hi
is NULL andmerge_windows
raises the error.I tried changing
set.seed(7)
toset.seed(NULL)
but this did not solve the issue.Can you provide some insight into why this error is occurring on k=3 and k=5 but not k=4? I'd be happy to provide bedGraphs. Thanks.
The text was updated successfully, but these errors were encountered: