Edinburgh-Genome-Foundry / DnaChisel

:pencil2: A versatile DNA sequence optimizer
https://edinburgh-genome-foundry.github.io/DnaChisel/
MIT License
222 stars 43 forks source link

Support for optimization of RNA structure #12

Open simone-pignotti opened 5 years ago

simone-pignotti commented 5 years ago

Even though the AvoidHairpins specification is a good compromise between speed and quality of the results, there are few tools available for optimizing RNA structure accurately (none actually usable programmatically, as far as I know), and implementing it in DnaChisel would make it even more unique than it already is :) Using an external package like Vienna, it shouldn't be too hard to implement it. d-tailor is an example of how to integrate it into a codon optimization framework. Feel free to close this issue if you are not interested in supporting this feature!

Thanks Simone

Zulko commented 5 years ago

ViennaRNA or any other package would be a priori as easily integratable with DNAChisel as with D-tailor. There is no example yet in DNA Chisel because I am not sure how to formulate the specification so that it would be useful to everyone, so I would expect that you would define your own custom Specification class (which you would do in your script, you wouldn't need to fork the project for that). I'd happy to help you with your use case. In short you would need to write a new Specification class with a "evaluate" method which calls viennaRNA (I think there is a python binding) and returns a score and a list of regions to improve.

You can also use Primer3. See this file for some examples of custom Specifications using Primer3, for instance to compute melting temperature or heterodimerization.

vostrosablin commented 3 years ago

DNAChisel definitely can be used to integrate RNA structure optimization, defining your own Specifications as mentioned in the comment above. However, the performance might be not so great, as the optimization will mutate the sequence randomly and then calculate the structure using a third party algorithms

Zulko commented 3 years ago

It's true that more specialized software may mutate the sequence in a more rational, structure-oriented way than Chisel does. One way to improve Chisel's performance would be to return well-target locations for .evaluate(). This could be all the long spans of ( and ) in the structure strings of the form ...((..(.)..)).(((...))), or something more fancy.