cerebis / meta-sweeper

Parametric sweep of simulated microbial communities and metagenomic sequencing.
GNU General Public License v3.0
10 stars 0 forks source link

SimForward must gracefully handle templates without cutsites #42

Closed cerebis closed 8 years ago

cerebis commented 8 years ago

SimForward expects to always find a cutsite on a target. This defect has persisted as templates up until now have always been very long and the cutters 4-cutters.

Mistakenly running this against a fragmented assembly has uncovered the error. An easy fix would be to just try again. However, this gives no surety. Instead, we should test all templates at the outset and only include those containing sites, or as we encounter non-containing templates, they should be marked off and no longer included in subsequent dice-rolls.

koadman commented 8 years ago

does the extreme situation of a chromosome/dataset having no target sites in any contig need special handling? Just report an error and quit?

cerebis commented 8 years ago

Yes, that's all that is going to happening actually. I just want it to be graceful, rather than just chuck an exception stack by blindly trying to normalise an empty matrix.