Giter Site home page Giter Site logo

natug3 / natug3 Goto Github PK

View Code? Open in Web Editor NEW
4.0 1.0 0.0 28.52 MB

A program designed to streamline the nucleic acid nanotube design process by providing an intuitive but powerful user interface.

Python 100.00%
dna nanotechnology nanotube pyqt python qt nanotech

natug3's Introduction

NATuG

A program designed to streamline the nucleic acid nanotube design process.

Creating nanoscale tubular structures is an inherently tricky task, made possible by taking advantage of DNA’s unique structure. The strategic placement of Watson-Crick DNA base pairings in synthetic DNA allows for the creation of extremely precise nanotubes, with applications ranging from improved drug delivery to tissue wound repair. The design process requires both close attention to DNA’s complex geometry, precise alignment of strands, and careful base selection computations. NATuG, is a Python-based desktop application that aims to make the nucleic-acid design process simpler, easier, and even fun. NATuG provides an intuitive interface, allowing one to customize and visualize the nanotube shape, weave together helices in a matter of clicks, and apply/export sequences.

A user manual for the program is located here.

Website Blog

A blog about this project can be found here.


Quickstart Instructions

It is advised that you create a virtual environment for installing library requirements (step 4). Then, install all the requirements in the requirements.txt file, and boot the program by running launcher.py. Setting DEBUG to True in the launcher script will delete previous save states, but is will also provide enhanced logging.


Poster on NATuG

image

NATuG_poster.pdf

Program screenshots

image image

Credits

Icons from https://ionic.io/ionicons
Color Picker Widget from https://github.com/nlfmt/pyqt-colorpicker

natug3's People

Contributors

404wolf avatar dnacer avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar

natug3's Issues

User-set strand names/descriptions

It would be nice if the user could set the name of a given strand, and perhaps add a description or additional text. Strand.name is already an existent and exported attribute, and strand.description could easily be added. The strand config dialog would need additional field(s).

image

warning re: counts cells

I was trying to set the upper left cell in the counts window to 0, when this warning came up. Perhaps this should be tidied up?

Best,
Bill
Screen Shot 2023-06-20 at 12 39 25 PM

Sequence Typeface Optimization

It can be difficult to distinguish between C and G when they have a dark line going through them, particularly when they are small. Can we change the font on the sequence printout, particularly in the sideview panel, to use a better, monospaced font? I Think Century might be the best choice, since G and C are quite distinct in that font:
Screen Shot 2023-03-06 at 1 41 14 AM

Automatic Closed Tube Computer

