Issue #19
new

Hi all,

I'm using chicagotools for the analysis of our Capture Hi-C dataset. With default parameters everything is fine. I played around , changed the binsize and got this error:

Calculating p-value weights... Calculating scores... used (Mb) gc trigger (Mb) max used (Mb) Ncells 1172179 62.7 2164898 115.7 1172179 62.7 Vcells 1145282 8.8 662782908 5056.7 1145282 8.8 Saving the Chicago object... Plotting examples... Error in sample.int(length(x), size, replace, prob) : cannot take a sample larger than the population when 'replace = FALSE' Calls: plotBaits -> sample -> sample.int In addition: Warning messages: 1: In min(diff(x.unique)) : no non-missing arguments to min; returning Inf 2: In estimateBrownianComponent(cd) : subset > number of baits in data, so used the full dataset. 3: In estimateBrownianComponent(cd) : We're using the whole data set to calculate dispersion. There's no reason to sample repeatedly in this case, so overriding brownianNoise.samples to 1. 4: In theta.ml(Y, mu, sum(w), w, limit = control$maxit, trace = control$trace > : iteration limit reached 5: In sqrt(1/i) : NaNs produced 6: In theta.ml(Y, mu, sum(w), w, limit = control$maxit, trace = control$trace > : iteration limit reached 7: In sqrt(1/i) : NaNs produced Execution halted

So, I'm not sure what to do to overcome the problem. Would be great if someone could help. Thx a lot Steph

Hi Steph, I can see a few warnings that were produced along the way, but the error that halted the execution was already at the example baits' plotting stage, after the Chicago object has been generated and saved. This error was triggered at the step of choosing a subset of random baits to plot. By default, it tried to sample 16 baits, but it seems that there are fewer than this number of baits that was left in your data - possibly after filtering. One of the warnings below ("2: In estimateBrownianComponent(cd) : subset > number of baits in data, so used the full dataset.") also suggests that the number of baits was perhaps very small. Chicago explicitly outputs filtering stats in the process - so perhaps you can check how much was indeed filtered out.