seqviz icon indicating copy to clipboard operation
seqviz copied to clipboard

Sometimes restriction enzyme recognition/cut site display crashes SeqViz

Open leshane opened this issue 1 year ago • 5 comments

Related to #270

Describe the bug

For circular sequences, SeqViz crashes when an enzyme's combined recognition site and cut site sequence span straddles the last SeqBlock and first SeqBlock.

This bug was reported within the context of a related but possibly different issue:

...when the cut sites fall off the edge of a sequence, it causes the component to crash.

Expected behavior

If an enzyme's recognition sequence is detected near the end of the final SeqBlock and some-or-all the associated cut site is offset from it such that it extends off the end of the final SeqBlock, then the cut site should be displayed on the first SeqBlock, at the top of the sequence viewer display.

Additional context The reported error occurs at line 178 in elementsToRows.ts

leshane avatar Sep 19 '24 20:09 leshane

I'm not able to reproduce the crash. See the image, BsaI is twice, at the end I highlighted it because seqviz is not rendering. The problem is still valid, Seqviz should render it by drawing the cutsite in the first line. But is not crashing seqviz, so I'm wondering if the crash is related to something else.

image

guzmanvig avatar Sep 20 '24 14:09 guzmanvig

Screenshot of the error provided by Kevin:

image

guzmanvig avatar Sep 20 '24 14:09 guzmanvig

Thanks a ton for checking into this; let me see if I can narrow down my repro steps!

jpsorensen-asimov avatar Sep 24 '24 11:09 jpsorensen-asimov

Okay, I've spent a couple hours attempting to recreate this crash and have yet to succeed. Even trying to reverse engineer the failure based on the source - it's really tough to see how that particular line could fail in that particular way as the guards seem ... inescapable. Happy for you all to close this for now and I can ping / reopen if I ever manage to figure out how I was consistently getting that ^ error. Apologies for the noise!

jpsorensen-asimov avatar Sep 24 '24 14:09 jpsorensen-asimov

Thanks for trying to reproduce @jpsorensen-asimov! I went down the same path with no luck either, there are too many variables involved in the creation of the variables inside the crashing for loop, it's hard to narrow it down.

I'll modify the title of the bug to be a bit more generic (I'm not sure that is the cut site going off the end of the sequence that is causing the issue) and leave it open for a while in case someone is able to reproduce. I'll also create separate issue for Seqviz to support rendering cut sites that cross the zero index

guzmanvig avatar Sep 24 '24 16:09 guzmanvig

Closing since we are not able to reproduce the issue.

guzmanvig avatar Oct 29 '24 13:10 guzmanvig