Should fix 825: import cadnano - domains that end on deletions#826
Conversation
There was a problem hiding this comment.
I'm a bit worried that this doesn't handle corner cases well. For example, what if there is a strand with a domain of length 2 and a deletion on one of its ends? I think it will have an infinite loop moving the deletion back and forth between the ends:
I'm also not sure how to handle corner cases such as this:
I'm happy to say those cases are super-rare and just not handle them (i.e., remove the deletion), but definitely don't want things to break or crash in that case.
|
I haven't seen the issue in the second case yet, the top strand is shortened by one. Is it because either of them could be considered scaffold? The first case does not hang in infinite loop, but still returns an error (I suppose when the staple is found not to exist anymore). I am not sure what the best fix is. The error given is much clearer in the case where an entire staple has deletions. In that case the error given is Invalid Design. Hopefully the code is still somewhat helpful in the future, I might have some time to improve on it, but not likely soon. |


Import from cadnano can now shorten domains that end on a deletion (or multiple deletions).
Description
Modified design.dart to look at domains and recognize which ones end on deletions.
Possibly unwanted behavior: it will shorten a scaffold too, if deletions are at either of its ends.
It might not be the best way of doing this, and it's for sure not elegant, but it might be helpful to have a first implementation.
Related Issue
#825
Motivation and Context
Avoids warning stars when importing from cadnano, automates a tedious compatibility task.
How Has This Been Tested?
Tried on multiple deletions located at strand ends.
Could not run extensive tests on this machine (no google chrome).