Mercurial > repos > yufei-luo > s_mart
view commons/tools/tests/Test_AlignTEOnGenomeAccordingToAnnotation.py @ 18:94ab73e8a190
Uploaded
author | m-zytnicki |
---|---|
date | Mon, 29 Apr 2013 03:20:15 -0400 |
parents | |
children |
line wrap: on
line source
from commons.core.seq.Bioseq import Bioseq from commons.core.seq.AlignedBioseqDB import AlignedBioseqDB from commons.core.sql.DbFactory import DbFactory from commons.core.sql.TableSeqAdaptator import TableSeqAdaptator from commons.core.sql.TablePathAdaptator import TablePathAdaptator from commons.core.coord.Path import Path import os import unittest from commons.tools.AlignTEOnGenomeAccordingToAnnotation import AlignTEOnGenomeAccordingToAnnotation class Test_AlignTEOnGenomeAccordingToAnnotation(unittest.TestCase): def test_alignBioseqWithNWalign(self): iBioseq1 = Bioseq("dmel_chr4", "TAATCGTAGAGGAAAAGGGTATGAGAGATTTGTTTAGAAGTACGTTACTAGTAGAAGAAA") iBioseq2 = Bioseq("DmelChr4-B-R1-Map4_NoCat", "TTTCTTCTACCTATTACATACTTTTCAACAAATCTAGCATACCCTTTTACTCTACGAGTA") iAlignedBioseq1 = Bioseq("dmel_chr4 Score=58 Identity=0.7", "TAATCGTAGAGGAAAAGGGTATGAGAGATTTGTT-TAGA-AGTACGTTACTAGTAGAAGAAA----------------------------") iAlignedBioseq2 = Bioseq("DmelChr4-B-R1-Map4_NoCat Score=58 Identity=0.7", "----------------------------TTTCTTCTACCTATTACAT-ACTTTTC-AACAAATCTAGCATACCCTTTTACTCTACGAGTA") expiAlignedBioseqDB = AlignedBioseqDB() expiAlignedBioseqDB.add(iAlignedBioseq1) expiAlignedBioseqDB.add(iAlignedBioseq2) iATEOGATA = AlignTEOnGenomeAccordingToAnnotation() obsiAlignedBioseqDB = iATEOGATA.alignBioseqWithNWalign(iBioseq1, iBioseq2) self.assertEquals(expiAlignedBioseqDB, obsiAlignedBioseqDB) def test_alignSeqAccordingToPathAndBuildAlignedSeqTable_one_path(self): iBioseq1 = Bioseq("dmel_chr4", "TTTCTTCTACTAGTAACGTACTTCTAAACAAATCTCTCATACCCTTTTCCTCTACGATTA") iBioseq2 = Bioseq("DmelChr4-B-R1-Map4_NoCat", "TTATTTGTCTCCGAACTTCTTACTGACAATGGCACCAAAATATGATCAGTGTTTGTTGGTATTAATGGCCTTTCATCTAATGGGGGAGTAGCACATCCGAGTCCGTTTTCCAGAATTTCGGCATCAATGGGGGTGGAATTTCCAAAAACACATCGGTATTTTGCAAGAACAAGAAACTTATTATTAATTACAGCTATGTATCCAGTTACACCAATAAATTTCCGTCGCCGTACTTGTTAGTCTTAATAATACCCGTACTCGTAGAGTAAAAGGGTATGCTAGATTTGTTGAAAAGTATGTAATAGGTAGAAGAAAGCGTTTTCGACCATATCAAGTATATATATATTTTTGATAAGGATTAATAGCCGAGTCGAAGTGGCCATGCCATAGACGCATAGAAGCATAGACGCAGCGTAGAGATCCATGTTTCCCACTATAACGCCCACAAACCGCCCAAAATAAAATCGAAATGTTTCGATTTTTCTTTGTTTTATTGTTTGCCTTGTCAATTTCTATGTATTTTATACCCAAAACACTTTGGCCAAGGCCAAGATGTAAGGAAGCATCTACAACACGCTTTTGAACACATCTTTTAATATCGCAGATAAATGATGAAATTTCTCGTTCACATTTCCACTACCATTCCCCGGCTCAGGGGAAACTCAACCATAGCATTCTCTCTTGCTTTGACTTCAGCATAGTGACGATAAGCACCAAGAGTCTGAATTATAAGTAGACTACCGTATAGGACTCATAAAACTGAAAAGCTGCTTTTATATTGCGATCAAAAAAGAAATTAATATTACGAAAATTGCTGTTGCTGGGGCAGGTGGATCAACATATCCCAACATATATTTAACTGTATTGCATTTTACCCTAAAATACGCTTTAATTAATGGTTTAAAAAAAACAGACTGTTTCTATTTTCTATTTCTATTTATTTTATTCTTGGAAAGTTATTTTTTTAATTTTTTGACAAGAATCTTTGAATTTACTTGCTTGCAATCCCACTAGCTAAGTGACGGGTATATAGAGTTTTCCCTTATTTTAATAATCTAGGGTCGCCAGTTTGTCCGTCAGTTCTTCGCTAACGAAGTTCGCTGTTGGCTCGGTATCGACTGTGTAGTCTAGACTCCCTTCGTTGGTCCTCCTGCTGCGTTTCGTCCTTGCTAAGGGCTTTGCCCTCTGGCTTCGTAGTCTTCCTGGTGTGTAGGGTCTATTTTGTTTCCATCTCTGAGTAAGTATAAATAAATTTGGCTTGATTTTTATACTTTAGAGAGCCGTAACGGATAATGAAATAACGCCCCCATACTCTAGATACAGTTTTATCAACAAAGAATTAACCGTATATTGTAATTTGACAAAAATGTTGTATATTTTTCTTCGTAATAAGATCGATAGGGCATAGTTCTTATAATACAAAGCCGGCTTTTCTTACATACGTATAAGTCCATACATTTTTTAAACTAAAATTTATAATTTTTTTGACAATTGTAAATAAATTGTTATCTTGCTAAAAAATAAAAAAGTTACAAAAATTTTTTAAAAATCATATTGATGTCAGCAATTAGATGTGCAATCACCATCTAGTGTAGCAGCAACATTTCCTAATTTTCGTGAAAGATGCATCTTTCGGCAATTAATATCAGTTTCAAGTGATTCCATAATCTTTAAACAAAGGTAAATAAGTGGATTAGACGAAAAAAATTACGAAAATAGGTTAAATAGGTTACCTGATCCTTATATTTAGTTATATAAATGTATAACTCTTTTAATGCAGAAATAGTATCAAACTCTTCGTTTTGCCTTACTGATAGCTGTTGCATAGCTGTACTCATTTCCTGGTCGCTTATTTGTGGAAGCCTTGATACATCGCGGTAAAACTCTTTGACCATAATTCTATAGTTTGGAATATCCTGTCATATAAACCAGTTAATTAAATATTAATGATTTTATTAAAATATTTATACCATTACTTATAAATATTTAAATTTATTATTTGTGTATAAATTTGATAAAGGTAATAATCTAAGTAATATATACCAATATATATGCATATATGTATTCACATTTAAAAAAATGAAAGGGAAAAGAATTTGAAGTCTAATTGTATAAATTGTTTTTAATTTGTTTTATTCTCATTAGACCTCGATAATAGGTCTTTTGTGTGATTAATTAATTTGATAGACTCCTTACTTACAAGAAAAGAAGAAAACAGAAGGTTTACCAGGTGTTCCCTTTATCCGTTACTCCAGTAAAGCGAGGGCGAACTAAATTTTTAAGCGTTGAAGAGGCCGTCTTGGTATTGGATCTTCCATGCTTAATGTCAACGTTCTATATTTTCATACGGACGGACATGGCCAGATC") iPath = Path() iPath.setFromTuple((1, "dmel_chr4", 1, 60, "DmelChr4-B-R1-Map4_NoCat", 315, 256, 0, 249, 81.67)) seqTable1 = "seqTable1_seq" seqTable2 = "seqTable2_seq" pathTable = "pathTable_path" iDb = DbFactory.createInstance() iDb.createTable(seqTable1, "seq", overwrite = True) iDb.createTable(seqTable2, "seq", overwrite = True) iDb.createTable(pathTable, "path", overwrite = True) iTSA1 = TableSeqAdaptator(iDb, seqTable1) iTSA2 = TableSeqAdaptator(iDb, seqTable2) iTPA = TablePathAdaptator(iDb, pathTable) iTSA1.insert(iBioseq1) iTSA2.insert(iBioseq2) iTPA.insert(iPath) expTTuples = ((1, "TAATCGTAGAGGAAAAGGGTATGAGAGATTTGTTTAGAAGTACGTTACTAG-TAGAAGAAA", "TACTCGTAGAGTAAAAGGGTATGCTAGATTTGTTGAAAAGTATGT-AATAGGTAGAAGAAA", 406, 86.440700000000004),) iATEOGATA = AlignTEOnGenomeAccordingToAnnotation(pathTable, seqTable1, seqTable2) iATEOGATA.setMergeSamePathId(True) iATEOGATA.setDbInstance(iDb) iATEOGATA.alignSeqAccordingToPathAndBuildAlignedSeqTable() #TODO: "select * from ..." + execute + fetchall => create method in TableAdaptator sqlCmd = "SELECT * FROM %s_align" % pathTable iDb.execute(sqlCmd) obsTTuples = iDb.fetchall() iDb.dropTable(seqTable1) iDb.dropTable(seqTable2) iDb.dropTable(pathTable) iDb.dropTable("%s_align" % pathTable) iDb.close() self.assertEquals(expTTuples, obsTTuples) def test_alignSeqAccordingToPathAndBuildAlignedSeqTable_n_paths(self): queryTableName = "query_seq" subjectTableName = "subject_seq" pathTableName = "table_path" iDb = DbFactory.createInstance() queryFileName = "dummyDmelChr4.fa" self._writeDummyDmelChr4(queryFileName) iDb.createTable(queryTableName, "seq", queryFileName, True) os.remove(queryFileName) iDb.createTable(subjectTableName, "seq", overwrite = True) iDb.createTable(pathTableName, "path", overwrite = True) iTSA = TableSeqAdaptator(iDb, subjectTableName) iTPA = TablePathAdaptator(iDb, pathTableName) iBioseq1 = Bioseq("DmelChr4-B-R1-Map4_NoCat", "TTATTTGTCTCCGAACTTCTTACTGACAATGGCACCAAAATATGATCAGTGTTTGTTGGTATTAATGGCCTTTCATCTAATGGGGGAGTAGCACATCCGAGTCCGTTTTCCAGAATTTCGGCATCAATGGGGGTGGAATTTCCAAAAACACATCGGTATTTTGCAAGAACAAGAAACTTATTATTAATTACAGCTATGTATCCAGTTACACCAATAAATTTCCGTCGCCGTACTTGTTAGTCTTAATAATACCCGTACTCGTAGAGTAAAAGGGTATGCTAGATTTGTTGAAAAGTATGTAATAGGTAGAAGAAAGCGTTTTCGACCATATCAAGTATATATATATTTTTGATAAGGATTAATAGCCGAGTCGAAGTGGCCATGCCATAGACGCATAGAAGCATAGACGCAGCGTAGAGATCCATGTTTCCCACTATAACGCCCACAAACCGCCCAAAATAAAATCGAAATGTTTCGATTTTTCTTTGTTTTATTGTTTGCCTTGTCAATTTCTATGTATTTTATACCCAAAACACTTTGGCCAAGGCCAAGATGTAAGGAAGCATCTACAACACGCTTTTGAACACATCTTTTAATATCGCAGATAAATGATGAAATTTCTCGTTCACATTTCCACTACCATTCCCCGGCTCAGGGGAAACTCAACCATAGCATTCTCTCTTGCTTTGACTTCAGCATAGTGACGATAAGCACCAAGAGTCTGAATTATAAGTAGACTACCGTATAGGACTCATAAAACTGAAAAGCTGCTTTTATATTGCGATCAAAAAAGAAATTAATATTACGAAAATTGCTGTTGCTGGGGCAGGTGGATCAACATATCCCAACATATATTTAACTGTATTGCATTTTACCCTAAAATACGCTTTAATTAATGGTTTAAAAAAAACAGACTGTTTCTATTTTCTATTTCTATTTATTTTATTCTTGGAAAGTTATTTTTTTAATTTTTTGACAAGAATCTTTGAATTTACTTGCTTGCAATCCCACTAGCTAAGTGACGGGTATATAGAGTTTTCCCTTATTTTAATAATCTAGGGTCGCCAGTTTGTCCGTCAGTTCTTCGCTAACGAAGTTCGCTGTTGGCTCGGTATCGACTGTGTAGTCTAGACTCCCTTCGTTGGTCCTCCTGCTGCGTTTCGTCCTTGCTAAGGGCTTTGCCCTCTGGCTTCGTAGTCTTCCTGGTGTGTAGGGTCTATTTTGTTTCCATCTCTGAGTAAGTATAAATAAATTTGGCTTGATTTTTATACTTTAGAGAGCCGTAACGGATAATGAAATAACGCCCCCATACTCTAGATACAGTTTTATCAACAAAGAATTAACCGTATATTGTAATTTGACAAAAATGTTGTATATTTTTCTTCGTAATAAGATCGATAGGGCATAGTTCTTATAATACAAAGCCGGCTTTTCTTACATACGTATAAGTCCATACATTTTTTAAACTAAAATTTATAATTTTTTTGACAATTGTAAATAAATTGTTATCTTGCTAAAAAATAAAAAAGTTACAAAAATTTTTTAAAAATCATATTGATGTCAGCAATTAGATGTGCAATCACCATCTAGTGTAGCAGCAACATTTCCTAATTTTCGTGAAAGATGCATCTTTCGGCAATTAATATCAGTTTCAAGTGATTCCATAATCTTTAAACAAAGGTAAATAAGTGGATTAGACGAAAAAAATTACGAAAATAGGTTAAATAGGTTACCTGATCCTTATATTTAGTTATATAAATGTATAACTCTTTTAATGCAGAAATAGTATCAAACTCTTCGTTTTGCCTTACTGATAGCTGTTGCATAGCTGTACTCATTTCCTGGTCGCTTATTTGTGGAAGCCTTGATACATCGCGGTAAAACTCTTTGACCATAATTCTATAGTTTGGAATATCCTGTCATATAAACCAGTTAATTAAATATTAATGATTTTATTAAAATATTTATACCATTACTTATAAATATTTAAATTTATTATTTGTGTATAAATTTGATAAAGGTAATAATCTAAGTAATATATACCAATATATATGCATATATGTATTCACATTTAAAAAAATGAAAGGGAAAAGAATTTGAAGTCTAATTGTATAAATTGTTTTTAATTTGTTTTATTCTCATTAGACCTCGATAATAGGTCTTTTGTGTGATTAATTAATTTGATAGACTCCTTACTTACAAGAAAAGAAGAAAACAGAAGGTTTACCAGGTGTTCCCTTTATCCGTTACTCCAGTAAAGCGAGGGCGAACTAAATTTTTAAGCGTTGAAGAGGCCGTCTTGGTATTGGATCTTCCATGCTTAATGTCAACGTTCTATATTTTCATACGGACGGACATGGCCAGATC") iBioseq2 = Bioseq("DmelChr4-B-R4-Map5_NoCat", "CCAAAATTGCCCTCTTTCCGCTCGCTCACGCTGAGAGCATAAGAAATCTAAAAATAGAATTTGCTTGCTTGTGTGAGTAAAAACAAGAGACGAGAACGCGTATATGTGTGCGTGTTGTGCTAGAAGACTATTTTCGGGCCGAAATCAATTCTGATCGAAAAAACGAATTTACATTGTACATATTAGGGTAGTTTTTGCCAATTTCCTAGCAATATGATAAAATAAAATAATTTTTAAAAATTCGCGCCCTGACTATTATAATTTTAAAGCTTTTAAAATTTGTTTGTTAAAATCGCCGATCGAATTAGCTACCGTTTACACATTTATATTTATGTTTAATTCTAATTTGTCTCTCATCTGACAATTTTTTAAAAGCGAAATATTTTTTTTGAAACACTTTTAATGTTAAAAATGACTTAATAAATATACTAAATAATTAAAGGAAGTACAATAGAAATTATTATAACTACTGTAATTTCATAAATTTCATAAAAATATGATAACTGTTTATTGCAAAAGTCATATCAAAGACACTAGAATTATTCTAGTGTCTTTGCTTTGTTCATATCTTGAGGCACGAAGTGCGGACACAAGCACTCAACAATCATTGCCTTATTAATTTTTCACACGCCGCAAGATGAATACTCTAATGACAAATATTCTTATATAAAGTCATTTTTGAAATTTATTTTTGTGATAATATGTACATAGATTTGGCTATTTCTAATCTATTTTCAAATAATAATAACGTTAAGGCAATGCAAAACAAGAATTTTTCGCATGGTGCCAATTGATCAAAAATAATATAGATTTAAAGTCAAAGAACTTCTAAGGTGAAGGGCATATTTTGTCAAATTTACAATGCATGAGCATACGTGTGCACACATACAGTTGTCTGCTATCACTTTATGCGTTGAAAAGAGCTGTTCGCTGTAGCGCTCTCCGCTCTCTCGCTCTCTAACAAAAATTCGAGAGAGCCTGGAGCCACCTCTAGAGCCACGGCGAAAAAATCGTGTGCCAAAAAATCGTATGGCGTTACGCATCTTGTTATTCTAGTGTCTTTGGTA") iBioseq3 = Bioseq("DmelChr4-B-G9-Map3_NoCat", "ACCAAAGACACTAGAATAACAAGATGCGTAACGGCCATACATTGGTTTGGCACTATGCAGCCACTTTTTTGGTGACGGCCAAAATTACTCTCTTTCCGCTCACTCCCGCTGAGAGCGTAAGAAATCTAAAAATATAATTTGCTTGCTTGTGTGAGTAAAAACAAGAGACGAGAACGCGTATAAGTGTGCGTGTTGTGCTAGAAGACGATTTTCGGGCCGAAATCAATTCTGATCGAAGAAACGAATTTACATGGTACATATTAGGGTAGTTTTTGCCAATTTCCTAGCAATATGATAAAAAAAAAAATTTTTTTTAAATTCGCGCCCTGACTATTATAATTTTAAAGCTTTTTAAATATGTTTGTTAAAATCGCCGCTCGAATTAGCTACCGTTTACACATTTATATTTATGTTTAATTCTAATTTGTCTCTCATCTGACAATTTTTTAAAAGCGAAATATTTTTTTAAAACACTTTTAATGTTAATGTTACATCATATTAAGTCAAATGATTTAATAAATATACTAAATAATTAAATATGATAACTGTTTATTGCAAAAGTAATATCAAAGACACTAGAATAATTCTAATGCTTTGTTCATATCTTGAGGCACGAAGTGCGGACACAAGCCCTCAACAATCATTGGCTTATTAATTTTTCACACGCCGCAAGATGAATACTCTAATGAAAAATATTCTTATATAAAGTCATTTTTGAAATTTATTTTTGTGATAATATGTACATAGATTTGGCTATTTCTAATCTATTTTCAAATAATAATAACGTTAAGGCAATGCAAAACAAGAATTTTTCGCATGGTGCCAATTGATCAAAAATAATATAGATTTAACGTCTAAGAACTTCTGAGGTGAAGGGCATATTTTGTCAAATTTACAATGCATGAGCATACGTGTGCACACATACATTTGTCTGCTATCACTTTGTGCGTTGAAAAGAGCTGTTCGCTGTAGCGCTCTTCGCTCTCTCGCTCTCTAACAAAAATTCGAGAGAGCCTGGAGCCACCTCTAGAGCCACGGCCAAAAAATCGTGTGCCAAAAAATCGTATGGCGTTACGCATCTTGTTATTCTAGTGTCTTTGCAAAGACACTAGAATAACAAGATGCGTAACGCCATACGATTTTTTGGCACACGATTTTTTGGCCGTGGCTCTAGAGGTGGCTCCAGGCTCTCTCGAATTTTTGTTAGAGAGCGAGAGAGCGAAGAGCGCTACAGCGAACAGCTCTTTTCAACGCACAAAGTGATAGCAGACAAATGTATGTGTGCACACGTATGCTCATGCATTGTAAATTTGACAAAATATGCCCTTCACCTCAGAAGTTCTTAGACGTTAAATCTATATTATTTTTGATCAATTGGCACCATGCGAAAAATTCTTGTTTTGCATTGCCTTAACGTTATTATTATTTGAAAATAGATTAGAAATAGCCAAATCTATGTACATATTATCACAAAAATAAATTTCAAAAATGACTTTATATAAGAATATTTTTCATTAGAGTATTCATCTTGCGGCGTGTGAAAAATTAATAAGCCAATGATTGTTGAGGGCTTGTGTCCGCACTTCGTGC") iTSA.insert(iBioseq1) iTSA.insert(iBioseq2) iTSA.insert(iBioseq3) iPath = Path() iPath.setFromTuple((1, "dmel_chr4", 1, 60, "DmelChr4-B-R1-Map4_NoCat", 315, 256, 0, 249, 81.67)) iTPA.insert(iPath) iPath.setFromTuple((28, "dmel_chr4", 280, 1380, "DmelChr4-B-G9-Map3_NoCat", 3, 1100, 0, 7456, 94.400000))#28 => seems to be a join from "long join" iTPA.insert(iPath) iPath.setFromTuple((28, "dmel_chr4", 8971, 9459, "DmelChr4-B-G9-Map3_NoCat", 1102, 1590, 0, 758, 96.707800)) iTPA.insert(iPath) iPath.setFromTuple((30, "dmel_chr4", 9815, 9826, "DmelChr4-B-G9-Map3_NoCat", 574, 563, 0, 4, 78.162700))#30 => seems to be a join from "matcher" iTPA.insert(iPath) iPath.setFromTuple((30, "dmel_chr4", 9957, 10047, "DmelChr4-B-G9-Map3_NoCat", 429, 337, 0, 33, 78.162700)) iTPA.insert(iPath) iPath.setFromTuple((30, "dmel_chr4", 10094, 10127, "DmelChr4-B-G9-Map3_NoCat", 290, 256, 0, 13, 78.162700)) iTPA.insert(iPath) expTTuples = ((1, "TAATCGTAGAGGAAAAGGGTATGAGAGATTTGTTTAGAAGTACGTTACTAG-TAGAAGAAA", "TACTCGTAGAGTAAAAGGGTATGCTAGATTTGTTGAAAAGTATGT-AATAGGTAGAAGAAA", 406, 86.440700000000004),\ (28, "CAAAGACACTAGAATAACAAGATGCGTAACGGCCATACATTGGTTTGGCACTATGCAGCCACTTTTTTGGTGACGGCCAAAATTACTCTCTTTCGGCTCACTCCCGCTGAGAGCGTAAGAAATCTAAAAATATAATTTGCTTGCTTGTGTGAGTAAAAACAAGAGACGAGAACGCGTATATGAGTGCGTGTTGTGCTAGAAGACGATTTTCGGGCCGAAATCAATTCTGATCGAAGAAACGAATTTACATGGTACATATTAGGGTAGTTTTTGCCAATTTCCTATCAATATGATAAAATAAAAAAATTTTTAAAAATTCGCGCCCTGACTATTATAACTTGAAAGTTTTTTAAATTTGTTTGTTAAAAT-----------TT-------GTT---------------ATGTTTAATTCTAATTTGTCTGACAATCTGACATCTGACAATTTTTTAAAAGCGAAATATTTTTTTAAA-CACTTTTAATGTTAATGTTACATCATTTTAAGTCAAATGACTTATTAAATATACTAATTAATTAAAGGAAGTACAATAGAAATTATTATAACTACTGTAATTTCATAAATTTCATAAA--AATATGATA---ACTAGAATTATTCCAGTGTCTTTGCTTTGTTCATATCTTGAGGCACGAAGTGCGGACACAAGCACTCAACAATCATTGCCTTATTAATTTTTCACACGCCGCAAGATGAATACTCTAATGACAAATATTCTTATATAAAGTCATTTTTGAAATTTATTTTTGTGATAATATGTACATAGATTTGGCTATTTCTCTTATATTTTTAAATAATAATAACGTTAAGGCAATGCAAA-CAAGAATTTTTCGCATGGTGCCAATTGATCAAAAATAATACAGATTTAAAGTCTAAGAACTTCTAGGGTGAAGGGCTTTTTTTGTCAAATTTACAATGCATGAGCATTCGTGTGCACACATAAAGTTGTCTGCTATCACTGTATGCGTAGAAAAGAGCTGTTTGCTGTAGCGCTCTTCGCTCTCTCGCTCTCTAACAAAAATTCGAGAGAGCCTGGAGCCACCTCTAGAGCCACGGCCAAAAAATCGTGTGCCAAAAAATCGTATGGCGTTACGCATCTTGTTATTCTAGTGTCTTTGAAAGACACTAGAATAACAAGATGCGTAACGCCATACGATTTTTTGGCACACAATTTTTTGGCCGTGGCTCTAGAGGTGGCTCCAGGCTCTCTCGAATTTTTGTTAGAGAGCGAGAGAGCGAAGAGCGCTACAGCGAACCGCTCTTTTCTACGCATACAGTGATAGCAGACAACTTTATGTGCGCACACGTATGCTCATGCATTGTAAATTTGACAAAATATGCCCTTCACCGTAGAAGTTCTTAGACTTTAAATCTATATTATTTTTGATCAATTGGCACCATGCGAAAAATTCTTGTTTTGCATTGCCTTAACGTTATTATTATTTGAAAATAGATTAGAAATAGCCAAATCTATGTACATAATATCACAAAAATAAATTTCAAAAATGACTTTATATAAGAATATTTGTCATTAGAGTATTCATCTTGCGGGGTGTGAAAAATGAATAAGGCAATGATTGTTG----CTTGTGTCCGTCCGCACTTCGTGC", "CAAAGACACTAGAATAACAAGATGCGTAACGGCCATACATTGGTTTGGCACTATGCAGCCACTTTTTTGGTGACGGCCAAAATTACTCTCTTTCCGCTCACTCCCGCTGAGAGCGTAAGAAATCTAAAAATATAATTTGCTTGCTTGTGTGAGTAAAAACAAGAGACGAGAACGCGTATAAGTGTGCGTGTTGTGCTAGAAGACGATTTTCGGGCCGAAATCAATTCTGATCGAAGAAACGAATTTACATGGTACATATTAGGGTAGTTTTTGCCAATTTCCTAGCAATATGATAAAAAAAAAAATTTTTTTTAAATTCGCGCCCTGACTATTATAATTTTAAAGCTTTTTAAATATGTTTGTTAAAATCGCCGCTCGAATTAGCTACCGTTTACACATTTATATTTATGTTTAATTCTAATTTGTCT------CT--CATCTGACAATTTTTTAAAAGCGAAATATTTTTTTAAAACACTTTTAATGTTAATGTTACATCATATTAAGTCAAATGATTTAATAAATATACTAAATAATTAAA-----------------TATGATAACT---GT--TT------ATTGCA-AAAGTAATATCAAAGACACTAGAATAATTCTAATG------CTTTGTTCATATCTTGAGGCACGAAGTGCGGACACAAGCCCTCAACAATCATTGGCTTATTAATTTTTCACACGCCGCAAGATGAATACTCTAATGAAAAATATTCTTATATAAAGTCATTTTTGAAATTTATTTTTGTGATAATATGTACATAGATTTGGCTATTTCTAATCTATTTTCAAATAATAATAACGTTAAGGCAATGCAAAACAAGAATTTTTCGCATGGTGCCAATTGATCAAAAATAATATAGATTTAACGTCTAAGAACTTCTGAGGTGAAGGGCATATTTTGTCAAATTTACAATGCATGAGCATACGTGTGCACACATACATTTGTCTGCTATCACTTTGTGCGTTGAAAAGAGCTGTTCGCTGTAGCGCTCTTCGCTCTCTCGCTCTCTAACAAAAATTCGAGAGAGCCTGGAGCCACCTCTAGAGCCACGGCCAAAAAATCGTGTGCCAAAAAATCGTATGGCGTTACGCATCTTGTTATTCTAGTGTCTTTGAAAGACACTAGAATAACAAGATGCGTAACGCCATACGATTTTTTGGCACACGATTTTTTGGCCGTGGCTCTAGAGGTGGCTCCAGGCTCTCTCGAATTTTTGTTAGAGAGCGAGAGAGCGAAGAGCGCTACAGCGAACAGCTCTTTTCAACGCACAAAGTGATAGCAGACAAATGTATGTGTGCACACGTATGCTCATGCATTGTAAATTTGACAAAATATGCCCTTCACCTCAGAAGTTCTTAGACGTTAAATCTATATTATTTTTGATCAATTGGCACCATGCGAAAAATTCTTGTTTTGCATTGCCTTAACGTTATTATTATTTGAAAATAGATTAGAAATAGCCAAATCTATGTACATATTATCACAAAAATAAATTTCAAAAATGACTTTATATAAGAATATTTTTCATTAGAGTATTCATCTTGCGGCGTGTGAAAAATTAATAAGCCAATGATTGTTGAGGGCTTGTGTCCG----CACTTCGTGC", 13732, 96.1763),\ (30, "------------------------------------ACATTTACAT-TTTTTGAATTTGTGGG-------CGTGGCA-GAACGGGCAATAT-GTATGCATA---ATATGTATGCATAATCTCTACCTTCTTGCTTTTATAGTTCCTGAGACCTCGACGTTCATACGGACAGACGAAATATGCGAAA", "ACATATTAGGGTAGTTTTTGCCAATTTCCTAGCAATAATTTTAAAGCTTTTTAAATATGTTTGTTAAAATCGCCGCTCGAATTAGC--TACCGTTTACACATTTATATTTATGTTTAAT-TCTAATTTGTCAATATCAAAGAC-------------------------------------------", 158, 64.835200000000004)) iATEOGATA = AlignTEOnGenomeAccordingToAnnotation(pathTableName, queryTableName, subjectTableName) iATEOGATA.setMergeSamePathId(True) iATEOGATA.setDbInstance(iDb) iATEOGATA.alignSeqAccordingToPathAndBuildAlignedSeqTable() #TODO: "select * from ..." + execute + fetchall => create method in TableAdaptator sqlCmd = "SELECT * FROM %s_align" % pathTableName iDb.execute(sqlCmd) obsTTuples = iDb.fetchall() iDb.dropTable(queryTableName) iDb.dropTable(subjectTableName) iDb.dropTable(pathTableName) iDb.dropTable("%s_align" % pathTableName) iDb.close() self.assertEquals(expTTuples, obsTTuples) def _writeDummyDmelChr4(self, fileName): with open(fileName, "w") as f: f.write(">dmel_chr4\n") f.write("TTTCTTCTACTAGTAACGTACTTCTAAACAAATCTCTCATACCCTTTTCCTCTACGATTA\n") f.write("TGTTGGTATTAATGGTCTTTCATCTAATGGGGGAGTAGCACATCCGAGTCCGTTTTCCAG\n") f.write("AATTTCGGCATCAATGGGGGTGGAATTTCCAAAAACACATCGGTATTTTGCAAGAACAAG\n") f.write("AAACTTATTATTAATTACAGCTATGTATCCAGTTACACCAATAAATTTCCGTCGCCGTAC\n") f.write("TTGTTAGTCTTAATAATACCCGTACTCGTAGAGTAAAAGCAAAGACACTAGAATAACAAG\n") f.write("ATGCGTAACGGCCATACATTGGTTTGGCACTATGCAGCCACTTTTTTGGTGACGGCCAAA\n") f.write("ATTACTCTCTTTCGGCTCACTCCCGCTGAGAGCGTAAGAAATCTAAAAATATAATTTGCT\n") f.write("TGCTTGTGTGAGTAAAAACAAGAGACGAGAACGCGTATATGAGTGCGTGTTGTGCTAGAA\n") f.write("GACGATTTTCGGGCCGAAATCAATTCTGATCGAAGAAACGAATTTACATGGTACATATTA\n") f.write("GGGTAGTTTTTGCCAATTTCCTATCAATATGATAAAATAAAAAAATTTTTAAAAATTCGC\n") f.write("GCCCTGACTATTATAACTTGAAAGTTTTTTAAATTTGTTTGTTAAAATTTGTTATGTTTA\n") f.write("ATTCTAATTTGTCTGACAATCTGACATCTGACAATTTTTTAAAAGCGAAATATTTTTTTA\n") f.write("AACACTTTTAATGTTAATGTTACATCATTTTAAGTCAAATGACTTATTAAATATACTAAT\n") f.write("TAATTAAAGGAAGTACAATAGAAATTATTATAACTACTGTAATTTCATAAATTTCATAAA\n") f.write("AATATGATAACTAGAATTATTCCAGTGTCTTTGCTTTGTTCATATCTTGAGGCACGAAGT\n") f.write("GCGGACACAAGCACTCAACAATCATTGCCTTATTAATTTTTCACACGCCGCAAGATGAAT\n") f.write("ACTCTAATGACAAATATTCTTATATAAAGTCATTTTTGAAATTTATTTTTGTGATAATAT\n") f.write("GTACATAGATTTGGCTATTTCTCTTATATTTTTAAATAATAATAACGTTAAGGCAATGCA\n") f.write("AACAAGAATTTTTCGCATGGTGCCAATTGATCAAAAATAATACAGATTTAAAGTCTAAGA\n") f.write("ACTTCTAGGGTGAAGGGCTTTTTTTGTCAAATTTACAATGCATGAGCATTCGTGTGCACA\n") f.write("CATAAAGTTGTCTGCTATCACTGTATGCGTAGAAAAGAGCTGTTTGCTGTAGCGCTCTTC\n") f.write("GCTCTCTCGCTCTCTAACAAAAATTCGAGAGAGCCTGGAGCCACCTCTAGAGCCACGGCC\n") f.write("AAAAAATCGTGTGCCAAAAAATCGTATGGCGTTACGCATCTTGTTATTCTAGTGTCTTTG\n") f.write("GTAAAATGGTATGCTAGATTTGTTGAAAAGTATGTAATAGGTAAAAGAAAGCGTTTTCGA\n") f.write("CCATATCAAGTATATATATATTTTTGATAAGGATTAATAGCCGAGTCGAAGTGGCCATGC\n") f.write("CATAGACGCATAGAAGCATAGACGCAGCGTAGAGATCCATGTTTCCCACTATAACGCCCA\n") f.write("CAAACCGCCCAAAATAAAATCGAAATGTTTCGATTTTTCTTTGTTTTATTGTTTGCCTTG\n") f.write("TCAATTTCTATGTATTTTATACCCAAAACACTTTGGCCAAGGCCAAGATGTAAGGAAGCA\n") f.write("TCTACAACACGCTTTTGAACACATCTTTTAATATCGCAGATAAATGATGAAATTTCTCGT\n") f.write("TCACATTTCCACTACCATTCCCCGGCTCAGGGGAAACTCAACCATAGCATTCTCTCTTGC\n") f.write("TTTGACTTCAGCATAGTGACGATAAGCACCAAGAGTCTGAATTATAAGTAGACTACCGTA\n") f.write("TAGGACTCATAAAACTGAAAAGCTGCTTTTATATTGCGATCAAAAAAGAAATTAATATTA\n") f.write("CGAAAATTGCTGTTGCTGGGGCAGGTGGATCAACATATCCCAACATATATTTAACTGTAT\n") f.write("TGCATTTTACCCTAAAATACGCTTTAATTAATGGTTTAAAAAAAACAGACTGTTTCTATT\n") f.write("TTCTATTTCTATTTATTTTATTCTTGGAAAGTTATTTTTTTAATTTTTTGACAAGAATCT\n") f.write("TTGAATTTACTTGCTTGCAATCCCACTAGCTAAGTGACGGGTATATAGAGTTTTCCCTTA\n") f.write("TTTTAATAATCTAGGGTCGCCAGTTTGTCCGTCAGTTCTTCGCTAACGAAGTTCGCTGTT\n") f.write("GGCTCGGTATCGACTGTGTAGTCTAGACTCCCTTCGTTGGTCCTCCTGCTGCGTTTCGTC\n") f.write("CTTGCTAAGGGCTTTGCCCTCTGGCTTCGTAGTCTTCCTGGTGTGTAGGGTCTATTTTGT\n") f.write("TTCCATCTCTGAGTAAGTATAAATAAATTTGGCTTGATTTTTATACTTTAGAGAGCCGTA\n") f.write("ACGGATAATGAAATAACGCCCCCATACTCTAGATACAGTTTTATCAACAAAGAATTAACC\n") f.write("GTATATTGTAATTTGACAAAAATGTTGTATATTTTTCTTCGTAATAAGATCGATAGGGCA\n") f.write("TAGTTCTTATAATACAAAGCCGGCTTTTCTTACATACGTATAAGTCCATACATTTTTTAA\n") f.write("ACTAAAATTTATAATTTTTTTGACAATTGTAAATAAATTGTTATCTTGCTAAAAAATAAA\n") f.write("AAAGTTACAAAAATTTTTTAAAAATCATATTGATGTCAGCAATTAGATGTGCAATCACCA\n") f.write("TCTAGTGTAGCAGCAACATTTCCTAATTTTCGTGAAAGATGCATCTTTCGGCAATTAATA\n") f.write("TCAGTTTCAAGTGATTCCATAATCTTTAAACAAAGGTAAATAAGTGGATTAGACGAAAAA\n") f.write("AATTACGAAAATAGGTTAAATAGGTTACCTGATCCTTATATTTAGTTATATAAATGTATA\n") f.write("ACTCTTTTAATGCAGAAATAGTATCAAACTCTTCGTTTTGCCTTACTGATAGCTGTTGCA\n") f.write("TCGCTGTACTCATTTCCTGGTCGCTTATTTGTGGAAGCCTTGATACATCGCGGTAAAACT\n") f.write("CTTTGACCATAATTCTATAGTTTGGAATATCCTGTCATATAAACCAGTTAATTAAATATT\n") f.write("AATGATTTTATTAAAATATTTATACCATTACTTATAAATATTTAAATTTATTATTTGTGT\n") f.write("ATAAATTTGATAAAGGTAATAATCTAAGTAATATATACCAATATATATGCATATATGTAT\n") f.write("TCACATTTAAAAAAATGAAAGGGAAAAGAATTTGAAGTCTAATTGTATAAATTGTTTTTA\n") f.write("ATTTGTTTTATTCTCATTAGACCTCGATAATAGGTCTTTTGTGTGATTAATTAATTTGAT\n") f.write("AGACTCCTTACTTACAAGAAAAGAAGAAAACAGAAGGTTTACCAGGTGTTCCCTTTATCC\n") f.write("GTTACTCCAGTAAAGCGAGGGCGAACTAAATTTTTAAGCGTTGAAGAGGCCGTCTTGGTA\n") f.write("TTGGATCTTCCATGCTTAATGTCAACGTTCTATATTTTCATACGGACGGACATGGCCAGA\n") f.write("TCGACTCGCATATTGATGCTGATCAAGAATATTTATATTTTACATGATCGGAAACGCTTC\n") f.write("ATTGCTCTACGAGTAATGGGTACAATAATTTAAAACAAACATATTAAAAGTATAGCAAAA\n") f.write("CCCTATCTGAAGGACTAAAATTTTATCGCATTTTAAAATTTGTTGCATTAAAATCTTTGA\n") f.write("TAACCTTTCGTTGAATTAGGTGCTTCGACTTTTTTTACCCTAAGAACAATTTCGATTTGG\n") f.write("CATACATTGAAAACGTAGAAACTCAACCCTGCATTCATTCATAGAACTTATAAAGAGCTA\n") f.write("CATCTTCGAAAATAAAAAAAAGGTTTGTTTTTAAGACTTAATGCGTACAATGTCGCTTTC\n") f.write("GACATTAGGGTATTGCTAGAATTAATATTCGCTTTGTTGTTTACTTTTCCAAACAAACAT\n") f.write("AATGGGTAAACCAAAAAAATGGGAAACGTCAGTATTAAGTGCTATCGAAAACGTTTAGAA\n") f.write("TATGGAGAATCTAGTTGTTATTACCAAAACGCATAAATACTAAGCATATACTAAAACAAA\n") f.write("ATAGAAAAAGATAATGTTTATTTTAGACTCACCTTAGCAAACAGCAACTTATTCGACGGC\n") f.write("GAATCTTTTCCAAGTCTGTGCTCTGATGTTAAACAAGCGTCCATAAATGTTTGTGCAATG\n") f.write("ACACTTAAACAGGAATCAACGCTGTATGTTTTATTTACATCAAATATAAAATCCGGATTT\n") f.write("TTTATAAAATTAACCCAGAATCGAAGGGGCAAACAATTTGACTTCCAAGCGTGCACAATA\n") f.write("TCAGTATCAGCAATATCATGGCGTCGCGCAGCTTCATCAAGTAAGTCAAAGAGCCATTTA\n") f.write("ACGGCAGGTGGCAACTCCTCATTAACAGTTAAAATAATTGAGAAAAAATCATCAACAAAT\n") f.write("TTTTGTATAGTTCCTTTTGTGGCCAGAAGACGCGTAAGGTAAACTTCTGGTATTGTTTTG\n") f.write("TTCACCCTGTCATTACAATTATTAACGACATGCGATTGAAATGCTGGTGATCCTCCGGAT\n") f.write("AACACGGAATTTTTAATGTTCATATAATGATCAGGTATATTGGGCTTAACAAGATGGTAA\n") f.write("ACCCGGGGCTGCTGCAAACCTGATTCGATATCATTATTAATTATAATATGACTTTGCGAA\n") f.write("TTGTTTATAAAATAAACTGCAAAAAGGCAAAACAATTAATTAAAAAATTTTTAGATATTG\n") f.write("GGCTTAGTACTTACAATTGTGGTATGGTGCCGAATTTTGGTTTTTACTGTATGGTATATG\n") f.write("ATAATTATCATTTTGACGTGCAATTAGTGACATTACTGCAGATTCTTTGACTCCATAATG\n") f.write("AGCTAATGTGTTAAGGCGCTTCCATCCGTTAACGGTTTTGGTTGTCAAGTCTTCATCTTG\n") f.write("TAATGTAAGATGACCTCCTCGGCCGTGCCTCCATTCTAAGTCTACTTCGTTTACAGATGG\n") f.write("CCTCATAGAGAAAGGAGTGTTTTTAAAAATTGCGTCGAGGATTTTAAGCTTAACTTGAGA\n") f.write("AATGGTATCCCAATCGTTAACGCGACATTGGACTTTTTCATCAAGATCATCTTGTAAAAT\n") f.write("ATGCTATATTACAACAGAATGGGTAACTTGTTCATGCAGAAGACGTTCTTCTGAAAGGGA\n") f.write("GTAACGGGCATCGTTGGTTATTGCGTCCACTAAACCCTTTTCAATTTGATGCTTTATTGC\n") f.write("TTTGAAGAGCAAAAATAAATTTGATCCGGCGTACTCTTTCAGGTAATCGTACATACAAAT\n") f.write("TGCTAGGTAGTTGGTCAACATTTTTTCAACAACGCTTTCAGTACGCCTTAGCATCAGCTG\n") f.write("AGGATGTTTGCTGGCAAGTGATTTATCTATCAAACGTAATAAAAGGGACTTCAAAATTTC\n") f.write("CGTGGCATATTCCATCTTGTTCATTAAAACAACCATTATTAATGAGGCAACGTTAACTCG\n") f.write("GTCTCTAATAGAAAATGATGAACGTTGAGCTTCTAATGTTTCTATGAACATTAATAAAAA\n") f.write("ATATTTATTGCCAATCAGTTGTTCAAATTGTACCATAGCTGCGTCATAGTTAGTCTGTGG\n") f.write("GCTACCTTCACGAAATTTTGGAGAATTTAAAATAGGATGATCTGATACACCAGGGAAAAA\n") f.write("CACCTTCATAATATAGTTGACGTGATCTAAAGTTGGTATGCCTGTGCTCTCCAAATCTGC\n") f.write("TGTTAGGTCGGTCATGTCCGTTTGGAGCTCAGCGAATGCCTGTTTACACTCAGAACGTAC\n") f.write("GTTGCTTTCTAATGTAATCATCTGTATCTGAATACGTTTATACTCGCGTTCTGCTTGTGT\n") f.write("TGATTTCCTTCTGAATATTATAAGTACAATTACAAAAACAACGACCAGAAGTGCTACCGT\n") f.write("TAATATGCCGACTAACAAGGCATGTGAGAAAACATAGGGTTTATTTAAATCATACTTAAG\n") f.write("ATATCCTATTACAAAACGAAGATTTCGACCTACTTTAACGACAACAAGAGGTAAATCAGT\n") f.write("TGATTGATCCACACCATTTTCATCAGTTGGAAGTGGTTGTTGCTCCGGCGGAATGCATAA\n") f.write("AAGTTGGTTAAGTGCCAGGCTGGTAATATTGCATTGGGAAGTTCCAATAGTTACATTTAC\n") f.write("ATCGTACTCATCAGCTGCCAAGTTTAATAGCTCGCCTTCTATGACCAAGCTGTCACCCTT\n") f.write("GTAGAGTTTAACGCCGTCGTTGGGAAATGGCAAATATTTTGGGTCTGCTAAATAGACAAT\n") f.write("AGTGCTCCTTATGTCATGAAAATATTTATTCAAGTTTCGAACTAGTTGTACATTGTCCAT\n") f.write("TACAAAACTTAGTTGTAAGTTAAATTGAGTTTCATGAACCTTAACGAATGTGGTGACGTC\n") f.write("CATATTATTGTTAACAAAATAGTTGGCTGAAGATCCTGCATTTGTGTATAAGCGAAAAGT\n") f.write("GTCTCCAAAGTCGGCTCGCCGCTTTTTTCTATCATATTCATTTTTATACCTGGTTTCAGT\n") f.write("TTGAAACGAAGAATTTTGTAAGTGCAATTCAGTATCCATCTTTCTGTTCGTCTTTTTAAA\n") f.write("AGTCTCAAATTTTTAATTTACCGGAGGAGATGGACATTCCATTTGATTAGAGTTGATCAC\n") f.write("CACACAAGATGTTTTATTTACTCTTTCATTGTCATAAAACACTTCTAGTTCAGGTTTTTG\n") f.write("GTTTTATTTGTCTCCGAACTTCTTACTGACAATGGCACCAAAATATGTTCAGTGTTTGTT\n") f.write("GGTATTAATGGCCTTTCATCTAATGGGGGAGTAGCACATCCGAGTCCGTTTTCCAGAATT\n") f.write("TCGGCATCAATGGGGGTGGAATTTCCAAAAACACATCGGTATTTTGCAAGAACAAGAAAC\n") f.write("TTATTATTAATTACAGCTATGTATCCAGTTACACCAATAAATTTCCGTCGCCGTACTTGT\n") f.write("TAGTCTTAATAATACCCGTACTTGTAGAGTAAAAGGGTATGCTAGATTTGTAGAAAAGTA\n") f.write("TGTAATAGGTAGAAGAAAGCGTTTTCGACCATATCAAGTATATATATATTTTTGATAAGG\n") f.write("ATTAATAGCCGAGTCGAAGTGGCCATGCCATAGACGCATAGAAGCATAGACGCAGCGTAG\n") f.write("AGATCCATGTTTCCCACTATAACGCCCACAAACCGCCCAAAATAAAATCGAAATGTTTCG\n") f.write("ATTTTTCTTTGTTTTATTGTTTGCCTTGTCAATTTCTATGTATTTTATACCCAAAACACT\n") f.write("TTGGCCAAGGCCAAGATGTAAGGAAGCATCTACAACACGCTTTTGAACACATCTTTTAAT\n") f.write("ATCGCAGATAAATGATGAAATTTCTCGTTCACATTTCCACTACCATTCCCCGGCTCAGGG\n") f.write("GAAACTCAACCATAACATTCTCTCTTGCTTTGACTTCAGCATAGTGACGATAAGCACCAA\n") f.write("GAGTCTGAATTATAAGTAGACTACCGTATAGGACTCATAAAACTGAAAAGCTGCTTTTAT\n") f.write("ATTGCGATCAAAAAAGAAATTAATATTACGAAAATTGCTGTTGCTGGGGCAGGTGGATCA\n") f.write("ACATATCCCAACATATATTTAACTGTATTGCATTTTACCCTAAAATACGCTTTAATTAAT\n") f.write("GGTTTAAAAAAAACAGACTGTTTCTATTTTCTATTTCTATTTATTTTATTCTTGGAAAGT\n") f.write("TATTTTTTTAATTTTTTGACAAGAATCTTTGAATTTACTTGCTTGCAATCCCACTAGCTA\n") f.write("AGTGACGGGTATATAGAGTTTTCCCTTATTTTAATAATCTAGGGTCGCCAGTTTGTCCGT\n") f.write("CAGTTCTTCGCTAACGAAGTTCGCTGTTGGCTCGGTATCGACTGTGTAGTCTAGACTCCC\n") f.write("TTCGTTGGTCCTCCTGCTGCGTTTCGTCCTTGCTAAGGGCTTTGCCCTCTGGCTTCGTAG\n") f.write("TCTTCCTGGTGTGTAGGGTCTATTTTGTTTCCATCTCTGAGTAAGTATAAATAAATTTGG\n") f.write("CTTGATTTTTATACTTTAGAGAGCCGTAACGGATAATGAAATAACGCCCCCATACTCTAG\n") f.write("ATATAGTTTTATCAACAAAGAATTAACCGTATATTGTAATTTGACAAAAATGTTGTATAT\n") f.write("TTTTCTTCGTAATAAGATCGATAGGGCATAGTTCTTATAATACAAAGCCGGCTTCTCTTA\n") f.write("CATACGTATAAGTCCATACATTTTTTAAACTAAAATTTATAATTTTTTTGACAATTGTAA\n") f.write("ATAAATTGTTATCTTGCTAAAAAATAAAAAAGTTACAAAAATTTTTAAAAAATCATATTG\n") f.write("ATGTCAGCAATTAGATGTGCAATCACCATCTAGTGTAGCAGCAACATTTCCTAATTTTCG\n") f.write("TGAAAGATGCATCTTTCGGCAATTAATATCAGTTTCAAGTGATTCCATAATCTTTAAACA\n") f.write("AAGGTAAATAAGTGGATTAGACGAAAAAAATTACGAAAATAGGTTAAATAGGTTACCTGA\n") f.write("TCCTTATATTTAGTTATATAAATGTATAACTCTTTTAATGCAGAAATAGTATCAAACTCT\n") f.write("TCGTTTTGCCTTACTGATAGCTGTTGCATAGCTGTACTCATTTCCTGGTCGCTTATTTGT\n") f.write("GGAAGCCTTGATACATCGCGGTAAAACTCTTTGACCATAATTCTATAGTTTGGAATATCC\n") f.write("TGTCATATAAACCAGTTAATTAAATATTAATGATTTTATTAAAATATTTATACCATTACT\n") f.write("TATAAATATTTAAATTTATTATTTGTGTATAAATTTGATAAAGGTAATAATCTAAGTAAT\n") f.write("ATATACCAATATATATGCATATATGTATTCACATTTAAAAAAATGAAAGGGAAAAGAATT\n") f.write("TGAAGTCTAATTGTATAAATTGTTTTTAATTTGTTTTATTCTCATTAGACCTCGATAATA\n") f.write("GGTCTTTTGTGTGATTAATTAATTTGATAGACTCCTTACTTACAAGAAAAGAAGAAAACA\n") f.write("GAAGGTTTACCAGGTGTTCCCTTTATCCGTTACTCCAGTAAAGCGAGGGCGAACTAAATT\n") f.write("TTTAAGCGTTGAAGAGGCCGTCTTGGTATTGGATCTTCCATGCTTAATGTCAACGTTCTA\n") f.write("TATTTTCATACGGACGGACATGGCCAGATCAAAGACACTAGAATAACAAGATGCGTAACG\n") f.write("CCATACGATTTTTTGGCACACAATTTTTTGGCCGTGGCTCTAGAGGTGGCTCCAGGCTCT\n") f.write("CTCGAATTTTTGTTAGAGAGCGAGAGAGCGAAGAGCGCTACAGCGAACCGCTCTTTTCTA\n") f.write("CGCATACAGTGATAGCAGACAACTTTATGTGCGCACACGTATGCTCATGCATTGTAAATT\n") f.write("TGACAAAATATGCCCTTCACCGTAGAAGTTCTTAGACTTTAAATCTATATTATTTTTGAT\n") f.write("CAATTGGCACCATGCGAAAAATTCTTGTTTTGCATTGCCTTAACGTTATTATTATTTGAA\n") f.write("AATAGATTAGAAATAGCCAAATCTATGTACATAATATCACAAAAATAAATTTCAAAAATG\n") f.write("ACTTTATATAAGAATATTTGTCATTAGAGTATTCATCTTGCGGGGTGTGAAAAATGAATA\n") f.write("AGGCAATGATTGTTGCTTGTGTCCGTCCGCACTTCGTGCCTCAAGATATGACCAAAACAA\n") f.write("AGACACTAGAATAATTCTAGTGTCTTTGATGTGACTTTTGCAATAAACAGTTTTCATATT\n") f.write("TTTATTTATTTTACAAATTTTTATTTTCTACTTCGTATTATTTTTATGAAATATTTATTT\n") f.write("CTCGATGTAATGTATTCCTTTTGTTATAAGTAGTTATAATAATTTATATTTTACTTCCTT\n") f.write("CAATATCACAAAATAAATTTCAAGTATGGCTTTATATTAGAATAATTGTCATTAAATTAT\n") f.write("TCAGCTTGGGACGTGGGAAAAATTAGAGTAGACATGTCTAGTAGACATCGATTCTTAGGT\n") f.write("GCTTCTGACCGCACGTCGTGCCTCAAGAAATCAATTTCGCATATTTATACCCATTATTTC\n") f.write("TAGAGTAAAAGGGTATACTACATTCGTTGAAAAGTATGTAACAGGCAGAAGAAAGCGTTT\n") f.write("CCGACTATATAATGTATAAAGATCAGGATCAACAGCCGAGTCGATCTGGCCATGTCCGTC\n") f.write("TGTCCGTATGAACGTCGAGGTCTCAGGAACTATAAAAGCAAGAAGGTAGAGATTATGCAT\n") f.write("ACATATTATGCATACATATTGCCCGTTGACCCATGTTGTCACGCCCACTCTAACGTCCAC\n") f.write("AAACCGCACAAAACTGCCACGCCCACAAATTCAAAAAATGTAAATGTAATTGACCAAATT\n") f.write("TAACAAAACTCTAAAAATGTAACTTTGTTTCTTAGATCAAAATTTAGACCAGAAAATCGT\n") f.write("CTTCATCTTCTAATGTTTTTACTCACACAAGAAAGCAAATTCTATTTTTAGATTTTAAAG\n") f.write("TACTCCATTTTACGCGAGCGGAGAGAGAGAGCAATTTTGGCCGTCACCAAAAAAGTGTCT\n") if __name__ == "__main__": unittest.main()