Skip to content

Commit

Permalink
Restore multi-loop functionality
Browse files Browse the repository at this point in the history
- remove _debug, move to tests
- start explictly testing parts of the RNA structure in https://academic.oup.com/nar/article/45/14/8541/3861610
  • Loading branch information
jjti committed Jan 16, 2020
1 parent 06e0379 commit df71e49
Show file tree
Hide file tree
Showing 11 changed files with 294 additions and 168 deletions.
6 changes: 5 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
.PHONY: examples

install:
python3 setup.py install
pip3 install . --user

test:
python3 -m unittest discover tests -p '*_test.py'
Expand All @@ -19,5 +20,8 @@ minor: test
python3 setup.py sdist bdist_wheel
python3 -m twine upload dist/* --skip-existing

examples:
python3 ./tests/fold_examples.py

profile: install
python3 ./tests/fold_profile.py
2 changes: 1 addition & 1 deletion data/rna.py.template
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,5 @@ from .types import Comp, MultiBranch, BpEnergy, LoopEnergy, Energies

RNA_COMPLEMENT: Comp = {"A": "U", "U": "A", "G": "C", "C": "G", "N": "N"}

RNA_MULTIBRANCH: MultiBranch = (9.3, -0.6, 0)
RNA_MULTIBRANCH: MultiBranch = (2.5, 0.1, 0.4, 2.0)

8 changes: 5 additions & 3 deletions examples/dna.csv
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
seqfold,UNAFold,seq
-10.82,-10.94,GGGAGGTCGTTACATCTGGGTAACACCGGTACTGATCCGGTGACCTCCC
-1.87,-10.94,GGGAGGTCGTTACATCTGGGTAACACCGGTACTGATCCGGTGACCTCCC
-12.94,-23.4,GGGAGGTCGCTCCAGCTGGGAGGAGCGTTGGGGGTATATACCCCCAACACCGGTACTGATCCGGTGACCTCCC
-7.5,-3.8,CGCAGGGAUACCCGCG
-9.3,-6.85,TAGCTCAGCTGGGAGAGCGCCTGCTTTGCACGCAGGAGGT
-17.22,-15.5,GGGGGCATAGCTCAGCTGGGAGAGCGCCTGCTTTGCACGCAGGAGGTCTGCGGTTCGATCCCGCGCGCTCCCACCA
inf,-6.85,TAGCTCAGCTGGGAGAGCGCCTGCTTTGCACGCAGGAGGT
-4.07,-15.5,GGGGGCATAGCTCAGCTGGGAGAGCGCCTGCTTTGCACGCAGGAGGTCTGCGGTTCGATCCCGCGCGCTCCCACCA
-18.9,-18.1,TGAGACGGAAGGGGATGATTGTCCCCTTCCGTCTCA
-3.89,-3.65,ACCCCCTCCTTCCTTGGATCAAGGGGCTCAA
1600.0,-9.35,TGTCAGAAGTTTCCAAATGGCCAGCAATCAACCCATTCCATTGGGGATACAATGGTACAGTTTCGCATATTGTCGGTGAAAATGGTTCCATTAAACTCC
2 changes: 1 addition & 1 deletion seqfold/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,4 @@
finally:
del get_distribution, DistributionNotFound

from .fold import calc_dg, Cache, Struct
from .fold import calc_dg, fold, Cache, Struct
11 changes: 9 additions & 2 deletions seqfold/dna.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,15 @@

DNA_COMPLEMENT: Comp = {"A": "T", "T": "A", "G": "C", "C": "G", "N": "N"}

DNA_MULTIBRANCH: MultiBranch = (4.5, 0.2, 0.2)
"""a, b and c in a linear multi-branch energy change function."""
DNA_MULTIBRANCH: MultiBranch = (2.6, 0.2, 0.2, 2.0)
"""a, b, c, d in a linear multi-branch energy change function.
Inferred from:
Supplemental Material: Annu.Rev.Biophs.Biomol.Struct.33:415-40
doi: 10.1146/annurev.biophys.32.110601.141800
The Termodynamicso f DNA Structural Motifs
SantaLucia and Hicks, 2004
"""

DNA_NN: BpEnergy = {
"init": (0.2, -5.7),
Expand Down
Loading

0 comments on commit df71e49

Please sign in to comment.