I used PureCN to analyse a bunch of whole-exome sequencing cancer samples. I encountered the following ERROR for a few samples.
Error in if (abs(old.llik - llik) < 1e-04) { : ## source code in runAbsoluteCN
missing value where TRUE/FALSE needed
Did anyone encounter the same error and fix it already?
Best,
Xiangchun
Thanks a lot Xianchun, this is very helpful. I got the data (you can delete) and I can reproduce. Will get back to you shortly.
Looks like the problem was a simple double overflow in the Simulated Annealing because you set the number of iterations to 3000. This overflow should not happen and I will submit a fix soon. However, integer optimization problems should converge quickly, that's the reason the default is only 30. If it does not converge, then the solution is probably wrong or the data is very noisy.
May I ask why you increased this default? Did you observe that it sometimes improved your results?
I haven't compared the results from iteration=30 and iteration=3000. I just worry that 30 iterations is not enough for Simulated Annealing to converge.
By the way, I found that PureCN works without error when I set cosmic.vcf.file=NULL and normalDB=NULL.
For a few samples, PureCN encountered similar ERROR when cosmic.vcf.file and normalDB are all set to NULL. I will re-run PureCN for these samples with default number of iterations in SA.
Thanks again for your reply. No worries, 30 is fine, since the SA step already starts from local optima obtained from an approximated likelihood and then just assigns integer copy numbers to copy number peaks. If this does not converge after 20 steps, it's usually very noisy data anyways and impossible to properly assign integer copy numbers to most segments. It's safe to increase to 300 or so, but won't help much.
The cosmic.vcf.file=NULL should be unrelated. normalDB in filterTargets just removes all targets with low coverage in the pool of normals. These should be exons for which the probes don't work well.