Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sometimes restriction enzyme recognition/cut site display crashes SeqViz #271

Closed
leshane opened this issue Sep 19, 2024 · 6 comments
Closed
Assignees
Labels
bug Something isn't working

Comments

@leshane
Copy link
Contributor

leshane commented Sep 19, 2024

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 leshane added the bug Something isn't working label Sep 19, 2024
@guzmanvig
Copy link
Collaborator

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
Copy link
Collaborator

Screenshot of the error provided by Kevin:

image

@jpsorensen-asimov
Copy link

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

@jpsorensen-asimov
Copy link

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!

@guzmanvig
Copy link
Collaborator

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 guzmanvig changed the title Restriction enzyme recognition/cut site display crashes SeqViz when straddling the end/start of a circular sequence Certain restriction enzyme recognition/cut site display crashes SeqViz Sep 24, 2024
@guzmanvig guzmanvig changed the title Certain restriction enzyme recognition/cut site display crashes SeqViz Sometimes restriction enzyme recognition/cut site display crashes SeqViz Sep 24, 2024
@guzmanvig
Copy link
Collaborator

Closing since we are not able to reproduce the issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants