Back to index

python-biopython  1.60
Public Member Functions | Public Attributes
test_Ace.AceTestOne Class Reference

List of all members.

Public Member Functions

def setUp
def tearDown
def test_check_ACEParser
def test_check_record_parser

Public Attributes

 handle

Detailed Description

Definition at line 8 of file test_Ace.py.


Member Function Documentation

def test_Ace.AceTestOne.setUp (   self)

Definition at line 9 of file test_Ace.py.

00009 
00010     def setUp(self):
00011         self.handle = open("Ace/contig1.ace")

Definition at line 12 of file test_Ace.py.

00012 
00013     def tearDown(self):
00014         self.handle.close()

Test to check that ACEParser can parse the whole file into one record.

Definition at line 15 of file test_Ace.py.

00015 
00016     def test_check_ACEParser(self):
00017         """Test to check that ACEParser can parse the whole file into one record."""
00018         record = Ace.read(self.handle)
00019         self.assertEqual(record.ncontigs, 2)
00020         self.assertEqual(record.nreads, 16)
00021         self.assertEqual(len(record.wa), 1)
00022         self.assertEqual(record.wa[0].tag_type, "phrap_params")
00023         self.assertEqual(record.wa[0].program, "phrap")
00024         self.assertEqual(record.wa[0].date, "040203:114710")
00025         self.assertEqual(record.wa[0].info, ['phrap 304_nuclsu.fasta.screen -new_ace -retain_duplicates', 'phrap version 0.990329'])
00026         self.assertEqual(len(record.contigs), 2)
00027         self.assertEqual(len(record.contigs[0].reads), 2)
00028         self.assertEqual(record.contigs[0].name, "Contig1")
00029         self.assertEqual(record.contigs[0].nbases, 856)
00030         self.assertEqual(record.contigs[0].nreads, 2)
00031         self.assertEqual(record.contigs[0].nsegments, 31)
00032         self.assertEqual(record.contigs[0].uorc, 'U')
00033         center = len(record.contigs[0].sequence)//2
00034         self.assertEqual(record.contigs[0].sequence[:10], "aatacgGGAT")
00035         self.assertEqual(record.contigs[0].sequence[center-5:center+5], "ACATCATCTG")
00036         self.assertEqual(record.contigs[0].sequence[-10:], "cATCTAGtac")
00037         center = len(record.contigs[0].quality)//2
00038         self.assertEqual(record.contigs[0].quality[:10], [0, 0, 0, 0, 0, 0, 22, 23, 25, 28])
00039         self.assertEqual(record.contigs[0].quality[center-5:center+5], [90, 90, 90, 90, 90, 90, 90, 90, 90, 90])
00040         self.assertEqual(record.contigs[0].quality[-10:], [15, 22, 30, 24, 28, 22, 21, 15, 19, 0])
00041         self.assertEqual(len(record.contigs[0].af), 2)
00042         self.assertEqual(record.contigs[0].af[1].name, "BL060c3-LR0R.b.ab1")
00043         self.assertEqual(record.contigs[0].af[1].coru, "U")
00044         self.assertEqual(record.contigs[0].af[1].padded_start, 1)
00045         self.assertEqual(len(record.contigs[0].bs), 31)
00046         self.assertEqual(record.contigs[0].bs[15].name, "BL060c3-LR5.g.ab1")
00047         self.assertEqual(record.contigs[0].bs[15].padded_start, 434)
00048         self.assertEqual(record.contigs[0].bs[15].padded_end, 438)
00049         self.assertEqual(record.contigs[0].bs[30].name, "BL060c3-LR0R.b.ab1")
00050         self.assertEqual(record.contigs[0].bs[30].padded_start, 823)
00051         self.assertEqual(record.contigs[0].bs[30].padded_end, 856)
00052         self.assertEqual(len(record.contigs[0].ct), 1)
00053         self.assertEqual(record.contigs[0].ct[0].name, "Contig1")
00054         self.assertEqual(record.contigs[0].ct[0].tag_type, "repeat")
00055         self.assertEqual(record.contigs[0].ct[0].program, "phrap")
00056         self.assertEqual(record.contigs[0].ct[0].padded_start, 52)
00057         self.assertEqual(record.contigs[0].ct[0].padded_end, 53)
00058         self.assertEqual(record.contigs[0].ct[0].date, "555456:555432")
00059         self.assertEqual(record.contigs[0].ct[0].info, ['This is the forst line of comment for c1', 'and this the second for c1'])
00060         self.assertEqual(record.contigs[0].wa, None)
00061         self.assertEqual(len(record.contigs[0].reads), 2)
00062         self.assertEqual(record.contigs[0].reads[0].rd.name, "BL060c3-LR5.g.ab1")
00063         self.assertEqual(record.contigs[0].reads[0].rd.padded_bases, 868)
00064         self.assertEqual(record.contigs[0].reads[0].rd.info_items, 0)
00065         self.assertEqual(record.contigs[0].reads[0].rd.read_tags, 0)
00066         center = len(record.contigs[0].reads[0].rd.sequence)//2
00067         self.assertEqual(record.contigs[0].reads[0].rd.sequence[:10], "tagcgaggaa")
00068         self.assertEqual(record.contigs[0].reads[0].rd.sequence[center-5:center+5], "CCGAGGCCAA")
00069         self.assertEqual(record.contigs[0].reads[0].rd.sequence[-10:], "gaaccatcag")
00070         self.assertEqual(record.contigs[0].reads[0].qa.qual_clipping_start, 80)
00071         self.assertEqual(record.contigs[0].reads[0].qa.qual_clipping_end, 853)
00072         self.assertEqual(record.contigs[0].reads[0].qa.align_clipping_start, 22)
00073         self.assertEqual(record.contigs[0].reads[0].qa.align_clipping_end, 856)
00074         self.assertEqual(record.contigs[0].reads[0].ds, None)
00075         self.assertEqual(len(record.contigs[0].reads[0].rt), 4)
00076         self.assertEqual(record.contigs[0].reads[0].rt[0].name, "BL060c3-LR5.g.ab1")
00077         self.assertEqual(record.contigs[0].reads[0].rt[0].tag_type, "matchElsewhereHighQual")
00078         self.assertEqual(record.contigs[0].reads[0].rt[0].program, "phrap")
00079         self.assertEqual(record.contigs[0].reads[0].rt[0].padded_start, 590)
00080         self.assertEqual(record.contigs[0].reads[0].rt[0].padded_end, 607)
00081         self.assertEqual(record.contigs[0].reads[0].rt[0].date, "040217:110357")
00082         self.assertEqual(record.contigs[0].reads[0].rt[1].name, "BL060c3-LR5.g.ab1")
00083         self.assertEqual(record.contigs[0].reads[0].rt[1].tag_type, "matchElsewhereHighQual")
00084         self.assertEqual(record.contigs[0].reads[0].rt[1].program, "phrap")
00085         self.assertEqual(record.contigs[0].reads[0].rt[1].padded_start, 617)
00086         self.assertEqual(record.contigs[0].reads[0].rt[1].padded_end, 631)
00087         self.assertEqual(record.contigs[0].reads[0].rt[1].date, "040217:110357")
00088         self.assertEqual(record.contigs[0].reads[0].rt[2].name, "BL060c3-LR5.g.ab1")
00089         self.assertEqual(record.contigs[0].reads[0].rt[2].tag_type, "matchElsewhereHighQual")
00090         self.assertEqual(record.contigs[0].reads[0].rt[2].program, "phrap")
00091         self.assertEqual(record.contigs[0].reads[0].rt[2].padded_start, 617)
00092         self.assertEqual(record.contigs[0].reads[0].rt[2].padded_end, 631)
00093         self.assertEqual(record.contigs[0].reads[0].rt[2].date, "040217:110357")
00094         self.assertEqual(record.contigs[0].reads[0].rt[3].name, "BL060c3-LR5.g.ab1")
00095         self.assertEqual(record.contigs[0].reads[0].rt[3].tag_type, "matchElsewhereHighQual")
00096         self.assertEqual(record.contigs[0].reads[0].rt[3].program, "phrap")
00097         self.assertEqual(record.contigs[0].reads[0].rt[3].padded_start, 617)
00098         self.assertEqual(record.contigs[0].reads[0].rt[3].padded_end, 631)
00099         self.assertEqual(record.contigs[0].reads[0].rt[3].date, "040217:110357")
00100 
00101         self.assertEqual(len(record.contigs[0].reads[0].wr), 1)
00102         self.assertEqual(record.contigs[0].reads[0].wr[0].name, "BL060c3-LR5.g.ab1")
00103         self.assertEqual(record.contigs[0].reads[0].wr[0].aligned, "unaligned")
00104         self.assertEqual(record.contigs[0].reads[0].wr[0].program, "phrap")
00105         self.assertEqual(record.contigs[0].reads[0].wr[0].date, "040217:110357")
00106         self.assertEqual(record.contigs[0].reads[1].rd.name, "BL060c3-LR0R.b.ab1")
00107         self.assertEqual(record.contigs[0].reads[1].rd.padded_bases, 856)
00108         self.assertEqual(record.contigs[0].reads[1].rd.info_items, 0)
00109         self.assertEqual(record.contigs[0].reads[1].rd.read_tags, 0)
00110         center = len(record.contigs[0].reads[1].rd.sequence)//2
00111         self.assertEqual(record.contigs[0].reads[1].rd.sequence[:10], "aatacgGGAT")
00112         self.assertEqual(record.contigs[0].reads[1].rd.sequence[center-5:center+5], "ACATCATCTG")
00113         self.assertEqual(record.contigs[0].reads[1].rd.sequence[-10:], "cATCTAGtac")
00114         self.assertEqual(record.contigs[0].reads[1].qa.qual_clipping_start, 7)
00115         self.assertEqual(record.contigs[0].reads[1].qa.qual_clipping_end, 778)
00116         self.assertEqual(record.contigs[0].reads[1].qa.align_clipping_start, 1)
00117         self.assertEqual(record.contigs[0].reads[1].qa.align_clipping_end, 856)
00118         self.assertEqual(record.contigs[0].reads[1].ds, None)
00119         self.assertEqual(record.contigs[0].reads[1].rt, None)
00120         self.assertEqual(record.contigs[0].reads[1].wr, None)
00121 
00122         self.assertEqual(len(record.contigs[1].reads), 14)
00123         self.assertEqual(record.contigs[1].name, "Contig2")
00124         self.assertEqual(record.contigs[1].nbases, 3296)
00125         self.assertEqual(record.contigs[1].nreads, 14)
00126         self.assertEqual(record.contigs[1].nsegments, 214)
00127         self.assertEqual(record.contigs[1].uorc, 'U')
00128         center = len(record.contigs[1].sequence) // 2
00129         self.assertEqual(record.contigs[1].sequence[:10], "cacggatgat")
00130         self.assertEqual(record.contigs[1].sequence[center-5:center+5], "TTTGAATATT")
00131         self.assertEqual(record.contigs[1].sequence[-10:], "Atccttgtag")
00132         center = len(record.contigs[1].quality) // 2
00133         self.assertEqual(record.contigs[1].quality[:10], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0])
00134         self.assertEqual(record.contigs[1].quality[center-5:center+5], [90, 90, 90, 90, 90, 90, 90, 90, 90, 90])
00135         self.assertEqual(record.contigs[1].quality[-10:], [24, 0, 0, 0, 0, 0, 0, 0, 0, 0])
00136         self.assertEqual(len(record.contigs[1].af), 14)
00137         self.assertEqual(record.contigs[1].af[7].name, "BL060-LR3R.b.ab1")
00138         self.assertEqual(record.contigs[1].af[7].coru, "C")
00139         self.assertEqual(record.contigs[1].af[7].padded_start, 1601)
00140         self.assertEqual(record.contigs[1].af[13].name, "BL060c2-LR0R.b.ab1")
00141         self.assertEqual(record.contigs[1].af[13].coru, "C")
00142         self.assertEqual(record.contigs[1].af[13].padded_start, 2445)
00143         self.assertEqual(len(record.contigs[1].bs), 214)
00144         self.assertEqual(record.contigs[1].bs[107].name, "BL060-c1-LR3R.b.ab1")
00145         self.assertEqual(record.contigs[1].bs[107].padded_start, 2286)
00146         self.assertEqual(record.contigs[1].bs[107].padded_end, 2292)
00147         self.assertEqual(record.contigs[1].bs[213].name, "BL060c2-LR0R.b.ab1")
00148         self.assertEqual(record.contigs[1].bs[213].padded_start, 3236)
00149         self.assertEqual(record.contigs[1].bs[213].padded_end, 3296)
00150         self.assertEqual(len(record.contigs[1].ct), 1)
00151         self.assertEqual(record.contigs[1].ct[0].name, "Contig2")
00152         self.assertEqual(record.contigs[1].ct[0].tag_type, "repeat")
00153         self.assertEqual(record.contigs[1].ct[0].program, "phrap")
00154         self.assertEqual(record.contigs[1].ct[0].padded_start, 42)
00155         self.assertEqual(record.contigs[1].ct[0].padded_end, 43)
00156         self.assertEqual(record.contigs[1].ct[0].date, "123456:765432")
00157         self.assertEqual(record.contigs[1].ct[0].info, ['This is the forst line of comment for c2', 'and this the second for c2'])
00158         self.assertEqual(len(record.contigs[1].wa), 1)
00159         self.assertEqual(record.contigs[1].wa[0].tag_type, "phrap_params")
00160         self.assertEqual(record.contigs[1].wa[0].program, "phrap")
00161         self.assertEqual(record.contigs[1].wa[0].date, "040203:114710")
00162         self.assertEqual(record.contigs[1].wa[0].info, ['phrap 304_nuclsu.fasta.screen -new_ace -retain_duplicates', 'phrap version 0.990329'])
00163 
00164         self.assertEqual(len(record.contigs[1].reads), 14)
00165 
00166         # Read 0
00167         self.assertEqual(record.contigs[1].reads[0].rd.name, "BL060-c1-LR12.g.ab1")
00168         self.assertEqual(record.contigs[1].reads[0].rd.padded_bases, 862)
00169         self.assertEqual(record.contigs[1].reads[0].rd.info_items, 0)
00170         self.assertEqual(record.contigs[1].reads[0].rd.read_tags, 0)
00171         center = len(record.contigs[1].reads[0].rd.sequence)//2
00172         self.assertEqual(record.contigs[1].reads[0].rd.sequence[:10], "cacggatgat")
00173         self.assertEqual(record.contigs[1].reads[0].rd.sequence[center-5:center+5], "GTTCTCGTTG")
00174         self.assertEqual(record.contigs[1].reads[0].rd.sequence[-10:], "CGTTTACCcg")
00175         self.assertEqual(record.contigs[1].reads[0].qa.qual_clipping_start, 81)
00176         self.assertEqual(record.contigs[1].reads[0].qa.qual_clipping_end, 842)
00177         self.assertEqual(record.contigs[1].reads[0].qa.align_clipping_start, 1)
00178         self.assertEqual(record.contigs[1].reads[0].qa.align_clipping_end, 862)
00179         self.assertEqual(record.contigs[1].reads[0].ds.chromat_file, "BL060-c1-LR12.g.ab1")
00180         self.assertEqual(record.contigs[1].reads[0].ds.phd_file, "BL060-c1-LR12.g.ab1.phd.1")
00181         self.assertEqual(record.contigs[1].reads[0].ds.time, "Tue Feb  3 11:01:16 2004")
00182         self.assertEqual(record.contigs[1].reads[0].ds.chem, "term")
00183         self.assertEqual(record.contigs[1].reads[0].ds.dye, "big")
00184         self.assertEqual(record.contigs[1].reads[0].ds.template, "")
00185         self.assertEqual(record.contigs[1].reads[0].ds.direction, "")
00186         self.assertEqual(record.contigs[1].reads[0].rt, None)
00187         self.assertEqual(record.contigs[1].reads[0].wr, None)
00188 
00189         # Read 1
00190         self.assertEqual(record.contigs[1].reads[1].rd.name, "BL060-c1-LR11.g.ab1")
00191         self.assertEqual(record.contigs[1].reads[1].rd.padded_bases, 880)
00192         self.assertEqual(record.contigs[1].reads[1].rd.info_items, 0)
00193         self.assertEqual(record.contigs[1].reads[1].rd.read_tags, 0)
00194         center = len(record.contigs[1].reads[1].rd.sequence)//2
00195         self.assertEqual(record.contigs[1].reads[1].rd.sequence[:10], "ctttctgacC")
00196         self.assertEqual(record.contigs[1].reads[1].rd.sequence[center-5:center+5], "CTGTGGTTTC")
00197         self.assertEqual(record.contigs[1].reads[1].rd.sequence[-10:], "cggagttacg")
00198         self.assertEqual(record.contigs[1].reads[1].qa.qual_clipping_start, 11)
00199         self.assertEqual(record.contigs[1].reads[1].qa.qual_clipping_end, 807)
00200         self.assertEqual(record.contigs[1].reads[1].qa.align_clipping_start, 8)
00201         self.assertEqual(record.contigs[1].reads[1].qa.align_clipping_end, 880)
00202         self.assertEqual(record.contigs[1].reads[1].ds.chromat_file, "BL060-c1-LR11.g.ab1")
00203         self.assertEqual(record.contigs[1].reads[1].ds.phd_file, "BL060-c1-LR11.g.ab1.phd.1")
00204         self.assertEqual(record.contigs[1].reads[1].ds.time, "Tue Feb  3 11:01:16 2004")
00205         self.assertEqual(record.contigs[1].reads[1].ds.chem, "term")
00206         self.assertEqual(record.contigs[1].reads[1].ds.dye, "big")
00207         self.assertEqual(record.contigs[1].reads[1].ds.template, "")
00208         self.assertEqual(record.contigs[1].reads[1].ds.direction, "")
00209         self.assertEqual(len(record.contigs[1].reads[1].rt), 0)
00210         self.assertEqual(record.contigs[1].reads[1].wr, None)
00211 
00212         # Read 2
00213         self.assertEqual(record.contigs[1].reads[2].rd.name, "BL060-c1-LR9.g.ab1")
00214         self.assertEqual(record.contigs[1].reads[2].rd.padded_bases, 864)
00215         self.assertEqual(record.contigs[1].reads[2].rd.info_items, 0)
00216         self.assertEqual(record.contigs[1].reads[2].rd.read_tags, 0)
00217         center = len(record.contigs[1].reads[2].rd.sequence)//2
00218         self.assertEqual(record.contigs[1].reads[2].rd.sequence[:10], "cacccaCTTT")
00219         self.assertEqual(record.contigs[1].reads[2].rd.sequence[center-5:center+5], "ACCAAACATT")
00220         self.assertEqual(record.contigs[1].reads[2].rd.sequence[-10:], "GGTAGCACgc")
00221         self.assertEqual(record.contigs[1].reads[2].qa.qual_clipping_start, 7)
00222         self.assertEqual(record.contigs[1].reads[2].qa.qual_clipping_end, 840)
00223         self.assertEqual(record.contigs[1].reads[2].qa.align_clipping_start, 4)
00224         self.assertEqual(record.contigs[1].reads[2].qa.align_clipping_end, 864)
00225         self.assertEqual(record.contigs[1].reads[2].ds.chromat_file, "BL060-c1-LR9.g.ab1")
00226         self.assertEqual(record.contigs[1].reads[2].ds.phd_file, "BL060-c1-LR9.g.ab1.phd.1")
00227         self.assertEqual(record.contigs[1].reads[2].ds.time, "Tue Feb  3 11:01:16 2004")
00228         self.assertEqual(record.contigs[1].reads[2].ds.chem, "term")
00229         self.assertEqual(record.contigs[1].reads[2].ds.dye, "big")
00230         self.assertEqual(record.contigs[1].reads[2].ds.template, "")
00231         self.assertEqual(record.contigs[1].reads[2].ds.direction, "")
00232         self.assertEqual(record.contigs[1].reads[2].rt, None)
00233         self.assertEqual(record.contigs[1].reads[2].wr, None)
00234 
00235         # Read 3
00236         self.assertEqual(record.contigs[1].reads[3].rd.name, "BL060-c1-LR17R.b.ab1")
00237         self.assertEqual(record.contigs[1].reads[3].rd.padded_bases, 863)
00238         self.assertEqual(record.contigs[1].reads[3].rd.info_items, 0)
00239         self.assertEqual(record.contigs[1].reads[3].rd.read_tags, 0)
00240         center = len(record.contigs[1].reads[3].rd.sequence)//2
00241         self.assertEqual(record.contigs[1].reads[3].rd.sequence[:10], "ctaattggcc")
00242         self.assertEqual(record.contigs[1].reads[3].rd.sequence[center-5:center+5], "GGAACCTTTC")
00243         self.assertEqual(record.contigs[1].reads[3].rd.sequence[-10:], "CAACCTgact")
00244         self.assertEqual(record.contigs[1].reads[3].qa.qual_clipping_start, 63)
00245         self.assertEqual(record.contigs[1].reads[3].qa.qual_clipping_end, 857)
00246         self.assertEqual(record.contigs[1].reads[3].qa.align_clipping_start, 1)
00247         self.assertEqual(record.contigs[1].reads[3].qa.align_clipping_end, 861)
00248         self.assertEqual(record.contigs[1].reads[3].ds.chromat_file, "BL060-c1-LR17R.b.ab1")
00249         self.assertEqual(record.contigs[1].reads[3].ds.phd_file, "BL060-c1-LR17R.b.ab1.phd.1")
00250         self.assertEqual(record.contigs[1].reads[3].ds.time, "Tue Feb  3 11:01:16 2004")
00251         self.assertEqual(record.contigs[1].reads[3].ds.chem, "term")
00252         self.assertEqual(record.contigs[1].reads[3].ds.dye, "big")
00253         self.assertEqual(record.contigs[1].reads[3].ds.template, "")
00254         self.assertEqual(record.contigs[1].reads[3].ds.direction, "")
00255         self.assertEqual(record.contigs[1].reads[3].rt, [])
00256         self.assertEqual(record.contigs[1].reads[3].wr, None)
00257 
00258         # Read 4
00259         self.assertEqual(record.contigs[1].reads[4].rd.name, "BL060-LR8.5.g.ab1")
00260         self.assertEqual(record.contigs[1].reads[4].rd.padded_bases, 877)
00261         self.assertEqual(record.contigs[1].reads[4].rd.info_items, 0)
00262         self.assertEqual(record.contigs[1].reads[4].rd.read_tags, 0)
00263         center = len(record.contigs[1].reads[4].rd.sequence)//2
00264         self.assertEqual(record.contigs[1].reads[4].rd.sequence[:10], "tgCTGCGGTT")
00265         self.assertEqual(record.contigs[1].reads[4].rd.sequence[center-5:center+5], "GGCAGTTTCA")
00266         self.assertEqual(record.contigs[1].reads[4].rd.sequence[-10:], "tactcataaa")
00267         self.assertEqual(record.contigs[1].reads[4].qa.qual_clipping_start, 13)
00268         self.assertEqual(record.contigs[1].reads[4].qa.qual_clipping_end, 729)
00269         self.assertEqual(record.contigs[1].reads[4].qa.align_clipping_start, 1)
00270         self.assertEqual(record.contigs[1].reads[4].qa.align_clipping_end, 877)
00271         self.assertEqual(record.contigs[1].reads[4].ds.chromat_file, "BL060-LR8.5.g.ab1")
00272         self.assertEqual(record.contigs[1].reads[4].ds.phd_file, "BL060-LR8.5.g.ab1.phd.1")
00273         self.assertEqual(record.contigs[1].reads[4].ds.time, "Fri Nov 14 09:46:03 2003")
00274         self.assertEqual(record.contigs[1].reads[4].ds.chem, "term")
00275         self.assertEqual(record.contigs[1].reads[4].ds.dye, "big")
00276         self.assertEqual(record.contigs[1].reads[4].ds.template, "")
00277         self.assertEqual(record.contigs[1].reads[4].ds.direction, "")
00278         self.assertEqual(record.contigs[1].reads[4].rt, None)
00279         self.assertEqual(record.contigs[1].reads[4].wr, None)
00280 
00281         # Read 5
00282         self.assertEqual(record.contigs[1].reads[5].rd.name, "BL060-LR3R.b.ab1")
00283         self.assertEqual(record.contigs[1].reads[5].rd.padded_bases, 874)
00284         self.assertEqual(record.contigs[1].reads[5].rd.info_items, 0)
00285         self.assertEqual(record.contigs[1].reads[5].rd.read_tags, 0)
00286         center = len(record.contigs[1].reads[5].rd.sequence)//2
00287         self.assertEqual(record.contigs[1].reads[5].rd.sequence[:10], "ctCTTAGGAT")
00288         self.assertEqual(record.contigs[1].reads[5].rd.sequence[center-5:center+5], "AACTCACATT")
00289         self.assertEqual(record.contigs[1].reads[5].rd.sequence[-10:], "*CACCCAAac")
00290         self.assertEqual(record.contigs[1].reads[5].qa.qual_clipping_start, 65)
00291         self.assertEqual(record.contigs[1].reads[5].qa.qual_clipping_end, 874)
00292         self.assertEqual(record.contigs[1].reads[5].qa.align_clipping_start, 1)
00293         self.assertEqual(record.contigs[1].reads[5].qa.align_clipping_end, 874)
00294         self.assertEqual(record.contigs[1].reads[5].ds.chromat_file, "BL060-LR3R.b.ab1")
00295         self.assertEqual(record.contigs[1].reads[5].ds.phd_file, "BL060-LR3R.b.ab1.phd.1")
00296         self.assertEqual(record.contigs[1].reads[5].ds.time, "Fri Nov 14 09:46:03 2003")
00297         self.assertEqual(record.contigs[1].reads[5].ds.chem, "term")
00298         self.assertEqual(record.contigs[1].reads[5].ds.dye, "big")
00299         self.assertEqual(record.contigs[1].reads[5].ds.template, "")
00300         self.assertEqual(record.contigs[1].reads[5].ds.direction, "")
00301         self.assertEqual(record.contigs[1].reads[5].rt, None)
00302         self.assertEqual(record.contigs[1].reads[5].wr, None)
00303 
00304         # Read 6
00305         self.assertEqual(record.contigs[1].reads[6].rd.name, "BL060-c1-LR3R.b.ab1")
00306         self.assertEqual(record.contigs[1].reads[6].rd.padded_bases, 864)
00307         self.assertEqual(record.contigs[1].reads[6].rd.info_items, 0)
00308         self.assertEqual(record.contigs[1].reads[6].rd.read_tags, 0)
00309         center = len(record.contigs[1].reads[6].rd.sequence)//2
00310         self.assertEqual(record.contigs[1].reads[6].rd.sequence[:10], "CCaTGTCCAA")
00311         self.assertEqual(record.contigs[1].reads[6].rd.sequence[center-5:center+5], "AAGGGTT*CA")
00312         self.assertEqual(record.contigs[1].reads[6].rd.sequence[-10:], "ACACTCGCga")
00313         self.assertEqual(record.contigs[1].reads[6].qa.qual_clipping_start, 73)
00314         self.assertEqual(record.contigs[1].reads[6].qa.qual_clipping_end, 862)
00315         self.assertEqual(record.contigs[1].reads[6].qa.align_clipping_start, 1)
00316         self.assertEqual(record.contigs[1].reads[6].qa.align_clipping_end, 863)
00317         self.assertEqual(record.contigs[1].reads[6].ds.chromat_file, "BL060-c1-LR3R.b.ab1")
00318         self.assertEqual(record.contigs[1].reads[6].ds.phd_file, "BL060-c1-LR3R.b.ab1.phd.1")
00319         self.assertEqual(record.contigs[1].reads[6].ds.time, "Tue Feb  3 11:01:16 2004")
00320         self.assertEqual(record.contigs[1].reads[6].ds.chem, "term")
00321         self.assertEqual(record.contigs[1].reads[6].ds.dye, "big")
00322         self.assertEqual(record.contigs[1].reads[6].ds.template, "")
00323         self.assertEqual(record.contigs[1].reads[6].ds.direction, "")
00324         self.assertEqual(record.contigs[1].reads[6].rt, None)
00325         self.assertEqual(record.contigs[1].reads[6].wr, None)
00326 
00327         # Read 7
00328         self.assertEqual(record.contigs[1].reads[7].rd.name, "BL060-LR3R.b.ab1")
00329         self.assertEqual(record.contigs[1].reads[7].rd.padded_bases, 857)
00330         self.assertEqual(record.contigs[1].reads[7].rd.info_items, 0)
00331         self.assertEqual(record.contigs[1].reads[7].rd.read_tags, 0)
00332         center = len(record.contigs[1].reads[7].rd.sequence)//2
00333         self.assertEqual(record.contigs[1].reads[7].rd.sequence[:10], "agaaagagga")
00334         self.assertEqual(record.contigs[1].reads[7].rd.sequence[center-5:center+5], "nnnannnnnn")
00335         self.assertEqual(record.contigs[1].reads[7].rd.sequence[-10:], "gtctttgctc")
00336         self.assertEqual(record.contigs[1].reads[7].qa.qual_clipping_start, 548)
00337         self.assertEqual(record.contigs[1].reads[7].qa.qual_clipping_end, 847)
00338         self.assertEqual(record.contigs[1].reads[7].qa.align_clipping_start, 442)
00339         self.assertEqual(record.contigs[1].reads[7].qa.align_clipping_end, 854)
00340         self.assertEqual(record.contigs[1].reads[7].ds.chromat_file, "BL060-LR3R.b.ab1")
00341         self.assertEqual(record.contigs[1].reads[7].ds.phd_file, "BL060-LR3R.b.ab1.phd.1")
00342         self.assertEqual(record.contigs[1].reads[7].ds.time, "Fri Jan 16 09:01:10 2004")
00343         self.assertEqual(record.contigs[1].reads[7].ds.chem, "term")
00344         self.assertEqual(record.contigs[1].reads[7].ds.dye, "big")
00345         self.assertEqual(record.contigs[1].reads[7].ds.template, "")
00346         self.assertEqual(record.contigs[1].reads[7].ds.direction, "")
00347         self.assertEqual(record.contigs[1].reads[7].rt, None)
00348         self.assertEqual(record.contigs[1].reads[7].wr, None)
00349 
00350         # Read 8
00351         self.assertEqual(record.contigs[1].reads[8].rd.name, "BL060-c1-LR7.g.ab1")
00352         self.assertEqual(record.contigs[1].reads[8].rd.padded_bases, 878)
00353         self.assertEqual(record.contigs[1].reads[8].rd.info_items, 0)
00354         self.assertEqual(record.contigs[1].reads[8].rd.read_tags, 0)
00355         center = len(record.contigs[1].reads[8].rd.sequence)//2
00356         self.assertEqual(record.contigs[1].reads[8].rd.sequence[:10], "agTttc*ctc")
00357         self.assertEqual(record.contigs[1].reads[8].rd.sequence[center-5:center+5], "TCATAAAACT")
00358         self.assertEqual(record.contigs[1].reads[8].rd.sequence[-10:], "xxxxxxxxxx")
00359         self.assertEqual(record.contigs[1].reads[8].qa.qual_clipping_start, 20)
00360         self.assertEqual(record.contigs[1].reads[8].qa.qual_clipping_end, 798)
00361         self.assertEqual(record.contigs[1].reads[8].qa.align_clipping_start, 1)
00362         self.assertEqual(record.contigs[1].reads[8].qa.align_clipping_end, 798)
00363         self.assertEqual(record.contigs[1].reads[8].ds.chromat_file, "BL060-c1-LR7.g.ab1")
00364         self.assertEqual(record.contigs[1].reads[8].ds.phd_file, "BL060-c1-LR7.g.ab1.phd.1")
00365         self.assertEqual(record.contigs[1].reads[8].ds.time, "Tue Feb  3 11:01:16 2004")
00366         self.assertEqual(record.contigs[1].reads[8].ds.chem, "term")
00367         self.assertEqual(record.contigs[1].reads[8].ds.dye, "big")
00368         self.assertEqual(record.contigs[1].reads[8].ds.template, "")
00369         self.assertEqual(record.contigs[1].reads[8].ds.direction, "")
00370         self.assertEqual(record.contigs[1].reads[8].rt, None)
00371         self.assertEqual(record.contigs[1].reads[8].wr, None)
00372 
00373         # Read 9
00374         self.assertEqual(record.contigs[1].reads[9].rd.name, "BL060-LR7.g.ab1")
00375         self.assertEqual(record.contigs[1].reads[9].rd.padded_bases, 880)
00376         self.assertEqual(record.contigs[1].reads[9].rd.info_items, 0)
00377         self.assertEqual(record.contigs[1].reads[9].rd.read_tags, 0)
00378         center = len(record.contigs[1].reads[9].rd.sequence)//2
00379         self.assertEqual(record.contigs[1].reads[9].rd.sequence[:10], "ggctaCGCCc")
00380         self.assertEqual(record.contigs[1].reads[9].rd.sequence[center-5:center+5], "ATTGAGTTTC")
00381         self.assertEqual(record.contigs[1].reads[9].rd.sequence[-10:], "tggcgttgcg")
00382         self.assertEqual(record.contigs[1].reads[9].qa.qual_clipping_start, 14)
00383         self.assertEqual(record.contigs[1].reads[9].qa.qual_clipping_end, 765)
00384         self.assertEqual(record.contigs[1].reads[9].qa.align_clipping_start, 4)
00385         self.assertEqual(record.contigs[1].reads[9].qa.align_clipping_end, 765)
00386         self.assertEqual(record.contigs[1].reads[9].ds.chromat_file, "BL060-LR7.g.ab1")
00387         self.assertEqual(record.contigs[1].reads[9].ds.phd_file, "BL060-LR7.g.ab1.phd.1")
00388         self.assertEqual(record.contigs[1].reads[9].ds.time, "Fri Nov 14 09:46:03 2003")
00389         self.assertEqual(record.contigs[1].reads[9].ds.chem, "term")
00390         self.assertEqual(record.contigs[1].reads[9].ds.dye, "big")
00391         self.assertEqual(record.contigs[1].reads[9].ds.template, "")
00392         self.assertEqual(record.contigs[1].reads[9].ds.direction, "")
00393         self.assertEqual(record.contigs[1].reads[9].rt, None)
00394         self.assertEqual(record.contigs[1].reads[9].wr, None)
00395 
00396         # Read 10
00397         self.assertEqual(record.contigs[1].reads[10].rd.name, "BL060c5-LR5.g.ab1")
00398         self.assertEqual(record.contigs[1].reads[10].rd.padded_bases, 871)
00399         self.assertEqual(record.contigs[1].reads[10].rd.info_items, 0)
00400         self.assertEqual(record.contigs[1].reads[10].rd.read_tags, 0)
00401         center = len(record.contigs[1].reads[10].rd.sequence)//2
00402         self.assertEqual(record.contigs[1].reads[10].rd.sequence[:10], "ggtTCGATTA")
00403         self.assertEqual(record.contigs[1].reads[10].rd.sequence[center-5:center+5], "ACCAATTGAC")
00404         self.assertEqual(record.contigs[1].reads[10].rd.sequence[-10:], "ACCACCCatt")
00405         self.assertEqual(record.contigs[1].reads[10].qa.qual_clipping_start, 12)
00406         self.assertEqual(record.contigs[1].reads[10].qa.qual_clipping_end, 767)
00407         self.assertEqual(record.contigs[1].reads[10].qa.align_clipping_start, 1)
00408         self.assertEqual(record.contigs[1].reads[10].qa.align_clipping_end, 871)
00409         self.assertEqual(record.contigs[1].reads[10].ds.chromat_file, "BL060c5-LR5.g.ab1")
00410         self.assertEqual(record.contigs[1].reads[10].ds.phd_file, "BL060c5-LR5.g.ab1.phd.1")
00411         self.assertEqual(record.contigs[1].reads[10].ds.time, "Fri Nov 14 09:46:03 2003")
00412         self.assertEqual(record.contigs[1].reads[10].ds.chem, "term")
00413         self.assertEqual(record.contigs[1].reads[10].ds.dye, "big")
00414         self.assertEqual(record.contigs[1].reads[10].ds.template, "")
00415         self.assertEqual(record.contigs[1].reads[10].ds.direction, "")
00416         self.assertEqual(record.contigs[1].reads[10].rt, None)
00417         self.assertEqual(record.contigs[1].reads[10].wr, None)
00418 
00419         # Read 11
00420         self.assertEqual(record.contigs[1].reads[11].rd.name, "BL060c2-LR5.g.ab1")
00421         self.assertEqual(record.contigs[1].reads[11].rd.padded_bases, 839)
00422         self.assertEqual(record.contigs[1].reads[11].rd.info_items, 0)
00423         self.assertEqual(record.contigs[1].reads[11].rd.read_tags, 0)
00424         center = len(record.contigs[1].reads[11].rd.sequence)//2
00425         self.assertEqual(record.contigs[1].reads[11].rd.sequence[:10], "ggttcatatg")
00426         self.assertEqual(record.contigs[1].reads[11].rd.sequence[center-5:center+5], "TAAAATCAGT")
00427         self.assertEqual(record.contigs[1].reads[11].rd.sequence[-10:], "TCTTGCaata")
00428         self.assertEqual(record.contigs[1].reads[11].qa.qual_clipping_start, 11)
00429         self.assertEqual(record.contigs[1].reads[11].qa.qual_clipping_end, 757)
00430         self.assertEqual(record.contigs[1].reads[11].qa.align_clipping_start, 10)
00431         self.assertEqual(record.contigs[1].reads[11].qa.align_clipping_end, 835)
00432         self.assertEqual(record.contigs[1].reads[11].ds, None)
00433         self.assertEqual(len(record.contigs[1].reads[11].rt), 1)
00434         self.assertEqual(record.contigs[1].reads[11].rt[0].name, "BL060c2-LR5.g.ab1")
00435         self.assertEqual(record.contigs[1].reads[11].rt[0].tag_type, "matchElsewhereHighQual")
00436         self.assertEqual(record.contigs[1].reads[11].rt[0].program, "phrap")
00437         self.assertEqual(record.contigs[1].reads[11].rt[0].padded_start, 617)
00438         self.assertEqual(record.contigs[1].reads[11].rt[0].padded_end, 631)
00439         self.assertEqual(record.contigs[1].reads[11].rt[0].date, "040217:110357")
00440         self.assertEqual(record.contigs[1].reads[11].wr, None) 
00441 
00442         # Read 12
00443         self.assertEqual(record.contigs[1].reads[12].rd.name, "BL060c5-LR0R.b.ab1")
00444         self.assertEqual(record.contigs[1].reads[12].rd.padded_bases, 855)
00445         self.assertEqual(record.contigs[1].reads[12].rd.info_items, 0)
00446         self.assertEqual(record.contigs[1].reads[12].rd.read_tags, 0)
00447         center = len(record.contigs[1].reads[12].rd.sequence)//2
00448         self.assertEqual(record.contigs[1].reads[12].rd.sequence[:10], "cACTCGCGTA")
00449         self.assertEqual(record.contigs[1].reads[12].rd.sequence[center-5:center+5], "CTCGTAAAAT")
00450         self.assertEqual(record.contigs[1].reads[12].rd.sequence[-10:], "aacccctgca")
00451         self.assertEqual(record.contigs[1].reads[12].qa.qual_clipping_start, 94)
00452         self.assertEqual(record.contigs[1].reads[12].qa.qual_clipping_end, 835)
00453         self.assertEqual(record.contigs[1].reads[12].qa.align_clipping_start, 1)
00454         self.assertEqual(record.contigs[1].reads[12].qa.align_clipping_end, 847)
00455         self.assertEqual(record.contigs[1].reads[12].ds.chromat_file, "BL060c5-LR0R.b.ab1")
00456         self.assertEqual(record.contigs[1].reads[12].ds.phd_file, "BL060c5-LR0R.b.ab1.phd.1")
00457         self.assertEqual(record.contigs[1].reads[12].ds.time, "Wed Nov 12 08:16:30 2003")
00458         self.assertEqual(record.contigs[1].reads[12].ds.chem, "term")
00459         self.assertEqual(record.contigs[1].reads[12].ds.dye, "big")
00460         self.assertEqual(record.contigs[1].reads[12].ds.template, "")
00461         self.assertEqual(record.contigs[1].reads[12].ds.direction, "")
00462         self.assertEqual(len(record.contigs[1].reads[12].rt), 1)
00463         self.assertEqual(record.contigs[1].reads[12].rt[0].name, "BL060c5-LR0R.b.ab1")
00464         self.assertEqual(record.contigs[1].reads[12].rt[0].tag_type, "matchElsewhereHighQual")
00465         self.assertEqual(record.contigs[1].reads[12].rt[0].program, "phrap")
00466         self.assertEqual(record.contigs[1].reads[12].rt[0].padded_start, 617)
00467         self.assertEqual(record.contigs[1].reads[12].rt[0].padded_end, 631)
00468         self.assertEqual(record.contigs[1].reads[12].rt[0].date, "040217:110357")
00469         self.assertEqual(record.contigs[1].reads[12].wr, None)
00470 
00471         # Read 13
00472         self.assertEqual(record.contigs[1].reads[13].rd.name, "BL060c2-LR0R.b.ab1")
00473         self.assertEqual(record.contigs[1].reads[13].rd.padded_bases, 852)
00474         self.assertEqual(record.contigs[1].reads[13].rd.info_items, 0)
00475         self.assertEqual(record.contigs[1].reads[13].rd.read_tags, 0)
00476         center = len(record.contigs[1].reads[13].rd.sequence)//2
00477         self.assertEqual(record.contigs[1].reads[13].rd.sequence[:10], "cgCGTa*tTG")
00478         self.assertEqual(record.contigs[1].reads[13].rd.sequence[center-5:center+5], "GTAAAATATT")
00479         self.assertEqual(record.contigs[1].reads[13].rd.sequence[-10:], "Atccttgtag")
00480         self.assertEqual(record.contigs[1].reads[13].qa.qual_clipping_start, 33)
00481         self.assertEqual(record.contigs[1].reads[13].qa.qual_clipping_end, 831)
00482         self.assertEqual(record.contigs[1].reads[13].qa.align_clipping_start, 1)
00483         self.assertEqual(record.contigs[1].reads[13].qa.align_clipping_end, 852)
00484         self.assertEqual(record.contigs[1].reads[13].ds.chromat_file, "BL060c2-LR0R.b.ab1")
00485         self.assertEqual(record.contigs[1].reads[13].ds.phd_file, "BL060c2-LR0R.b.ab1.phd.1")
00486         self.assertEqual(record.contigs[1].reads[13].ds.time, "Wed Nov 12 08:16:29 2003")
00487         self.assertEqual(record.contigs[1].reads[13].ds.chem, "term")
00488         self.assertEqual(record.contigs[1].reads[13].ds.dye, "big")
00489         self.assertEqual(record.contigs[1].reads[13].ds.template, "")
00490         self.assertEqual(record.contigs[1].reads[13].ds.direction, "")
00491         self.assertEqual(record.contigs[1].reads[13].rt, [])
00492         self.assertEqual(len(record.contigs[1].reads[13].wr), 1)
00493         self.assertEqual(record.contigs[1].reads[13].wr[0].name, "BL060c2-LR0R.b.ab1")
00494         self.assertEqual(record.contigs[1].reads[13].wr[0].aligned, "unaligned")
00495         self.assertEqual(record.contigs[1].reads[13].wr[0].program, "phrap")
00496         self.assertEqual(record.contigs[1].reads[13].wr[0].date, "040217:110357")
    
