Skip to content
Snippets Groups Projects
Commit 67748c07 authored by Claire-Jing ROUCHET's avatar Claire-Jing ROUCHET
Browse files

fonction save_alignments

parent d01c71cf
No related branches found
No related tags found
No related merge requests found
...@@ -202,6 +202,15 @@ class AlignmentSeqTestCase(unittest.TestCase): ...@@ -202,6 +202,15 @@ class AlignmentSeqTestCase(unittest.TestCase):
# #
# print("Fine", filename) # print("Fine", filename)
# ============================================================================= # =============================================================================
def save_alignments(self, NameFile):
from alignementseq import align2steps
for s1, s2, filename in self.get_dataset_heads():
score, r1, r2 = align2steps(s1, s2)
with open("balibase/" + str(NameFile)+'.fasta', "w") as fd:
Bio.SeqIO.write((r1, r2), fd, "fasta")
class PerformanceTestCase(AlignmentSeqTestCase): class PerformanceTestCase(AlignmentSeqTestCase):
"""Performance tests, slow. """Performance tests, slow.
...@@ -271,7 +280,6 @@ class PerformanceTestCase(AlignmentSeqTestCase): ...@@ -271,7 +280,6 @@ class PerformanceTestCase(AlignmentSeqTestCase):
p.terminate() p.terminate()
p.join() p.join()
print("{}: timeout".format(method.__name__)) print("{}: timeout".format(method.__name__))
def load_tests(loader, standard_tests, pattern): def load_tests(loader, standard_tests, pattern):
return unittest.defaultTestLoader.loadTestsFromTestCase(AlignmentSeqTestCase) return unittest.defaultTestLoader.loadTestsFromTestCase(AlignmentSeqTestCase)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment