Example #1
0
def without_recal_3():
	secondary_perm = Permutations([Strand("DNA","Strand1","AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAATAA")])
	(sstr, seq, list_of_matrices_2) = master.algorithm_operator(secondary_perm, "nussinov")
	matrix_without_recal = list_of_matrices_2[0]
Example #2
0
from classes import *
from prediction import *
from visualization import Visualize
import sys, csv
import master
import timeit


# Tests of Nussinov Algorithm:

# tests that in the case of a strand of all one nucleotide, no base pairs are formed
perm = Permutations([Strand("DNA","Strand 1","AAAAAAAAAA")])
(sstr, seq, list_of_matrices) = master.algorithm_operator(perm, "nussinov")
assert(sstr == [])
perm = Permutations([Strand("RNA","Strand 1","AAAAAAAAAA")])
(sstr, seq, list_of_matrices) = master.algorithm_operator(perm, "nussinov")
assert(sstr == [])

# tests that in the case of a strand of only one nucleotide, no base pairs are formed
perm = Permutations([Strand("DNA","Strand 1","A")])
(sstr, seq, list_of_matrices) = master.algorithm_operator(perm, "nussinov")
assert(sstr == [])
perm = Permutations([Strand("RNA","Strand 1","A")])
(sstr, seq, list_of_matrices) = master.algorithm_operator(perm, "nussinov")
assert(sstr == [])
perm = Permutations([Strand("DNA","Strand 1","T")])
(sstr, seq, list_of_matrices) = master.algorithm_operator(perm, "nussinov")
assert(sstr == [])
perm = Permutations([Strand("RNA","Strand 1","U")])
(sstr, seq, list_of_matrices) = master.algorithm_operator(perm, "nussinov")
assert(sstr == [])