-
Notifications
You must be signed in to change notification settings - Fork 7
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
cadnano import should use helices_view_order to preserve the main view ordering of helices as they appear in cadnano #202
Comments
I opened the file with cadnano v2 and this is the ordering in cadnanov2 as well. This is because of cadnano's UI behavior when you create a design: the first helix you create is 0 and the second is 1 no matter of their relative positions on the grid. All possibilites are allowed: noth of 0 is 1, south of 0 is 1, east of 0 is 1, west of 0 is 1. |
Ah, I see. This is a difference between the layout algorithms used in scadnano versus cadnano. scadnano displays in order of helix index by default, but it attempts to be a bit more clever with the spacing, in order to help visualize helices in 3D structures. One implication is that the vertical distance between helices in the main view of scadnano is proportional to their Euclidean distance in the side view; for example, see Figure 6 here. So in the side view, if you have then 0-1 and 2-3 are adjacent in the side view (3 nm between their centers by default), but 1 is not adjacent to 2, they will be 3·3 = 9 nm apart in the main view (i.e., with room enough to fit two other helices between them, which is how many are between them in the side view): See here for a description of the layout algorithm: https://github.com/UC-Davis-molecular-computing/scadnano#relation-of-grid_position-and-position-to-side-and-main-view-display Closing as not a bug. FixEdit the Edit the "helices view order" to be the order they appear in the side view: If you want to copy-paste, that's
Be careful, because the helix ordering isn't just swapping every pair of indices. It does that until helix 23, and then it seems fairly scattershot below there: Note that as of right now, there's this other annoying bug that means you will have to refresh the page after changing the helices view order (it won't update the view after you click the OK button, but it will update the design stored in your browser's local storage): UC-Davis-molecular-computing/scadnano#677 After refreshing the page, the helices look as they do in the cadnano design: other than helix 37, which is way down on the bottom. I'd suggest moving it to be closer to the bottommost helix. |
Okay, after playing with the "fix" for a bit, I decided this isn't very straightforward, so I'm re-opening the issue and deciding we should adjust the cadnano import to handle this. What the user will most expect is to see the helices in the main view in the order they are used to seeing. Hopefully it is as straightforward as setting the default helix group's While we're at it, I'm not sure why there's a gap between helices 23 and 25 in the scadnano design. I can't see the cadnano design, so I'm not sure what's happening around those helices. |
I'm not sure what's happening either! The hole is in the cadnano design, not sure why I think it is rather a good and important thing that the cadnano -> scadnano feature reproduces exactly what is being seen in cadnano. That way there are no hidden algorithm for the user to think about and makes it easier to debug designs. It keeps things simple |
Ah, I didn't realize that. I thought scadnano import was introducing the hole.
Yes, I agree. I think the |
Dave, I have thorougly checked the code of Design constructor and the order of the helices IS lost even if the helices were give as a list. Indeed, you very early call Conclusion: do not assume that your constructor code deals with the ordering, even if input helices is a list. Hence, to solve this issue I uncommented my piece of code which set the helice view order inside the import function. I also added a test All of this is in 6170f98. |
See UC-Davis-molecular-computing/scadnano#673.
Import this cadnano design. It appears the helices have incorrect parity:
leading the design to have large spacing between every other pair of helices:
Presumably the original cadnano design had all these helices spaced equally and on top of each other in the square lattice, in order 0, 1, 2, 3, ...
The text was updated successfully, but these errors were encountered: