Closed bananabenana closed 2 years ago
I encountered the same problem when I was fining a BGMM using popPUNK version 2.4.0. I circumvented this problem by adding the option --unconstrained
.
This can happen when the optimisation range isn't working well.
As @wanyuac notes, you can try with the unconstrained mode (though this is a little slower).
Alternatively, you can add --pos-shift
and --neg-shift
to change the range. If you look at your output from DBSCAN, the range automatically chosen will be between the centroid of the component nearest the origin and the centroid of the second nearest. So you may want a small value to these to get the fit to work, look at the output from a successful refine run, and increase the range a bit further.
Finally, you can always manually specify the entire search range with --manual-start
. See https://poppunk.readthedocs.io/en/latest/model_fitting.html#using-fit-refinement-when-mixture-model-totally-fails
Hi, @wanyuac and @johnlees, both of these flags worked on separate runs and improved my fits. Thanks for your responses.
Versions
Command used and output returned I have successfully run popPUNK from database building to visualisation. Great tool - big fan.
However, I am having an issue with the model refinement step. I am trying to refine my dbscan model fit. It already had a fairly good score profile from my understanding, and this makes sense biologically:
When I run:
poppunk \ --fit-model refine \ --ref-db database \ --model-dir database/dbscan_model_fit \ --output database/refine_dbscan_model_fit \ --graph-weights \ --threads 48
on my dataset of ~7k Klebsiella genomes:
Describe the bug I was expecting to see a further refined model and improvement of the scores. Instead, I get an error message:
Optimisation failed: produced a boundary outside of allowed range
Log:Is there a parameter I can change to avoid this occurring?
Thanks!