Closed porteusconf closed 3 years ago
Thank you for reaching out and taking interest in seqfold
! I'm very interested in the Vienna output, please let me know how it goes. Will you CR? Seems like an interesting feature either way
Thank you for the README catches, updating ddg
and the use of the Typing list now. I just ran the below (copy-paste from README) and confirmed that it worked:
>>> # `fold` returns a list of `seqfold.Struct` from the minimum free energy structure
>>> structs = fold("GGGAGGTCGTTACATCTGGGTAACACCGGTACTGATCCGGTGACCTCCC")
>>> print(sum(s.e for s in structs)) # -12.94, same as dg()
-13.4
>>> for struct in structs:
... print(struct) # prints the i, j, ddg, and description of each structure
...
0 48 -1.8 STACK:GG/CC
1 47 -1.8 STACK:GG/CC
2 46 -1.3 STACK:GA/CT
3 45 -1.3 STACK:AG/TC
4 44 -1.8 STACK:GG/CC
5 43 -1.5 STACK:GT/CA
6 42 -1.3 STACK:TC/AG
7 41 -0.2 BIFURCATION:4n/3h
9 22 -1.0 STACK:TT/AA
10 21 -0.6 STACK:TA/AT
11 20 -1.5 STACK:AC/TG
12 19 3.1 HAIRPIN:CA/GG
25 39 -1.8 STACK:CC/GG
26 38 -2.2 STACK:CG/GC
27 37 -1.8 STACK:GG/CC
28 36 3.4 HAIRPIN:GT/CT
>>> # `dg_cache` returns a 2D array where each (i,j) combination returns the MFE from i to j inclusive
>>> cache = dg_cache("GGGAGGTCGTTACATCTGGGTAACACCGGTACTGATCCGGTGACCTCCC")
I bumped the Python requirement to 3.5
DDG, often referred to as ΔΔG, is the change in the change in Gibbs free energy (double changes intended). DDG is a measure of the change in energy between the folded and unfolded states (ΔGfolding) and the change in ΔGfolding when a point mutation is present. https://cyrusbio.com/wp-content/uploads/Rosetta-Cartesian-DDG-2019.pdf
README should be fixed now, thanks again
my own TODO
Great work! I may try to tweak to get output in .vienna format which has the mfe appened on same line as dot-brackets. I want to count bulges, and one way to do so involves converting .vienna dot-bracket to .ct (connect) format. Seems doable ;-)
Single-char Ttpo in README.md where I think seqfold -v -l output should have ddg not dg that is:
i j ddg description
noti j dg description
BTW what does ddg stand for? May also want to mention version(s) of python 3.x required. I thinktyping
did not start showing up until 3.5 or 3.6, right? And it works differently in 3.9 per https://stackoverflow.com/questions/57505071/nameerror-name-list-is-not-defined/Also, one line I needed in python demo
Note I had to add one extra line to the python demo in README.md
from typing import List
Adding above line got rid ofNameError...
as shown below. I just pasted python demo fromREADME.md
intofileseqfold-demo.py
file.Without that one extra line I get
NameError...