When the user says they want R-fold rotational symmetry with N/R domains per section, the computer should immediately calculate the target value for M to be closed and print M/R = B(N-2)/(2R) as the target value for the m entries in the subunit being defined. It should also add up all the m values that the user has entered, and print the sum right below or next to the target value, so that the user can see what changes are needed to make a closed tube. (Note that if the target value is not an integer, then it won't be possible to make a close tube, which the user should be notified of explicitly.)

Also, for a system with R-fold symmetry, there should be a button that automatically sets up a closed tube if possible. I have an algorithm for that but it's a bit complex to write up here. Perhaps we can talk about it next time.

Weird behavior unnicking with adjacent linkages

When you unnick and the item after/before the nick has become a linked item, then unnicking results in weird behavior. A potential solution could be to tell the user to remove the linkage before unnicking.

bug

Single NEMid strand corrupted

When making a junction that results in a strand that has only one NEMid, somehow NoneType objects end up in the strand (or something of the sort), which results in not being able to remake the strand/interact in other weird ways.

bug

Ignoring Strand Switch Angles

In points x_coord_from_angle it calculates the interior angle as
theta_interior: float = domain.theta_m
which ignores any contribution to the interior angle associated with a strand switch.

In general, the interior angle should be
interior_angle=mtheta_c - stheta_s
or, equivalently
interior_angle= mtheta_c - sg
these two equations can take on all the same values, however, to generate the same value for the interior angle, you will need to use a different value of m in the two equations.

Domain numbers inconsistent

As you can see from this image, the angle with m=3 is identified in the top view as domain #5, but domain 2 in the Domains panel. Similarly, #0 in the top view is domain 3 in the Domains panel.

Screen Shot 2023-05-21 at 3 47 49 PM

Update uses non-existent files etc?

Hi,
I haven't been able to run NATuG since I updated a couple of days ago. I just updated again, and it still isn't working. Here's the error information. Perhaps I need to download some files to help it run?

Best,
Bill

/Users/Will/Documents/BHSEC/ResearchStudents/__WolfMermelstein/NATuG3/venv/bin/python /Users/Will/Documents/BHSEC/ResearchStudents/__WolfMermelstein/NATuG3/launcher.py
INFO:OpenGL.acceleratesupport:No OpenGL_accelerate module loaded: No module named 'OpenGL_accelerate'
WARNING:refs._nucleic_acid:Saved profiles file not found. Defaults restored.
DEBUG:refs._nucleic_acid:Loaded profiles. Profiles: {'MFD B-DNA': NucleicAcidProfile(D=2.2, H=3.549, g=134.8, T=2, B=21, Z_c=0.17, Z_s=1.26, Z_mate=0.094, theta_b=34.29, theta_c=17.1428, theta_s=2.343)}
Traceback (most recent call last):
File "/Users/Will/Documents/BHSEC/ResearchStudents/__WolfMermelstein/NATuG3/launcher.py", line 73, in
main()
File "/Users/Will/Documents/BHSEC/ResearchStudents/__WolfMermelstein/NATuG3/launcher.py", line 44, in main
import refs
File "/Users/Will/Documents/BHSEC/ResearchStudents/__WolfMermelstein/NATuG3/refs/init.py", line 15, in
domains = _Domains()
^^^^^^^^^^
File "/Users/Will/Documents/BHSEC/ResearchStudents/__WolfMermelstein/NATuG3/refs/_domains.py", line 39, in init
self.load()
File "/Users/Will/Documents/BHSEC/ResearchStudents/__WolfMermelstein/NATuG3/refs/_domains.py", line 45, in load
self.current = pickle.load(filename)
^^^^^^^^^^^^^^^^^^^^^
_pickle.UnpicklingError: invalid load key, '\xef'.
Exception ignored in atexit callback: <bound method _NucleicAcid.dump of <refs._nucleic_acid._NucleicAcid object at 0x11220e790>>
Traceback (most recent call last):
File "/Users/Will/Documents/BHSEC/ResearchStudents/__WolfMermelstein/NATuG3/refs/_nucleic_acid.py", line 66, in dump
with open(self.filenames.profiles, "wb") as file:
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
FileNotFoundError: [Errno 2] No such file or directory: 'saves/nucleic_acid/profiles.nano'

Process finished with exit code 1

Nicking/unnicking messes up strand styles & parenting

Nicking and then unnicking interdomain strands messes up the styles of the points within the strand. When nicking/unnicking is done multiple times in multiple places along a strand, the nick eventually can no longer be undone because of messed up parenting.

Non-junctions look like junctions

It can be very difficult to tell where junctions are or are not in the red strand. The image as it stands could have at least two different routes that the red strand takes.

image

M/R Not updating immediately

For some reason, when I change the m value of some domain, I need to click on a few boxes before the M/R value updates.

Active junction determination

Making a cross strand exchange may cause active junctions to appear elsewhere, and this is not taken into account.

image

Avoid Parallel junctions in rotationally symmetric tubes

I just noticed a problem I had not considered previously. If you create a rotationally symmetric tube with an odd number of DNA domains per subunit, and if the first subunit has all antiparallel junctions with 0 strand switches, then at the boundary between subunits you end up with parallel junctions. See attached picture, and note that the yellow strand changes directions as it goes from domain 1 to 2 to 3 from up to down to up. However, when it goes from 3 to 4, it goes from the up helix in 3 to the up helix in 4. That's the logical thing for it to do, but in practice, people will want all antiparallel junctions most of the time, so we should probably put in a check box that says "Always antiparallel junctions", and if the user checks yes (which should be the default), then the left junction of each domain added under symmetry operations should be the opposite of the right junction of the previous domain, and the right junction of each domain added under symmetry operations should be the opposite of the left junction of the previous domain. Ask me about it if that explanation is too confusing (or if you have a better strategy for dealing with this).
Screen Shot 2022-11-24 at 10 33 51 PM

Cross screen strand line drawing

When the next item after a given nucleoside on the right side of the screen is a nucleoside then do not draw a small cross-screen indicator line.

image
image

Triangle Size Changing Unexpectedly

@DNAcer

You mentioned in a different issue that there may be a bug with changing the color of strands, but I haven't been able to replicate it. Are you able to send a screenshot?

However, I have found that any time I manually set the color of a strand, the NEMid triangles generally get larger, but the junctable NEMid triangles get smaller. The problem goes away if I set the color to autoselect again, but it doesn't seem to go away otherwise, as far as I have been able to tell.

Opening formerly closed strand from bottom breaks interdomainity

When you create a closed strand, then open it from the bottom, and then from the top, the resulting two strands have NEMids from the others' strand.

Gif indicating the problem
broken

Gif indicating how the problem is specifically when the closed strand is opened up from the bottom; opening it up from the top works fine
working

Big Loop Can't be Split into two Small Loops

If you have one strand forming a big loop (such as the red loop in the first image below), and you try to make a junction between two points on that strand (such as by clicking on the middle NEMiDs in the loop), it should split into two smaller loops. Instead it gets tangled up. See second image.
Screen Shot 2022-11-19 at 1 08 01 AM
Screen Shot 2022-11-19 at 1 08 13 AM

Auto side view not recomputing dimensions upon file load

Steps to reproduce:

  1. Load a domains preset with more or less domains than the currently loaded domains preset
  2. Click auto update (it won't work and will assume the same dimensions)
  3. Click update plots (it will enable auto updating to work but won't actually update)

Identify Unstable Joints

Hi,

It would be handy if any joint that didn't have two or more junctions on it would be highlighted/identified somehow.

Cheers,
Blll

Top view to side view repanning doesn't undo

When you click on a helical domain in the top view plot it should pan over to the relevant portion of the side view plot. When you click again, it should take you back to where you were (or auto-range the plot). Right now it doesn't do either.

bug

Top view appears closed when not closed

When the first domain is tangential to the last domain the tube may not actually be closable, but the top view plot plots it as if it is.

  • Instead of displaying the zeroth domain, draw a half line on the oneth domain that comes from the zeroth and goes to the first (but doesn't extend out)
  • Compute an additional domain beyond what we need to extract the line segment from it

image
image

Nicking Not Working

For some reason, when I try to put a nick on a tube, the whole strand graph disappears until I update graphs manually.
Screen Shot 2022-11-24 at 12 33 04 AM

SideView Generation Hanging with Certain NucleicAcidProfiles

I'm not sure what's going on, but some combinations of B and T values make the software hang when I try to update graphs. For example, T=1 seems to work with B=8, or 9, or 21, or 19 but not 10 or 13. T=2 works with B=21, or 22, but not 20.

-Bill

Separate Top View and Helix Graph Updates

When you are manipulating the top view, particularly of a large tube, it is very time consuming to wait for the computer to generate the entire helix graph every time you update the graphs. Instead, we should have a button to just update the top view, or to automatically update just the top view. That would probably be very quick - certainly 100 quicker than making the helix graph.

Also we might want to switch the tab order on the Domains window to jump from one m value to the next when we're in autoupdate topview mode, and perhaps to switch the tab order to horizontal when we're in autoupdate helix graph mode.

Off by One Error in Topview Numbers

TopviewNumbersOff

As you can easily see in this image, in the Domains tab, domain 2 has the small angle, but in the topview image, domain 3 has the small angle. That seems to be a general state - all angles appear one over in top view.

Config Window Reopening

If you pop out the config window, and then close the window (hitting the red button on the upper left on a mac), then the config window is gone and can't be reopened.

Junctions Across Screen for Unclosed Structures

Here is an example of a tube that is not closed, and yet NATuG is letting it make junctions from domain 1 to domain 8.

There should be some checks to see whether a tube can actually close:

  1. The centers of the 1st and Nth domains should be exactly one helix diameter apart.
  2. The angles of the first and last lines in the tube should be identical.
  3. There should be NEMids at the same value on the outer edges of the side view graph.

If all of these conditions are met, then there should be some indication on the screen somewhere. Also, if they are not all met, then there should not be any junctable NEMids on the left or right edge of the side view.

Screen Shot 2023-06-08 at 5 20 36 PM

Note: fixing the bug is probably high priority, but adding the feature is low priority.

Self-Complementary Sequences

Now that we can add linkages, we have the possibility of having a situation where one part of a strand is complementary to another part of the same strand. Thus we can't simply assign sequences independently to all the bases on a single strand. For each base assigned, we need to check whether the complementary base is on the same strand, and if it is, then we need to assign that base consistently.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.