Test to check that contig parser parses each contig into a contig.

Definition at line 497 of file test_Ace.py.

00497 
00498     def test_check_record_parser(self):
00499         """Test to check that contig parser parses each contig into a contig."""
00500         contigs=Ace.parse(self.handle)
00501 
00502         # First contig
00503         contig = contigs.next()
00504         self.assertEqual(len(contig.reads), 2)
00505         self.assertEqual(contig.name, "Contig1")
00506         self.assertEqual(contig.nbases, 856)
00507         self.assertEqual(contig.nreads, 2)
00508         self.assertEqual(contig.nsegments, 31)
00509         self.assertEqual(contig.uorc, 'U')
00510         center = len(contig.sequence)//2
00511         self.assertEqual(contig.sequence[:10], "aatacgGGAT")
00512         self.assertEqual(contig.sequence[center-5:center+5], "ACATCATCTG")
00513         self.assertEqual(contig.sequence[-10:], "cATCTAGtac")
00514         center = len(contig.quality)//2
00515         self.assertEqual(contig.quality[:10], [0, 0, 0, 0, 0, 0, 22, 23, 25, 28])
00516         self.assertEqual(contig.quality[center-5:center+5], [90, 90, 90, 90, 90, 90, 90, 90, 90, 90])
00517         self.assertEqual(contig.quality[-10:], [15, 22, 30, 24, 28, 22, 21, 15, 19, 0])
00518         self.assertEqual(len(contig.af), 2)
00519         self.assertEqual(contig.af[1].name, "BL060c3-LR0R.b.ab1")
00520         self.assertEqual(contig.af[1].coru, "U")
00521         self.assertEqual(contig.af[1].padded_start, 1)
00522         self.assertEqual(len(contig.bs), 31)
00523         self.assertEqual(contig.bs[15].name, "BL060c3-LR5.g.ab1")
00524         self.assertEqual(contig.bs[15].padded_start, 434)
00525         self.assertEqual(contig.bs[15].padded_end, 438)
00526         self.assertEqual(contig.bs[30].name, "BL060c3-LR0R.b.ab1")
00527         self.assertEqual(contig.bs[30].padded_start, 823)
00528         self.assertEqual(contig.bs[30].padded_end, 856)
00529         self.assertEqual(contig.ct, None)
00530         self.assertEqual(contig.wa, None)
00531         self.assertEqual(len(contig.reads), 2)
00532         self.assertEqual(contig.reads[0].rd.name, "BL060c3-LR5.g.ab1")
00533         self.assertEqual(contig.reads[0].rd.padded_bases, 868)
00534         self.assertEqual(contig.reads[0].rd.info_items, 0)
00535         self.assertEqual(contig.reads[0].rd.read_tags, 0)
00536         center = len(contig.reads[0].rd.sequence)//2
00537         self.assertEqual(contig.reads[0].rd.sequence[:10], "tagcgaggaa")
00538         self.assertEqual(contig.reads[0].rd.sequence[center-5:center+5], "CCGAGGCCAA")
00539         self.assertEqual(contig.reads[0].rd.sequence[-10:], "gaaccatcag")
00540         self.assertEqual(contig.reads[0].qa.qual_clipping_start, 80)
00541         self.assertEqual(contig.reads[0].qa.qual_clipping_end, 853)
00542         self.assertEqual(contig.reads[0].qa.align_clipping_start, 22)
00543         self.assertEqual(contig.reads[0].qa.align_clipping_end, 856)
00544         self.assertEqual(contig.reads[0].ds, None)
00545         self.assertEqual(len(contig.reads[0].rt), 2)
00546         self.assertEqual(contig.reads[0].rt[0].name, "BL060c3-LR5.g.ab1")
00547         self.assertEqual(contig.reads[0].rt[0].tag_type, "matchElsewhereHighQual")
00548         self.assertEqual(contig.reads[0].rt[0].program, "phrap")
00549         self.assertEqual(contig.reads[0].rt[0].padded_start, 590)
00550         self.assertEqual(contig.reads[0].rt[0].padded_end, 607)
00551         self.assertEqual(contig.reads[0].rt[0].date, "040217:110357")
00552         self.assertEqual(contig.reads[0].rt[1].name, "BL060c3-LR5.g.ab1")
00553         self.assertEqual(contig.reads[0].rt[1].tag_type, "matchElsewhereHighQual")
00554         self.assertEqual(contig.reads[0].rt[1].program, "phrap")
00555         self.assertEqual(contig.reads[0].rt[1].padded_start, 617)
00556         self.assertEqual(contig.reads[0].rt[1].padded_end, 631)
00557         self.assertEqual(contig.reads[0].rt[1].date, "040217:110357")
00558 
00559         self.assertEqual(len(contig.reads[0].wr), 1)
00560         self.assertEqual(contig.reads[0].wr[0].name, "BL060c3-LR5.g.ab1")
00561         self.assertEqual(contig.reads[0].wr[0].aligned, "unaligned")
00562         self.assertEqual(contig.reads[0].wr[0].program, "phrap")
00563         self.assertEqual(contig.reads[0].wr[0].date, "040217:110357")
00564 
00565         self.assertEqual(contig.reads[1].rd.name, "BL060c3-LR0R.b.ab1")
00566         self.assertEqual(contig.reads[1].rd.padded_bases, 856)
00567         self.assertEqual(contig.reads[1].rd.info_items, 0)
00568         self.assertEqual(contig.reads[1].rd.read_tags, 0)
00569         center = len(contig.reads[1].rd.sequence)//2
00570         self.assertEqual(contig.reads[1].rd.sequence[:10], "aatacgGGAT")
00571         self.assertEqual(contig.reads[1].rd.sequence[center-5:center+5], "ACATCATCTG")
00572         self.assertEqual(contig.reads[1].rd.sequence[-10:], "cATCTAGtac")
00573         self.assertEqual(contig.reads[1].qa.qual_clipping_start, 7)
00574         self.assertEqual(contig.reads[1].qa.qual_clipping_end, 778)
00575         self.assertEqual(contig.reads[1].qa.align_clipping_start, 1)
00576         self.assertEqual(contig.reads[1].qa.align_clipping_end, 856)
00577         self.assertEqual(contig.reads[1].ds, None)
00578         self.assertEqual(contig.reads[1].rt, None)
00579         self.assertEqual(contig.reads[1].wr, None)
00580 
00581         # Second contig
00582         contig = contigs.next()
00583         self.assertEqual(len(contig.reads), 14)
00584         self.assertEqual(contig.name, "Contig2")
00585         self.assertEqual(contig.nbases, 3296)
00586         self.assertEqual(contig.nreads, 14)
00587         self.assertEqual(contig.nsegments, 214)
00588         self.assertEqual(contig.uorc, 'U')
00589         center = len(contig.sequence) // 2
00590         self.assertEqual(contig.sequence[:10], "cacggatgat")
00591         self.assertEqual(contig.sequence[center-5:center+5], "TTTGAATATT")
00592         self.assertEqual(contig.sequence[-10:], "Atccttgtag")
00593         center = len(contig.quality) // 2
00594         self.assertEqual(contig.quality[:10], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0])
00595         self.assertEqual(contig.quality[center-5:center+5], [90, 90, 90, 90, 90, 90, 90, 90, 90, 90])
00596         self.assertEqual(contig.quality[-10:], [24, 0, 0, 0, 0, 0, 0, 0, 0, 0])
00597         self.assertEqual(len(contig.af), 14)
00598         self.assertEqual(contig.af[7].name, "BL060-LR3R.b.ab1")
00599         self.assertEqual(contig.af[7].coru, "C")
00600         self.assertEqual(contig.af[7].padded_start, 1601)
00601         self.assertEqual(contig.af[13].name, "BL060c2-LR0R.b.ab1")
00602         self.assertEqual(contig.af[13].coru, "C")
00603         self.assertEqual(contig.af[13].padded_start, 2445)
00604         self.assertEqual(len(contig.bs), 214)
00605         self.assertEqual(contig.bs[107].name, "BL060-c1-LR3R.b.ab1")
00606         self.assertEqual(contig.bs[107].padded_start, 2286)
00607         self.assertEqual(contig.bs[107].padded_end, 2292)
00608         self.assertEqual(contig.bs[213].name, "BL060c2-LR0R.b.ab1")
00609         self.assertEqual(contig.bs[213].padded_start, 3236)
00610         self.assertEqual(contig.bs[213].padded_end, 3296)
00611         self.assertEqual(len(contig.ct), 3)
00612         self.assertEqual(contig.ct[0].name, "Contig2")
00613         self.assertEqual(contig.ct[0].tag_type, "repeat")
00614         self.assertEqual(contig.ct[0].program, "phrap")
00615         self.assertEqual(contig.ct[0].padded_start, 42)
00616         self.assertEqual(contig.ct[0].padded_end, 43)
00617         self.assertEqual(contig.ct[0].date, "123456:765432")
00618         self.assertEqual(contig.ct[0].info, ['This is the forst line of comment for c2', 'and this the second for c2'])
00619         self.assertEqual(contig.ct[1].name, "unrelated_Contig")
00620         self.assertEqual(contig.ct[1].tag_type, "repeat")
00621         self.assertEqual(contig.ct[1].program, "phrap")
00622         self.assertEqual(contig.ct[1].padded_start, 1142)
00623         self.assertEqual(contig.ct[1].padded_end, 143)
00624         self.assertEqual(contig.ct[1].date, "122226:722232")
00625         self.assertEqual(contig.ct[1].info, ['This is the forst line of comment for the unrelated ct tag', 'and this the second'])
00626 
00627         self.assertEqual(contig.ct[2].name, "Contig1")
00628         self.assertEqual(contig.ct[2].tag_type, "repeat")
00629         self.assertEqual(contig.ct[2].program, "phrap")
00630         self.assertEqual(contig.ct[2].padded_start, 52)
00631         self.assertEqual(contig.ct[2].padded_end, 53)
00632         self.assertEqual(contig.ct[2].date, "555456:555432")
00633         self.assertEqual(contig.ct[2].info, ['This is the forst line of comment for c1', 'and this the second for c1'])
00634 
00635         self.assertEqual(len(contig.wa), 1)
00636         self.assertEqual(contig.wa[0].tag_type, "phrap_params")
00637         self.assertEqual(contig.wa[0].program, "phrap")
00638         self.assertEqual(contig.wa[0].date, "040203:114710")
00639         self.assertEqual(contig.wa[0].info, ['phrap 304_nuclsu.fasta.screen -new_ace -retain_duplicates', 'phrap version 0.990329'])
00640 
00641         self.assertEqual(len(contig.reads), 14)
00642 
00643         # Read 0
00644         self.assertEqual(contig.reads[0].rd.name, "BL060-c1-LR12.g.ab1")
00645         self.assertEqual(contig.reads[0].rd.padded_bases, 862)
00646         self.assertEqual(contig.reads[0].rd.info_items, 0)
00647         self.assertEqual(contig.reads[0].rd.read_tags, 0)
00648         center = len(contig.reads[0].rd.sequence)//2
00649         self.assertEqual(contig.reads[0].rd.sequence[:10], "cacggatgat")
00650         self.assertEqual(contig.reads[0].rd.sequence[center-5:center+5], "GTTCTCGTTG")
00651         self.assertEqual(contig.reads[0].rd.sequence[-10:], "CGTTTACCcg")
00652         self.assertEqual(contig.reads[0].qa.qual_clipping_start, 81)
00653         self.assertEqual(contig.reads[0].qa.qual_clipping_end, 842)
00654         self.assertEqual(contig.reads[0].qa.align_clipping_start, 1)
00655         self.assertEqual(contig.reads[0].qa.align_clipping_end, 862)
00656         self.assertEqual(contig.reads[0].ds.chromat_file, "BL060-c1-LR12.g.ab1")
00657         self.assertEqual(contig.reads[0].ds.phd_file, "BL060-c1-LR12.g.ab1.phd.1")
00658         self.assertEqual(contig.reads[0].ds.time, "Tue Feb  3 11:01:16 2004")
00659         self.assertEqual(contig.reads[0].ds.chem, "term")
00660         self.assertEqual(contig.reads[0].ds.dye, "big")
00661         self.assertEqual(contig.reads[0].ds.template, "")
00662         self.assertEqual(contig.reads[0].ds.direction, "")
00663         self.assertEqual(contig.reads[0].rt, None)
00664         self.assertEqual(contig.reads[0].wr, None)
00665 
00666         # Read 1
00667         self.assertEqual(contig.reads[1].rd.name, "BL060-c1-LR11.g.ab1")
00668         self.assertEqual(contig.reads[1].rd.padded_bases, 880)
00669         self.assertEqual(contig.reads[1].rd.info_items, 0)
00670         self.assertEqual(contig.reads[1].rd.read_tags, 0)
00671         center = len(contig.reads[1].rd.sequence)//2
00672         self.assertEqual(contig.reads[1].rd.sequence[:10], "ctttctgacC")
00673         self.assertEqual(contig.reads[1].rd.sequence[center-5:center+5], "CTGTGGTTTC")
00674         self.assertEqual(contig.reads[1].rd.sequence[-10:], "cggagttacg")
00675         self.assertEqual(contig.reads[1].qa.qual_clipping_start, 11)
00676         self.assertEqual(contig.reads[1].qa.qual_clipping_end, 807)
00677         self.assertEqual(contig.reads[1].qa.align_clipping_start, 8)
00678         self.assertEqual(contig.reads[1].qa.align_clipping_end, 880)
00679         self.assertEqual(contig.reads[1].ds.chromat_file, "BL060-c1-LR11.g.ab1")
00680         self.assertEqual(contig.reads[1].ds.phd_file, "BL060-c1-LR11.g.ab1.phd.1")
00681         self.assertEqual(contig.reads[1].ds.time, "Tue Feb  3 11:01:16 2004")
00682         self.assertEqual(contig.reads[1].ds.chem, "term")
00683         self.assertEqual(contig.reads[1].ds.dye, "big")
00684         self.assertEqual(contig.reads[1].ds.template, "")
00685         self.assertEqual(contig.reads[1].ds.direction, "")
00686         self.assertEqual(len(contig.reads[1].rt), 1)
00687         self.assertEqual(contig.reads[1].rt[0].name, "BL060c3-LR5.g.ab1")
00688         self.assertEqual(contig.reads[1].rt[0].tag_type, "matchElsewhereHighQual")
00689         self.assertEqual(contig.reads[1].rt[0].program, "phrap")
00690         self.assertEqual(contig.reads[1].rt[0].padded_start, 617)
00691         self.assertEqual(contig.reads[1].rt[0].padded_end, 631)
00692         self.assertEqual(contig.reads[1].rt[0].date, "040217:110357")
00693         self.assertEqual(contig.reads[1].wr, None)
00694 
00695         # Read 2
00696         self.assertEqual(contig.reads[2].rd.name, "BL060-c1-LR9.g.ab1")
00697         self.assertEqual(contig.reads[2].rd.padded_bases, 864)
00698         self.assertEqual(contig.reads[2].rd.info_items, 0)
00699         self.assertEqual(contig.reads[2].rd.read_tags, 0)
00700         center = len(contig.reads[2].rd.sequence)//2
00701         self.assertEqual(contig.reads[2].rd.sequence[:10], "cacccaCTTT")
00702         self.assertEqual(contig.reads[2].rd.sequence[center-5:center+5], "ACCAAACATT")
00703         self.assertEqual(contig.reads[2].rd.sequence[-10:], "GGTAGCACgc")
00704         self.assertEqual(contig.reads[2].qa.qual_clipping_start, 7)
00705         self.assertEqual(contig.reads[2].qa.qual_clipping_end, 840)
00706         self.assertEqual(contig.reads[2].qa.align_clipping_start, 4)
00707         self.assertEqual(contig.reads[2].qa.align_clipping_end, 864)
00708         self.assertEqual(contig.reads[2].ds.chromat_file, "BL060-c1-LR9.g.ab1")
00709         self.assertEqual(contig.reads[2].ds.phd_file, "BL060-c1-LR9.g.ab1.phd.1")
00710         self.assertEqual(contig.reads[2].ds.time, "Tue Feb  3 11:01:16 2004")
00711         self.assertEqual(contig.reads[2].ds.chem, "term")
00712         self.assertEqual(contig.reads[2].ds.dye, "big")
00713         self.assertEqual(contig.reads[2].ds.template, "")
00714         self.assertEqual(contig.reads[2].ds.direction, "")
00715         self.assertEqual(contig.reads[2].rt, None)
00716         self.assertEqual(contig.reads[2].wr, None)
00717 
00718         # Read 3
00719         self.assertEqual(contig.reads[3].rd.name, "BL060-c1-LR17R.b.ab1")
00720         self.assertEqual(contig.reads[3].rd.padded_bases, 863)
00721         self.assertEqual(contig.reads[3].rd.info_items, 0)
00722         self.assertEqual(contig.reads[3].rd.read_tags, 0)
00723         center = len(contig.reads[3].rd.sequence)//2
00724         self.assertEqual(contig.reads[3].rd.sequence[:10], "ctaattggcc")
00725         self.assertEqual(contig.reads[3].rd.sequence[center-5:center+5], "GGAACCTTTC")
00726         self.assertEqual(contig.reads[3].rd.sequence[-10:], "CAACCTgact")
00727         self.assertEqual(contig.reads[3].qa.qual_clipping_start, 63)
00728         self.assertEqual(contig.reads[3].qa.qual_clipping_end, 857)
00729         self.assertEqual(contig.reads[3].qa.align_clipping_start, 1)
00730         self.assertEqual(contig.reads[3].qa.align_clipping_end, 861)
00731         self.assertEqual(contig.reads[3].ds.chromat_file, "BL060-c1-LR17R.b.ab1")
00732         self.assertEqual(contig.reads[3].ds.phd_file, "BL060-c1-LR17R.b.ab1.phd.1")
00733         self.assertEqual(contig.reads[3].ds.time, "Tue Feb  3 11:01:16 2004")
00734         self.assertEqual(contig.reads[3].ds.chem, "term")
00735         self.assertEqual(contig.reads[3].ds.dye, "big")
00736         self.assertEqual(contig.reads[3].ds.template, "")
00737         self.assertEqual(contig.reads[3].ds.direction, "")
00738         self.assertEqual(len(contig.reads[3].rt), 1)
00739         self.assertEqual(contig.reads[3].rt[0].name, "BL060c3-LR5.g.ab1")
00740         self.assertEqual(contig.reads[3].rt[0].tag_type, "matchElsewhereHighQual")
00741         self.assertEqual(contig.reads[3].rt[0].program, "phrap")
00742         self.assertEqual(contig.reads[3].rt[0].padded_start, 617)
00743         self.assertEqual(contig.reads[3].rt[0].padded_end, 631)
00744         self.assertEqual(contig.reads[3].rt[0].date, "040217:110357")
00745         self.assertEqual(contig.reads[3].wr, None)
00746 
00747         # Read 4
00748         self.assertEqual(contig.reads[4].rd.name, "BL060-LR8.5.g.ab1")
00749         self.assertEqual(contig.reads[4].rd.padded_bases, 877)
00750         self.assertEqual(contig.reads[4].rd.info_items, 0)
00751         self.assertEqual(contig.reads[4].rd.read_tags, 0)
00752         center = len(contig.reads[4].rd.sequence)//2
00753         self.assertEqual(contig.reads[4].rd.sequence[:10], "tgCTGCGGTT")
00754         self.assertEqual(contig.reads[4].rd.sequence[center-5:center+5], "GGCAGTTTCA")
00755         self.assertEqual(contig.reads[4].rd.sequence[-10:], "tactcataaa")
00756         self.assertEqual(contig.reads[4].qa.qual_clipping_start, 13)
00757         self.assertEqual(contig.reads[4].qa.qual_clipping_end, 729)
00758         self.assertEqual(contig.reads[4].qa.align_clipping_start, 1)
00759         self.assertEqual(contig.reads[4].qa.align_clipping_end, 877)
00760         self.assertEqual(contig.reads[4].ds.chromat_file, "BL060-LR8.5.g.ab1")
00761         self.assertEqual(contig.reads[4].ds.phd_file, "BL060-LR8.5.g.ab1.phd.1")
00762         self.assertEqual(contig.reads[4].ds.time, "Fri Nov 14 09:46:03 2003")
00763         self.assertEqual(contig.reads[4].ds.chem, "term")
00764         self.assertEqual(contig.reads[4].ds.dye, "big")
00765         self.assertEqual(contig.reads[4].ds.template, "")
00766         self.assertEqual(contig.reads[4].ds.direction, "")
00767         self.assertEqual(contig.reads[4].rt, None)
00768         self.assertEqual(contig.reads[4].wr, None)
00769 
00770         # Read 5
00771         self.assertEqual(contig.reads[5].rd.name, "BL060-LR3R.b.ab1")
00772         self.assertEqual(contig.reads[5].rd.padded_bases, 874)
00773         self.assertEqual(contig.reads[5].rd.info_items, 0)
00774         self.assertEqual(contig.reads[5].rd.read_tags, 0)
00775         center = len(contig.reads[5].rd.sequence)//2
00776         self.assertEqual(contig.reads[5].rd.sequence[:10], "ctCTTAGGAT")
00777         self.assertEqual(contig.reads[5].rd.sequence[center-5:center+5], "AACTCACATT")
00778         self.assertEqual(contig.reads[5].rd.sequence[-10:], "*CACCCAAac")
00779         self.assertEqual(contig.reads[5].qa.qual_clipping_start, 65)
00780         self.assertEqual(contig.reads[5].qa.qual_clipping_end, 874)
00781         self.assertEqual(contig.reads[5].qa.align_clipping_start, 1)
00782         self.assertEqual(contig.reads[5].qa.align_clipping_end, 874)
00783         self.assertEqual(contig.reads[5].ds.chromat_file, "BL060-LR3R.b.ab1")
00784         self.assertEqual(contig.reads[5].ds.phd_file, "BL060-LR3R.b.ab1.phd.1")
00785         self.assertEqual(contig.reads[5].ds.time, "Fri Nov 14 09:46:03 2003")
00786         self.assertEqual(contig.reads[5].ds.chem, "term")
00787         self.assertEqual(contig.reads[5].ds.dye, "big")
00788         self.assertEqual(contig.reads[5].ds.template, "")
00789         self.assertEqual(contig.reads[5].ds.direction, "")
00790         self.assertEqual(contig.reads[5].rt, None)
00791         self.assertEqual(contig.reads[5].wr, None)
00792 
00793         # Read 6
00794         self.assertEqual(contig.reads[6].rd.name, "BL060-c1-LR3R.b.ab1")
00795         self.assertEqual(contig.reads[6].rd.padded_bases, 864)
00796         self.assertEqual(contig.reads[6].rd.info_items, 0)
00797         self.assertEqual(contig.reads[6].rd.read_tags, 0)
00798         center = len(contig.reads[6].rd.sequence)//2
00799         self.assertEqual(contig.reads[6].rd.sequence[:10], "CCaTGTCCAA")
00800         self.assertEqual(contig.reads[6].rd.sequence[center-5:center+5], "AAGGGTT*CA")
00801         self.assertEqual(contig.reads[6].rd.sequence[-10:], "ACACTCGCga")
00802         self.assertEqual(contig.reads[6].qa.qual_clipping_start, 73)
00803         self.assertEqual(contig.reads[6].qa.qual_clipping_end, 862)
00804         self.assertEqual(contig.reads[6].qa.align_clipping_start, 1)
00805         self.assertEqual(contig.reads[6].qa.align_clipping_end, 863)
00806         self.assertEqual(contig.reads[6].ds.chromat_file, "BL060-c1-LR3R.b.ab1")
00807         self.assertEqual(contig.reads[6].ds.phd_file, "BL060-c1-LR3R.b.ab1.phd.1")
00808         self.assertEqual(contig.reads[6].ds.time, "Tue Feb  3 11:01:16 2004")
00809         self.assertEqual(contig.reads[6].ds.chem, "term")
00810         self.assertEqual(contig.reads[6].ds.dye, "big")
00811         self.assertEqual(contig.reads[6].ds.template, "")
00812         self.assertEqual(contig.reads[6].ds.direction, "")
00813         self.assertEqual(contig.reads[6].rt, None)
00814         self.assertEqual(contig.reads[6].wr, None)
00815 
00816         # Read 7
00817         self.assertEqual(contig.reads[7].rd.name, "BL060-LR3R.b.ab1")
00818         self.assertEqual(contig.reads[7].rd.padded_bases, 857)
00819         self.assertEqual(contig.reads[7].rd.info_items, 0)
00820         self.assertEqual(contig.reads[7].rd.read_tags, 0)
00821         center = len(contig.reads[7].rd.sequence)//2
00822         self.assertEqual(contig.reads[7].rd.sequence[:10], "agaaagagga")
00823         self.assertEqual(contig.reads[7].rd.sequence[center-5:center+5], "nnnannnnnn")
00824         self.assertEqual(contig.reads[7].rd.sequence[-10:], "gtctttgctc")
00825         self.assertEqual(contig.reads[7].qa.qual_clipping_start, 548)
00826         self.assertEqual(contig.reads[7].qa.qual_clipping_end, 847)
00827         self.assertEqual(contig.reads[7].qa.align_clipping_start, 442)
00828         self.assertEqual(contig.reads[7].qa.align_clipping_end, 854)
00829         self.assertEqual(contig.reads[7].ds.chromat_file, "BL060-LR3R.b.ab1")
00830         self.assertEqual(contig.reads[7].ds.phd_file, "BL060-LR3R.b.ab1.phd.1")
00831         self.assertEqual(contig.reads[7].ds.time, "Fri Jan 16 09:01:10 2004")
00832         self.assertEqual(contig.reads[7].ds.chem, "term")
00833         self.assertEqual(contig.reads[7].ds.dye, "big")
00834         self.assertEqual(contig.reads[7].ds.template, "")
00835         self.assertEqual(contig.reads[7].ds.direction, "")
00836         self.assertEqual(contig.reads[7].rt, None)
00837         self.assertEqual(contig.reads[7].wr, None)
00838 
00839         # Read 8
00840         self.assertEqual(contig.reads[8].rd.name, "BL060-c1-LR7.g.ab1")
00841         self.assertEqual(contig.reads[8].rd.padded_bases, 878)
00842         self.assertEqual(contig.reads[8].rd.info_items, 0)
00843         self.assertEqual(contig.reads[8].rd.read_tags, 0)
00844         center = len(contig.reads[8].rd.sequence)//2
00845         self.assertEqual(contig.reads[8].rd.sequence[:10], "agTttc*ctc")
00846         self.assertEqual(contig.reads[8].rd.sequence[center-5:center+5], "TCATAAAACT")
00847         self.assertEqual(contig.reads[8].rd.sequence[-10:], "xxxxxxxxxx")
00848         self.assertEqual(contig.reads[8].qa.qual_clipping_start, 20)
00849         self.assertEqual(contig.reads[8].qa.qual_clipping_end, 798)
00850         self.assertEqual(contig.reads[8].qa.align_clipping_start, 1)
00851         self.assertEqual(contig.reads[8].qa.align_clipping_end, 798)
00852         self.assertEqual(contig.reads[8].ds.chromat_file, "BL060-c1-LR7.g.ab1")
00853         self.assertEqual(contig.reads[8].ds.phd_file, "BL060-c1-LR7.g.ab1.phd.1")
00854         self.assertEqual(contig.reads[8].ds.time, "Tue Feb  3 11:01:16 2004")
00855         self.assertEqual(contig.reads[8].ds.chem, "term")
00856         self.assertEqual(contig.reads[8].ds.dye, "big")
00857         self.assertEqual(contig.reads[8].ds.template, "")
00858         self.assertEqual(contig.reads[8].ds.direction, "")
00859         self.assertEqual(contig.reads[8].rt, None)
00860         self.assertEqual(contig.reads[8].wr, None)
00861 
00862         # Read 9
00863         self.assertEqual(contig.reads[9].rd.name, "BL060-LR7.g.ab1")
00864         self.assertEqual(contig.reads[9].rd.padded_bases, 880)
00865         self.assertEqual(contig.reads[9].rd.info_items, 0)
00866         self.assertEqual(contig.reads[9].rd.read_tags, 0)
00867         center = len(contig.reads[9].rd.sequence)//2
00868         self.assertEqual(contig.reads[9].rd.sequence[:10], "ggctaCGCCc")
00869         self.assertEqual(contig.reads[9].rd.sequence[center-5:center+5], "ATTGAGTTTC")
00870         self.assertEqual(contig.reads[9].rd.sequence[-10:], "tggcgttgcg")
00871         self.assertEqual(contig.reads[9].qa.qual_clipping_start, 14)
00872         self.assertEqual(contig.reads[9].qa.qual_clipping_end, 765)
00873         self.assertEqual(contig.reads[9].qa.align_clipping_start, 4)
00874         self.assertEqual(contig.reads[9].qa.align_clipping_end, 765)
00875         self.assertEqual(contig.reads[9].ds.chromat_file, "BL060-LR7.g.ab1")
00876         self.assertEqual(contig.reads[9].ds.phd_file, "BL060-LR7.g.ab1.phd.1")
00877         self.assertEqual(contig.reads[9].ds.time, "Fri Nov 14 09:46:03 2003")
00878         self.assertEqual(contig.reads[9].ds.chem, "term")
00879         self.assertEqual(contig.reads[9].ds.dye, "big")
00880         self.assertEqual(contig.reads[9].ds.template, "")
00881         self.assertEqual(contig.reads[9].ds.direction, "")
00882         self.assertEqual(contig.reads[9].rt, None)
00883         self.assertEqual(contig.reads[9].wr, None)
00884 
00885         # Read 10
00886         self.assertEqual(contig.reads[10].rd.name, "BL060c5-LR5.g.ab1")
00887         self.assertEqual(contig.reads[10].rd.padded_bases, 871)
00888         self.assertEqual(contig.reads[10].rd.info_items, 0)
00889         self.assertEqual(contig.reads[10].rd.read_tags, 0)
00890         center = len(contig.reads[10].rd.sequence)//2
00891         self.assertEqual(contig.reads[10].rd.sequence[:10], "ggtTCGATTA")
00892         self.assertEqual(contig.reads[10].rd.sequence[center-5:center+5], "ACCAATTGAC")
00893         self.assertEqual(contig.reads[10].rd.sequence[-10:], "ACCACCCatt")
00894         self.assertEqual(contig.reads[10].qa.qual_clipping_start, 12)
00895         self.assertEqual(contig.reads[10].qa.qual_clipping_end, 767)
00896         self.assertEqual(contig.reads[10].qa.align_clipping_start, 1)
00897         self.assertEqual(contig.reads[10].qa.align_clipping_end, 871)
00898         self.assertEqual(contig.reads[10].ds.chromat_file, "BL060c5-LR5.g.ab1")
00899         self.assertEqual(contig.reads[10].ds.phd_file, "BL060c5-LR5.g.ab1.phd.1")
00900         self.assertEqual(contig.reads[10].ds.time, "Fri Nov 14 09:46:03 2003")
00901         self.assertEqual(contig.reads[10].ds.chem, "term")
00902         self.assertEqual(contig.reads[10].ds.dye, "big")
00903         self.assertEqual(contig.reads[10].ds.template, "")
00904         self.assertEqual(contig.reads[10].ds.direction, "")
00905         self.assertEqual(contig.reads[10].rt, None)
00906         self.assertEqual(contig.reads[10].wr, None)
00907 
00908         # Read 11
00909         self.assertEqual(contig.reads[11].rd.name, "BL060c2-LR5.g.ab1")
00910         self.assertEqual(contig.reads[11].rd.padded_bases, 839)
00911         self.assertEqual(contig.reads[11].rd.info_items, 0)
00912         self.assertEqual(contig.reads[11].rd.read_tags, 0)
00913         center = len(contig.reads[11].rd.sequence)//2
00914         self.assertEqual(contig.reads[11].rd.sequence[:10], "ggttcatatg")
00915         self.assertEqual(contig.reads[11].rd.sequence[center-5:center+5], "TAAAATCAGT")
00916         self.assertEqual(contig.reads[11].rd.sequence[-10:], "TCTTGCaata")
00917         self.assertEqual(contig.reads[11].qa.qual_clipping_start, 11)
00918         self.assertEqual(contig.reads[11].qa.qual_clipping_end, 757)
00919         self.assertEqual(contig.reads[11].qa.align_clipping_start, 10)
00920         self.assertEqual(contig.reads[11].qa.align_clipping_end, 835)
00921         self.assertEqual(contig.reads[11].ds, None)
00922         self.assertEqual(len(contig.reads[11].rt), 1)
00923         self.assertEqual(contig.reads[11].rt[0].name, "BL060c2-LR5.g.ab1")
00924         self.assertEqual(contig.reads[11].rt[0].tag_type, "matchElsewhereHighQual")
00925         self.assertEqual(contig.reads[11].rt[0].program, "phrap")
00926         self.assertEqual(contig.reads[11].rt[0].padded_start, 617)
00927         self.assertEqual(contig.reads[11].rt[0].padded_end, 631)
00928         self.assertEqual(contig.reads[11].rt[0].date, "040217:110357")
00929         self.assertEqual(contig.reads[11].wr, None) 
00930 
00931         # Read 12
00932         self.assertEqual(contig.reads[12].rd.name, "BL060c5-LR0R.b.ab1")
00933         self.assertEqual(contig.reads[12].rd.padded_bases, 855)
00934         self.assertEqual(contig.reads[12].rd.info_items, 0)
00935         self.assertEqual(contig.reads[12].rd.read_tags, 0)
00936         center = len(contig.reads[12].rd.sequence)//2
00937         self.assertEqual(contig.reads[12].rd.sequence[:10], "cACTCGCGTA")
00938         self.assertEqual(contig.reads[12].rd.sequence[center-5:center+5], "CTCGTAAAAT")
00939         self.assertEqual(contig.reads[12].rd.sequence[-10:], "aacccctgca")
00940         self.assertEqual(contig.reads[12].qa.qual_clipping_start, 94)
00941         self.assertEqual(contig.reads[12].qa.qual_clipping_end, 835)
00942         self.assertEqual(contig.reads[12].qa.align_clipping_start, 1)
00943         self.assertEqual(contig.reads[12].qa.align_clipping_end, 847)
00944         self.assertEqual(contig.reads[12].ds.chromat_file, "BL060c5-LR0R.b.ab1")
00945         self.assertEqual(contig.reads[12].ds.phd_file, "BL060c5-LR0R.b.ab1.phd.1")
00946         self.assertEqual(contig.reads[12].ds.time, "Wed Nov 12 08:16:30 2003")
00947         self.assertEqual(contig.reads[12].ds.chem, "term")
00948         self.assertEqual(contig.reads[12].ds.dye, "big")
00949         self.assertEqual(contig.reads[12].ds.template, "")
00950         self.assertEqual(contig.reads[12].ds.direction, "")
00951         self.assertEqual(contig.reads[12].rt, None)
00952         self.assertEqual(contig.reads[12].wr, None)
00953 
00954         # Read 13
00955         self.assertEqual(contig.reads[13].rd.name, "BL060c2-LR0R.b.ab1")
00956         self.assertEqual(contig.reads[13].rd.padded_bases, 852)
00957         self.assertEqual(contig.reads[13].rd.info_items, 0)
00958         self.assertEqual(contig.reads[13].rd.read_tags, 0)
00959         center = len(contig.reads[13].rd.sequence)//2
00960         self.assertEqual(contig.reads[13].rd.sequence[:10], "cgCGTa*tTG")
00961         self.assertEqual(contig.reads[13].rd.sequence[center-5:center+5], "GTAAAATATT")
00962         self.assertEqual(contig.reads[13].rd.sequence[-10:], "Atccttgtag")
00963         self.assertEqual(contig.reads[13].qa.qual_clipping_start, 33)
00964         self.assertEqual(contig.reads[13].qa.qual_clipping_end, 831)
00965         self.assertEqual(contig.reads[13].qa.align_clipping_start, 1)
00966         self.assertEqual(contig.reads[13].qa.align_clipping_end, 852)
00967         self.assertEqual(contig.reads[13].ds.chromat_file, "BL060c2-LR0R.b.ab1")
00968         self.assertEqual(contig.reads[13].ds.phd_file, "BL060c2-LR0R.b.ab1.phd.1")
00969         self.assertEqual(contig.reads[13].ds.time, "Wed Nov 12 08:16:29 2003")
00970         self.assertEqual(contig.reads[13].ds.chem, "term")
00971         self.assertEqual(contig.reads[13].ds.dye, "big")
00972         self.assertEqual(contig.reads[13].ds.template, "")
00973         self.assertEqual(contig.reads[13].ds.direction, "")
00974         self.assertEqual(len(contig.reads[13].rt), 1)
00975         self.assertEqual(contig.reads[13].rt[0].name, "BL060c5-LR0R.b.ab1")
00976         self.assertEqual(contig.reads[13].rt[0].tag_type, "matchElsewhereHighQual")
00977         self.assertEqual(contig.reads[13].rt[0].program, "phrap")
00978         self.assertEqual(contig.reads[13].rt[0].padded_start, 617)
00979         self.assertEqual(contig.reads[13].rt[0].padded_end, 631)
00980         self.assertEqual(contig.reads[13].rt[0].date, "040217:110357")
00981         self.assertEqual(len(contig.reads[13].wr), 1)
00982         self.assertEqual(contig.reads[13].wr[0].name, "BL060c2-LR0R.b.ab1")
00983         self.assertEqual(contig.reads[13].wr[0].aligned, "unaligned")
00984         self.assertEqual(contig.reads[13].wr[0].program, "phrap")
00985         self.assertEqual(contig.reads[13].wr[0].date, "040217:110357")
00986 
00987         # Make sure there are no more contigs
00988         self.assertRaises(StopIteration, contigs.next)
00989 


Member Data Documentation

Definition at line 10 of file test_Ace.py.


The documentation for this class was generated from the following file: