andersen-lab / Freyja

Depth-weighted De-Mixing
BSD 2-Clause "Simplified" License
100 stars 29 forks source link

freyja demix error citing insufficient sequencing depth #208

Closed michellescribner closed 4 months ago

michellescribner commented 5 months ago

Hi there! I've recently come across a sample that is failing at freyja demix and I'm not entirely sure why. I'm seeing an error message of Solver error encountered, most likely due to insufficient sequencing depth. , but the sample coverage is actually reasonably high (2296.98, though fairly inconsistent, as shown below).

Other samples in the same run have much lower coverage, but still succeeded. Is this expected behavior for a sample with high but inconsistent coverage? Happy to provide any other details that might be hepful!

image

image

freyja version: 1.4.8 freyja update version: 2024-02-06

joshuailevy commented 5 months ago

Hey @michellescribner!

These solver errors can be a bit tricky to sort out at times, but it looks like the issue in your case is that even though you do have pretty good overall coverage, the coverage of the spike is only ok. A good option in this case is to try using the --depthcutoff parameter, which will group lineages that are indistinguishable given the available sequencing, often causing solver issues (that error message is supposed to mention this- i've just added it). It will also return a yml file that includes the lineages that have been grouped. If you set --depthcutoff to 1, does the solver still not converge?

Josh

michellescribner commented 4 months ago

Thank you so much @joshuailevy! I tried setting the --depthcutoff to 1 and it did appear to resolve the issue.

joshuailevy commented 4 months ago

Great to hear it @michellescribner! I'll go ahead and close this issue then :)