Back to index

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

List of all members.

Public Member Functions

def setUp
def test_check_ACEParser
def test_check_record_parser

Public Attributes

 handle

Detailed Description

Test parsing example ACE input file for CONSED.

The sample input file was downloaded from:
http://bozeman.mbt.washington.edu/consed/distributions/README.16.0.txt

Definition at line 1336 of file test_Ace.py.


Member Function Documentation

Definition at line 1342 of file test_Ace.py.

01342 
01343     def setUp(self):
01344         self.handle = open("Ace/consed_sample.ace")

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

Definition at line 1345 of file test_Ace.py.

01345 
01346     def test_check_ACEParser(self):
01347         """Test to check that ACEParser can parse the whole file into one record."""
01348         record=Ace.read(self.handle)
01349         self.assertEqual(record.ncontigs, 1)
01350         self.assertEqual(record.nreads, 8)
01351         self.assertEqual(len(record.wa), 1)
01352         self.assertEqual(record.wa[0].tag_type, "phrap_params")
01353         self.assertEqual(record.wa[0].program, "phrap")
01354         self.assertEqual(record.wa[0].date, "990621:161947")
01355         self.assertEqual(record.wa[0].info, ['/usr/local/genome/bin/phrap standard.fasta.screen -new_ace -view', 'phrap version 0.990319'])
01356         self.assertEqual(len(record.contigs), 1)
01357 
01358         self.assertEqual(len(record.contigs[0].reads), 8)
01359         self.assertEqual(record.contigs[0].name, "Contig1")
01360         self.assertEqual(record.contigs[0].nbases, 1475)
01361         self.assertEqual(record.contigs[0].nreads, 8)
01362         self.assertEqual(record.contigs[0].nsegments, 156)
01363         self.assertEqual(record.contigs[0].uorc, "U")
01364         center = len(record.contigs[0].sequence)//2
01365         self.assertEqual(record.contigs[0].sequence[:10], "agccccgggc")
01366         self.assertEqual(record.contigs[0].sequence[center-5:center+5], "CTTCCCCAGG")
01367         self.assertEqual(record.contigs[0].sequence[-10:], "gttgggtttg")
01368         center = len(record.contigs[0].quality)//2
01369         self.assertEqual(record.contigs[0].quality[:10], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0])
01370         self.assertEqual(record.contigs[0].quality[center-5:center+5], [90, 90, 90, 90, 90, 90, 90, 90, 89, 89])
01371         self.assertEqual(record.contigs[0].quality[-10:], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0])
01372         self.assertEqual(len(record.contigs[0].af), 8)
01373         self.assertEqual(len(record.contigs[0].bs), 156)
01374         self.assertEqual(record.contigs[0].af[4].name, "K26-291s")
01375         self.assertEqual(record.contigs[0].af[4].coru, "U")
01376         self.assertEqual(record.contigs[0].af[4].padded_start, 828)
01377         self.assertEqual(record.contigs[0].af[7].name, "K26-766c")
01378         self.assertEqual(record.contigs[0].af[7].coru, "C")
01379         self.assertEqual(record.contigs[0].af[7].padded_start, 408)
01380         self.assertEqual(record.contigs[0].bs[78].name, "K26-394c")
01381         self.assertEqual(record.contigs[0].bs[78].padded_start, 987)
01382         self.assertEqual(record.contigs[0].bs[78].padded_end, 987)
01383         self.assertEqual(record.contigs[0].bs[155].name, "K26-822c")
01384         self.assertEqual(record.contigs[0].bs[155].padded_start, 1303)
01385         self.assertEqual(record.contigs[0].bs[155].padded_end, 1475)
01386         self.assertEqual(len(record.contigs[0].ct), 3)
01387         self.assertEqual(record.contigs[0].ct[0].name, "Contig1")
01388         self.assertEqual(record.contigs[0].ct[0].tag_type, "repeat")
01389         self.assertEqual(record.contigs[0].ct[0].program, "consed")
01390         self.assertEqual(record.contigs[0].ct[0].padded_start, 976)
01391         self.assertEqual(record.contigs[0].ct[0].padded_end, 986)
01392         self.assertEqual(record.contigs[0].ct[0].date, "971218:180623")
01393         self.assertEqual(record.contigs[0].ct[0].info, [])
01394         self.assertEqual(record.contigs[0].ct[1].name, "Contig1")
01395         self.assertEqual(record.contigs[0].ct[1].tag_type, "comment")
01396         self.assertEqual(record.contigs[0].ct[1].program, "consed")
01397         self.assertEqual(record.contigs[0].ct[1].padded_start, 996)
01398         self.assertEqual(record.contigs[0].ct[1].padded_end, 1007)
01399         self.assertEqual(record.contigs[0].ct[1].date, "971218:180623")
01400         self.assertEqual(record.contigs[0].ct[1].info, ['This is line 1 of a comment', 'There may be any number of lines'])
01401         self.assertEqual(record.contigs[0].ct[2].name, "Contig1")
01402         self.assertEqual(record.contigs[0].ct[2].tag_type, "oligo")
01403         self.assertEqual(record.contigs[0].ct[2].program, "consed")
01404         self.assertEqual(record.contigs[0].ct[2].padded_start, 963)
01405         self.assertEqual(record.contigs[0].ct[2].padded_end, 987)
01406         self.assertEqual(record.contigs[0].ct[2].date, "971218:180623")
01407         self.assertEqual(record.contigs[0].ct[2].info, ['standard.1 acataagacattctaaatttttact 50 U', 'seq from clone'])
01408         self.assertEqual(len(record.contigs[0].wa), 1)
01409         self.assertEqual(record.contigs[0].wa[0].tag_type, "phrap_params")
01410         self.assertEqual(record.contigs[0].wa[0].program, "phrap")
01411         self.assertEqual(record.contigs[0].wa[0].date, "990621:161947")
01412         self.assertEqual(record.contigs[0].wa[0].info, ['/usr/local/genome/bin/phrap standard.fasta.screen -new_ace -view', 'phrap version 0.990319'])
01413 
01414         self.assertEqual(len(record.contigs[0].reads), 8)
01415 
01416         self.assertEqual(record.contigs[0].reads[0].rd.name, "K26-217c")
01417         self.assertEqual(record.contigs[0].reads[0].rd.padded_bases, 563)
01418         self.assertEqual(record.contigs[0].reads[0].rd.info_items, 0)
01419         self.assertEqual(record.contigs[0].reads[0].rd.read_tags, 0)
01420         center = len(record.contigs[0].reads[0].rd.sequence)//2
01421         self.assertEqual(record.contigs[0].reads[0].rd.sequence[:10], "tcccCgtgag")
01422         self.assertEqual(record.contigs[0].reads[0].rd.sequence[center-5:center+5], "CTCCTGcctg")
01423         self.assertEqual(record.contigs[0].reads[0].rd.sequence[-10:], "ggcccccctc")
01424         self.assertEqual(record.contigs[0].reads[0].qa.qual_clipping_start, 19)
01425         self.assertEqual(record.contigs[0].reads[0].qa.qual_clipping_end, 349)
01426         self.assertEqual(record.contigs[0].reads[0].qa.align_clipping_start, 19)
01427         self.assertEqual(record.contigs[0].reads[0].qa.align_clipping_end, 424)
01428         self.assertEqual(record.contigs[0].reads[0].ds.chromat_file, "K26-217c")
01429         self.assertEqual(record.contigs[0].reads[0].ds.phd_file, "K26-217c.phd.1")
01430         self.assertEqual(record.contigs[0].reads[0].ds.time, "Thu Sep 12 15:42:38 1996")
01431         self.assertEqual(record.contigs[0].reads[0].ds.chem, "")
01432         self.assertEqual(record.contigs[0].reads[0].ds.dye, "")
01433         self.assertEqual(record.contigs[0].reads[0].ds.template, "")
01434         self.assertEqual(record.contigs[0].reads[0].ds.direction, "")
01435         self.assertEqual(record.contigs[0].reads[0].rt, None)
01436         self.assertEqual(record.contigs[0].reads[0].wr, None)
01437 
01438         self.assertEqual(record.contigs[0].reads[1].rd.name, "K26-526t")
01439         self.assertEqual(record.contigs[0].reads[1].rd.padded_bases, 687)
01440         self.assertEqual(record.contigs[0].reads[1].rd.info_items, 0)
01441         self.assertEqual(record.contigs[0].reads[1].rd.read_tags, 0)
01442         center = len(record.contigs[0].reads[1].rd.sequence)//2
01443         self.assertEqual(record.contigs[0].reads[1].rd.sequence[:10], "ccgtcctgag")
01444         self.assertEqual(record.contigs[0].reads[1].rd.sequence[center-5:center+5], "cacagcccT*")
01445         self.assertEqual(record.contigs[0].reads[1].rd.sequence[-10:], "Ttttgtttta")
01446         self.assertEqual(record.contigs[0].reads[1].qa.qual_clipping_start, 12)
01447         self.assertEqual(record.contigs[0].reads[1].qa.qual_clipping_end, 353)
01448         self.assertEqual(record.contigs[0].reads[1].qa.align_clipping_start, 9)
01449         self.assertEqual(record.contigs[0].reads[1].qa.align_clipping_end, 572)
01450         self.assertEqual(record.contigs[0].reads[1].ds.chromat_file, "K26-526t")
01451         self.assertEqual(record.contigs[0].reads[1].ds.phd_file, "K26-526t.phd.1")
01452         self.assertEqual(record.contigs[0].reads[1].ds.time, "Thu Sep 12 15:42:33 1996")
01453         self.assertEqual(record.contigs[0].reads[1].ds.chem, "")
01454         self.assertEqual(record.contigs[0].reads[1].ds.dye, "")
01455         self.assertEqual(record.contigs[0].reads[1].ds.template, "")
01456         self.assertEqual(record.contigs[0].reads[1].ds.direction, "")
01457         self.assertEqual(record.contigs[0].reads[1].rt, None)
01458         self.assertEqual(record.contigs[0].reads[1].wr, None)
01459 
01460         self.assertEqual(record.contigs[0].reads[2].rd.name, "K26-961c")
01461         self.assertEqual(record.contigs[0].reads[2].rd.padded_bases, 517)
01462         self.assertEqual(record.contigs[0].reads[2].rd.info_items, 0)
01463         self.assertEqual(record.contigs[0].reads[2].rd.read_tags, 0)
01464         center = len(record.contigs[0].reads[2].rd.sequence)//2
01465         self.assertEqual(record.contigs[0].reads[2].rd.sequence[:10], "aatattaccg")
01466         self.assertEqual(record.contigs[0].reads[2].rd.sequence[center-5:center+5], "CAGATGGGTT")
01467         self.assertEqual(record.contigs[0].reads[2].rd.sequence[-10:], "ctattcaggg")
01468         self.assertEqual(record.contigs[0].reads[2].qa.qual_clipping_start, 20)
01469         self.assertEqual(record.contigs[0].reads[2].qa.qual_clipping_end, 415)
01470         self.assertEqual(record.contigs[0].reads[2].qa.align_clipping_start, 26)
01471         self.assertEqual(record.contigs[0].reads[2].qa.align_clipping_end, 514)
01472         self.assertEqual(record.contigs[0].reads[2].ds.chromat_file, "K26-961c")
01473         self.assertEqual(record.contigs[0].reads[2].ds.phd_file, "K26-961c.phd.1")
01474         self.assertEqual(record.contigs[0].reads[2].ds.time, "Thu Sep 12 15:42:37 1996")
01475         self.assertEqual(record.contigs[0].reads[2].ds.chem, "")
01476         self.assertEqual(record.contigs[0].reads[2].ds.dye, "")
01477         self.assertEqual(record.contigs[0].reads[2].ds.template, "")
01478         self.assertEqual(record.contigs[0].reads[2].ds.direction, "")
01479         self.assertEqual(record.contigs[0].reads[2].rt, None)
01480         self.assertEqual(record.contigs[0].reads[2].wr, None)
01481 
01482         self.assertEqual(record.contigs[0].reads[3].rd.name, "K26-394c")
01483         self.assertEqual(record.contigs[0].reads[3].rd.padded_bases, 628)
01484         self.assertEqual(record.contigs[0].reads[3].rd.info_items, 0)
01485         self.assertEqual(record.contigs[0].reads[3].rd.read_tags, 0)
01486         center = len(record.contigs[0].reads[3].rd.sequence)//2
01487         self.assertEqual(record.contigs[0].reads[3].rd.sequence[:10], "ctgcgtatcg")
01488         self.assertEqual(record.contigs[0].reads[3].rd.sequence[center-5:center+5], "AGGATTGCTT")
01489         self.assertEqual(record.contigs[0].reads[3].rd.sequence[-10:], "aaccctgggt")
01490         self.assertEqual(record.contigs[0].reads[3].qa.qual_clipping_start, 18)
01491         self.assertEqual(record.contigs[0].reads[3].qa.qual_clipping_end, 368)
01492         self.assertEqual(record.contigs[0].reads[3].qa.align_clipping_start, 11)
01493         self.assertEqual(record.contigs[0].reads[3].qa.align_clipping_end, 502)
01494         self.assertEqual(record.contigs[0].reads[3].ds.chromat_file, "K26-394c")
01495         self.assertEqual(record.contigs[0].reads[3].ds.phd_file, "K26-394c.phd.1")
01496         self.assertEqual(record.contigs[0].reads[3].ds.time, "Thu Sep 12 15:42:32 1996")
01497         self.assertEqual(record.contigs[0].reads[3].ds.chem, "")
01498         self.assertEqual(record.contigs[0].reads[3].ds.dye, "")
01499         self.assertEqual(record.contigs[0].reads[3].ds.template, "")
01500         self.assertEqual(record.contigs[0].reads[3].ds.direction, "")
01501         self.assertEqual(record.contigs[0].reads[3].rt, None)
01502         self.assertEqual(record.contigs[0].reads[3].wr, None)
01503 
01504         self.assertEqual(record.contigs[0].reads[4].rd.name, "K26-291s")
01505         self.assertEqual(record.contigs[0].reads[4].rd.padded_bases, 556)
01506         self.assertEqual(record.contigs[0].reads[4].rd.info_items, 0)
01507         self.assertEqual(record.contigs[0].reads[4].rd.read_tags, 0)
01508         center = len(record.contigs[0].reads[4].rd.sequence)//2
01509         self.assertEqual(record.contigs[0].reads[4].rd.sequence[:10], "gaggatcgct")
01510         self.assertEqual(record.contigs[0].reads[4].rd.sequence[center-5:center+5], "GTgcgaggat")
01511         self.assertEqual(record.contigs[0].reads[4].rd.sequence[-10:], "caggcagatg")
01512         self.assertEqual(record.contigs[0].reads[4].qa.qual_clipping_start, 11)
01513         self.assertEqual(record.contigs[0].reads[4].qa.qual_clipping_end, 373)
01514         self.assertEqual(record.contigs[0].reads[4].qa.align_clipping_start, 11)
01515         self.assertEqual(record.contigs[0].reads[4].qa.align_clipping_end, 476)
01516         self.assertEqual(record.contigs[0].reads[4].ds.chromat_file, "K26-291s")
01517         self.assertEqual(record.contigs[0].reads[4].ds.phd_file, "K26-291s.phd.1")
01518         self.assertEqual(record.contigs[0].reads[4].ds.time, "Thu Sep 12 15:42:31 1996")
01519         self.assertEqual(record.contigs[0].reads[4].ds.chem, "")
01520         self.assertEqual(record.contigs[0].reads[4].ds.dye, "")
01521         self.assertEqual(record.contigs[0].reads[4].ds.template, "")
01522         self.assertEqual(record.contigs[0].reads[4].ds.direction, "")
01523         self.assertEqual(record.contigs[0].reads[4].rt, None)
01524         self.assertEqual(record.contigs[0].reads[4].wr, None)
01525 
01526         self.assertEqual(record.contigs[0].reads[5].rd.name, "K26-822c")
01527         self.assertEqual(record.contigs[0].reads[5].rd.padded_bases, 593)
01528         self.assertEqual(record.contigs[0].reads[5].rd.info_items, 0)
01529         self.assertEqual(record.contigs[0].reads[5].rd.read_tags, 0)
01530         center = len(record.contigs[0].reads[5].rd.sequence)//2
01531         self.assertEqual(record.contigs[0].reads[5].rd.sequence[:10], "ggggatccg*")
01532         self.assertEqual(record.contigs[0].reads[5].rd.sequence[center-5:center+5], "GCaAgacCCt")
01533         self.assertEqual(record.contigs[0].reads[5].rd.sequence[-10:], "gttgggtttg")
01534 
01535         self.assertEqual(record.contigs[0].reads[5].qa.qual_clipping_start, 25)
01536         self.assertEqual(record.contigs[0].reads[5].qa.qual_clipping_end, 333)
01537         self.assertEqual(record.contigs[0].reads[5].qa.align_clipping_start, 16)
01538         self.assertEqual(record.contigs[0].reads[5].qa.align_clipping_end, 593)
01539         self.assertEqual(record.contigs[0].reads[5].ds.chromat_file, "K26-822c")
01540         self.assertEqual(record.contigs[0].reads[5].ds.phd_file, "K26-822c.phd.1")
01541         self.assertEqual(record.contigs[0].reads[5].ds.time, "Thu Sep 12 15:42:36 1996")
01542         self.assertEqual(record.contigs[0].reads[5].ds.chem, "")
01543         self.assertEqual(record.contigs[0].reads[5].ds.dye, "")
01544         self.assertEqual(record.contigs[0].reads[5].ds.template, "")
01545         self.assertEqual(record.contigs[0].reads[5].ds.direction, "")
01546         self.assertEqual(record.contigs[0].reads[5].rt, None)
01547         self.assertEqual(record.contigs[0].reads[5].wr, None)
01548 
01549         self.assertEqual(record.contigs[0].reads[6].rd.name, "K26-572c")
01550         self.assertEqual(record.contigs[0].reads[6].rd.padded_bases, 594)
01551         self.assertEqual(record.contigs[0].reads[6].rd.info_items, 0)
01552         self.assertEqual(record.contigs[0].reads[6].rd.read_tags, 0)
01553         center = len(record.contigs[0].reads[6].rd.sequence)//2
01554         self.assertEqual(record.contigs[0].reads[6].rd.sequence[:10], "agccccgggc")
01555         self.assertEqual(record.contigs[0].reads[6].rd.sequence[center-5:center+5], "ggatcACATA")
01556         self.assertEqual(record.contigs[0].reads[6].rd.sequence[-10:], "aatagtaaca")
01557         self.assertEqual(record.contigs[0].reads[6].qa.qual_clipping_start, 249)
01558         self.assertEqual(record.contigs[0].reads[6].qa.qual_clipping_end, 584)
01559         self.assertEqual(record.contigs[0].reads[6].qa.align_clipping_start, 1)
01560         self.assertEqual(record.contigs[0].reads[6].qa.align_clipping_end, 586)
01561         self.assertEqual(record.contigs[0].reads[6].ds.chromat_file, "K26-572c")
01562         self.assertEqual(record.contigs[0].reads[6].ds.phd_file, "K26-572c.phd.1")
01563         self.assertEqual(record.contigs[0].reads[6].ds.time, "Thu Sep 12 15:42:34 1996")
01564         self.assertEqual(record.contigs[0].reads[6].ds.chem, "")
01565         self.assertEqual(record.contigs[0].reads[6].ds.dye, "")
01566         self.assertEqual(record.contigs[0].reads[6].ds.template, "")
01567         self.assertEqual(record.contigs[0].reads[6].ds.direction, "")
01568         self.assertEqual(record.contigs[0].reads[6].rt, None)
01569         self.assertEqual(record.contigs[0].reads[6].wr, None)
01570 
01571         self.assertEqual(record.contigs[0].reads[7].rd.name, "K26-766c")
01572         self.assertEqual(record.contigs[0].reads[7].rd.padded_bases, 603)
01573         self.assertEqual(record.contigs[0].reads[7].rd.info_items, 0)
01574         self.assertEqual(record.contigs[0].reads[7].rd.read_tags, 0)
01575         center = len(record.contigs[0].reads[7].rd.sequence)//2
01576         self.assertEqual(record.contigs[0].reads[7].rd.sequence[:10], "gaataattgg")
01577         self.assertEqual(record.contigs[0].reads[7].rd.sequence[center-5:center+5], "TggCCCATCT")
01578         self.assertEqual(record.contigs[0].reads[7].rd.sequence[-10:], "gaaccacacg")
01579         self.assertEqual(record.contigs[0].reads[7].qa.qual_clipping_start, 240)
01580         self.assertEqual(record.contigs[0].reads[7].qa.qual_clipping_end, 584)
01581         self.assertEqual(record.contigs[0].reads[7].qa.align_clipping_start, 126)
01582         self.assertEqual(record.contigs[0].reads[7].qa.align_clipping_end, 583)
01583         self.assertEqual(record.contigs[0].reads[7].ds.chromat_file, "K26-766c")
01584         self.assertEqual(record.contigs[0].reads[7].ds.phd_file, "K26-766c.phd.1")
01585         self.assertEqual(record.contigs[0].reads[7].ds.time, "Thu Sep 12 15:42:35 1996")
01586         self.assertEqual(record.contigs[0].reads[7].ds.chem, "")
01587         self.assertEqual(record.contigs[0].reads[7].ds.dye, "")
01588         self.assertEqual(record.contigs[0].reads[7].ds.template, "")
01589         self.assertEqual(record.contigs[0].reads[7].ds.direction, "")
01590         self.assertEqual(record.contigs[0].reads[7].rt, None)
01591         self.assertEqual(record.contigs[0].reads[7].wr, None)
 
Test to check that record parser parses each contig into a record.

Definition at line 1592 of file test_Ace.py.

01592 
01593     def test_check_record_parser(self):
01594         """Test to check that record parser parses each contig into a record."""
01595         contigs=Ace.parse(self.handle)
01596 
01597         # First (and only) contig
01598         contig = contigs.next()
01599 
01600         self.assertEqual(len(contig.reads), 8)
01601         self.assertEqual(contig.name, "Contig1")
01602         self.assertEqual(contig.nbases, 1475)
01603         self.assertEqual(contig.nreads, 8)
01604         self.assertEqual(contig.nsegments, 156)
01605         self.assertEqual(contig.uorc, "U")
01606         center = len(contig.sequence)//2
01607         self.assertEqual(contig.sequence[:10], "agccccgggc")
01608         self.assertEqual(contig.sequence[center-5:center+5], "CTTCCCCAGG")
01609         self.assertEqual(contig.sequence[-10:], "gttgggtttg")
01610         center = len(contig.quality)//2
01611         self.assertEqual(contig.quality[:10], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0])
01612         self.assertEqual(contig.quality[center-5:center+5], [90, 90, 90, 90, 90, 90, 90, 90, 89, 89])
01613         self.assertEqual(contig.quality[-10:], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0])
01614         self.assertEqual(len(contig.af), 8)
01615         self.assertEqual(len(contig.bs), 156)
01616         self.assertEqual(contig.af[4].name, "K26-291s")
01617         self.assertEqual(contig.af[4].coru, "U")
01618         self.assertEqual(contig.af[4].padded_start, 828)
01619         self.assertEqual(contig.af[7].name, "K26-766c")
01620         self.assertEqual(contig.af[7].coru, "C")
01621         self.assertEqual(contig.af[7].padded_start, 408)
01622         self.assertEqual(contig.bs[78].name, "K26-394c")
01623         self.assertEqual(contig.bs[78].padded_start, 987)
01624         self.assertEqual(contig.bs[78].padded_end, 987)
01625         self.assertEqual(contig.bs[155].name, "K26-822c")
01626         self.assertEqual(contig.bs[155].padded_start, 1303)
01627         self.assertEqual(contig.bs[155].padded_end, 1475)
01628         self.assertEqual(len(contig.ct), 3)
01629         self.assertEqual(contig.ct[0].name, "Contig1")
01630         self.assertEqual(contig.ct[0].tag_type, "repeat")
01631         self.assertEqual(contig.ct[0].program, "consed")
01632         self.assertEqual(contig.ct[0].padded_start, 976)
01633         self.assertEqual(contig.ct[0].padded_end, 986)
01634         self.assertEqual(contig.ct[0].date, "971218:180623")
01635         self.assertEqual(contig.ct[0].info, [])
01636         self.assertEqual(contig.ct[1].name, "Contig1")
01637         self.assertEqual(contig.ct[1].tag_type, "comment")
01638         self.assertEqual(contig.ct[1].program, "consed")
01639         self.assertEqual(contig.ct[1].padded_start, 996)
01640         self.assertEqual(contig.ct[1].padded_end, 1007)
01641         self.assertEqual(contig.ct[1].date, "971218:180623")
01642         self.assertEqual(contig.ct[1].info, ['This is line 1 of a comment', 'There may be any number of lines'])
01643         self.assertEqual(contig.ct[2].name, "Contig1")
01644         self.assertEqual(contig.ct[2].tag_type, "oligo")
01645         self.assertEqual(contig.ct[2].program, "consed")
01646         self.assertEqual(contig.ct[2].padded_start, 963)
01647         self.assertEqual(contig.ct[2].padded_end, 987)
01648         self.assertEqual(contig.ct[2].date, "971218:180623")
01649         self.assertEqual(contig.ct[2].info, ['standard.1 acataagacattctaaatttttact 50 U', 'seq from clone'])
01650         self.assertEqual(len(contig.wa), 1)
01651         self.assertEqual(contig.wa[0].tag_type, "phrap_params")
01652         self.assertEqual(contig.wa[0].program, "phrap")
01653         self.assertEqual(contig.wa[0].date, "990621:161947")
01654         self.assertEqual(contig.wa[0].info, ['/usr/local/genome/bin/phrap standard.fasta.screen -new_ace -view', 'phrap version 0.990319'])
01655 
01656         self.assertEqual(len(contig.reads), 8)
01657 
01658         self.assertEqual(contig.reads[0].rd.name, "K26-217c")
01659         self.assertEqual(contig.reads[0].rd.padded_bases, 563)
01660         self.assertEqual(contig.reads[0].rd.info_items, 0)
01661         self.assertEqual(contig.reads[0].rd.read_tags, 0)
01662         center = len(contig.reads[0].rd.sequence)//2
01663         self.assertEqual(contig.reads[0].rd.sequence[:10], "tcccCgtgag")
01664         self.assertEqual(contig.reads[0].rd.sequence[center-5:center+5], "CTCCTGcctg")
01665         self.assertEqual(contig.reads[0].rd.sequence[-10:], "ggcccccctc")
01666         self.assertEqual(contig.reads[0].qa.qual_clipping_start, 19)
01667         self.assertEqual(contig.reads[0].qa.qual_clipping_end, 349)
01668         self.assertEqual(contig.reads[0].qa.align_clipping_start, 19)
01669         self.assertEqual(contig.reads[0].qa.align_clipping_end, 424)
01670         self.assertEqual(contig.reads[0].ds.chromat_file, "K26-217c")
01671         self.assertEqual(contig.reads[0].ds.phd_file, "K26-217c.phd.1")
01672         self.assertEqual(contig.reads[0].ds.time, "Thu Sep 12 15:42:38 1996")
01673         self.assertEqual(contig.reads[0].ds.chem, "")
01674         self.assertEqual(contig.reads[0].ds.dye, "")
01675         self.assertEqual(contig.reads[0].ds.template, "")
01676         self.assertEqual(contig.reads[0].ds.direction, "")
01677         self.assertEqual(contig.reads[0].rt, None)
01678         self.assertEqual(contig.reads[0].wr, None)
01679 
01680         self.assertEqual(contig.reads[1].rd.name, "K26-526t")
01681         self.assertEqual(contig.reads[1].rd.padded_bases, 687)
01682         self.assertEqual(contig.reads[1].rd.info_items, 0)
01683         self.assertEqual(contig.reads[1].rd.read_tags, 0)
01684         center = len(contig.reads[1].rd.sequence)//2
01685         self.assertEqual(contig.reads[1].rd.sequence[:10], "ccgtcctgag")
01686         self.assertEqual(contig.reads[1].rd.sequence[center-5:center+5], "cacagcccT*")
01687         self.assertEqual(contig.reads[1].rd.sequence[-10:], "Ttttgtttta")
01688         self.assertEqual(contig.reads[1].qa.qual_clipping_start, 12)
01689         self.assertEqual(contig.reads[1].qa.qual_clipping_end, 353)
01690         self.assertEqual(contig.reads[1].qa.align_clipping_start, 9)
01691         self.assertEqual(contig.reads[1].qa.align_clipping_end, 572)
01692         self.assertEqual(contig.reads[1].ds.chromat_file, "K26-526t")
01693         self.assertEqual(contig.reads[1].ds.phd_file, "K26-526t.phd.1")
01694         self.assertEqual(contig.reads[1].ds.time, "Thu Sep 12 15:42:33 1996")
01695         self.assertEqual(contig.reads[1].ds.chem, "")
01696         self.assertEqual(contig.reads[1].ds.dye, "")
01697         self.assertEqual(contig.reads[1].ds.template, "")
01698         self.assertEqual(contig.reads[1].ds.direction, "")
01699         self.assertEqual(contig.reads[1].rt, None)
01700         self.assertEqual(contig.reads[1].wr, None)
01701 
01702         self.assertEqual(contig.reads[2].rd.name, "K26-961c")
01703         self.assertEqual(contig.reads[2].rd.padded_bases, 517)
01704         self.assertEqual(contig.reads[2].rd.info_items, 0)
01705         self.assertEqual(contig.reads[2].rd.read_tags, 0)
01706         center = len(contig.reads[2].rd.sequence)//2
01707         self.assertEqual(contig.reads[2].rd.sequence[:10], "aatattaccg")
01708         self.assertEqual(contig.reads[2].rd.sequence[center-5:center+5], "CAGATGGGTT")
01709         self.assertEqual(contig.reads[2].rd.sequence[-10:], "ctattcaggg")
01710         self.assertEqual(contig.reads[2].qa.qual_clipping_start, 20)
01711         self.assertEqual(contig.reads[2].qa.qual_clipping_end, 415)
01712         self.assertEqual(contig.reads[2].qa.align_clipping_start, 26)
01713         self.assertEqual(contig.reads[2].qa.align_clipping_end, 514)
01714         self.assertEqual(contig.reads[2].ds.chromat_file, "K26-961c")
01715         self.assertEqual(contig.reads[2].ds.phd_file, "K26-961c.phd.1")
01716         self.assertEqual(contig.reads[2].ds.time, "Thu Sep 12 15:42:37 1996")
01717         self.assertEqual(contig.reads[2].ds.chem, "")
01718         self.assertEqual(contig.reads[2].ds.dye, "")
01719         self.assertEqual(contig.reads[2].ds.template, "")
01720         self.assertEqual(contig.reads[2].ds.direction, "")
01721         self.assertEqual(contig.reads[2].rt, None)
01722         self.assertEqual(contig.reads[2].wr, None)
01723 
01724         self.assertEqual(contig.reads[3].rd.name, "K26-394c")
01725         self.assertEqual(contig.reads[3].rd.padded_bases, 628)
01726         self.assertEqual(contig.reads[3].rd.info_items, 0)
01727         self.assertEqual(contig.reads[3].rd.read_tags, 0)
01728         center = len(contig.reads[3].rd.sequence)//2
01729         self.assertEqual(contig.reads[3].rd.sequence[:10], "ctgcgtatcg")
01730         self.assertEqual(contig.reads[3].rd.sequence[center-5:center+5], "AGGATTGCTT")
01731         self.assertEqual(contig.reads[3].rd.sequence[-10:], "aaccctgggt")
01732         self.assertEqual(contig.reads[3].qa.qual_clipping_start, 18)
01733         self.assertEqual(contig.reads[3].qa.qual_clipping_end, 368)
01734         self.assertEqual(contig.reads[3].qa.align_clipping_start, 11)
01735         self.assertEqual(contig.reads[3].qa.align_clipping_end, 502)
01736         self.assertEqual(contig.reads[3].ds.chromat_file, "K26-394c")
01737         self.assertEqual(contig.reads[3].ds.phd_file, "K26-394c.phd.1")
01738         self.assertEqual(contig.reads[3].ds.time, "Thu Sep 12 15:42:32 1996")
01739         self.assertEqual(contig.reads[3].ds.chem, "")
01740         self.assertEqual(contig.reads[3].ds.dye, "")
01741         self.assertEqual(contig.reads[3].ds.template, "")
01742         self.assertEqual(contig.reads[3].ds.direction, "")
01743         self.assertEqual(contig.reads[3].rt, None)
01744         self.assertEqual(contig.reads[3].wr, None)
01745 
01746         self.assertEqual(contig.reads[4].rd.name, "K26-291s")
01747         self.assertEqual(contig.reads[4].rd.padded_bases, 556)
01748         self.assertEqual(contig.reads[4].rd.info_items, 0)
01749         self.assertEqual(contig.reads[4].rd.read_tags, 0)
01750         center = len(contig.reads[4].rd.sequence)//2
01751         self.assertEqual(contig.reads[4].rd.sequence[:10], "gaggatcgct")
01752         self.assertEqual(contig.reads[4].rd.sequence[center-5:center+5], "GTgcgaggat")
01753         self.assertEqual(contig.reads[4].rd.sequence[-10:], "caggcagatg")
01754         self.assertEqual(contig.reads[4].qa.qual_clipping_start, 11)
01755         self.assertEqual(contig.reads[4].qa.qual_clipping_end, 373)
01756         self.assertEqual(contig.reads[4].qa.align_clipping_start, 11)
01757         self.assertEqual(contig.reads[4].qa.align_clipping_end, 476)
01758         self.assertEqual(contig.reads[4].ds.chromat_file, "K26-291s")
01759         self.assertEqual(contig.reads[4].ds.phd_file, "K26-291s.phd.1")
01760         self.assertEqual(contig.reads[4].ds.time, "Thu Sep 12 15:42:31 1996")
01761         self.assertEqual(contig.reads[4].ds.chem, "")
01762         self.assertEqual(contig.reads[4].ds.dye, "")
01763         self.assertEqual(contig.reads[4].ds.template, "")
01764         self.assertEqual(contig.reads[4].ds.direction, "")
01765         self.assertEqual(contig.reads[4].rt, None)
01766         self.assertEqual(contig.reads[4].wr, None)
01767 
01768         self.assertEqual(contig.reads[5].rd.name, "K26-822c")
01769         self.assertEqual(contig.reads[5].rd.padded_bases, 593)
01770         self.assertEqual(contig.reads[5].rd.info_items, 0)
01771         self.assertEqual(contig.reads[5].rd.read_tags, 0)
01772         center = len(contig.reads[5].rd.sequence)//2
01773         self.assertEqual(contig.reads[5].rd.sequence[:10], "ggggatccg*")
01774         self.assertEqual(contig.reads[5].rd.sequence[center-5:center+5], "GCaAgacCCt")
01775         self.assertEqual(contig.reads[5].rd.sequence[-10:], "gttgggtttg")
01776 
01777         self.assertEqual(contig.reads[5].qa.qual_clipping_start, 25)
01778         self.assertEqual(contig.reads[5].qa.qual_clipping_end, 333)
01779         self.assertEqual(contig.reads[5].qa.align_clipping_start, 16)
01780         self.assertEqual(contig.reads[5].qa.align_clipping_end, 593)
01781         self.assertEqual(contig.reads[5].ds.chromat_file, "K26-822c")
01782         self.assertEqual(contig.reads[5].ds.phd_file, "K26-822c.phd.1")
01783         self.assertEqual(contig.reads[5].ds.time, "Thu Sep 12 15:42:36 1996")
01784         self.assertEqual(contig.reads[5].ds.chem, "")
01785         self.assertEqual(contig.reads[5].ds.dye, "")
01786         self.assertEqual(contig.reads[5].ds.template, "")
01787         self.assertEqual(contig.reads[5].ds.direction, "")
01788         self.assertEqual(contig.reads[5].rt, None)
01789         self.assertEqual(contig.reads[5].wr, None)
01790 
01791         self.assertEqual(contig.reads[6].rd.name, "K26-572c")
01792         self.assertEqual(contig.reads[6].rd.padded_bases, 594)
01793         self.assertEqual(contig.reads[6].rd.info_items, 0)
01794         self.assertEqual(contig.reads[6].rd.read_tags, 0)
01795         center = len(contig.reads[6].rd.sequence)//2
01796         self.assertEqual(contig.reads[6].rd.sequence[:10], "agccccgggc")
01797         self.assertEqual(contig.reads[6].rd.sequence[center-5:center+5], "ggatcACATA")
01798         self.assertEqual(contig.reads[6].rd.sequence[-10:], "aatagtaaca")
01799         self.assertEqual(contig.reads[6].qa.qual_clipping_start, 249)
01800         self.assertEqual(contig.reads[6].qa.qual_clipping_end, 584)
01801         self.assertEqual(contig.reads[6].qa.align_clipping_start, 1)
01802         self.assertEqual(contig.reads[6].qa.align_clipping_end, 586)
01803         self.assertEqual(contig.reads[6].ds.chromat_file, "K26-572c")
01804         self.assertEqual(contig.reads[6].ds.phd_file, "K26-572c.phd.1")
01805         self.assertEqual(contig.reads[6].ds.time, "Thu Sep 12 15:42:34 1996")
01806         self.assertEqual(contig.reads[6].ds.chem, "")
01807         self.assertEqual(contig.reads[6].ds.dye, "")
01808         self.assertEqual(contig.reads[6].ds.template, "")
01809         self.assertEqual(contig.reads[6].ds.direction, "")
01810         self.assertEqual(contig.reads[6].rt, None)
01811         self.assertEqual(contig.reads[6].wr, None)
01812 
01813         self.assertEqual(contig.reads[7].rd.name, "K26-766c")
01814         self.assertEqual(contig.reads[7].rd.padded_bases, 603)
01815         self.assertEqual(contig.reads[7].rd.info_items, 0)
01816         self.assertEqual(contig.reads[7].rd.read_tags, 0)
01817         center = len(contig.reads[7].rd.sequence)//2
01818         self.assertEqual(contig.reads[7].rd.sequence[:10], "gaataattgg")
01819         self.assertEqual(contig.reads[7].rd.sequence[center-5:center+5], "TggCCCATCT")
01820         self.assertEqual(contig.reads[7].rd.sequence[-10:], "gaaccacacg")
01821         self.assertEqual(contig.reads[7].qa.qual_clipping_start, 240)
01822         self.assertEqual(contig.reads[7].qa.qual_clipping_end, 584)
01823         self.assertEqual(contig.reads[7].qa.align_clipping_start, 126)
01824         self.assertEqual(contig.reads[7].qa.align_clipping_end, 583)
01825         self.assertEqual(contig.reads[7].ds.chromat_file, "K26-766c")
01826         self.assertEqual(contig.reads[7].ds.phd_file, "K26-766c.phd.1")
01827         self.assertEqual(contig.reads[7].ds.time, "Thu Sep 12 15:42:35 1996")
01828         self.assertEqual(contig.reads[7].ds.chem, "")
01829         self.assertEqual(contig.reads[7].ds.dye, "")
01830         self.assertEqual(contig.reads[7].ds.template, "")
01831         self.assertEqual(contig.reads[7].ds.direction, "")
01832         self.assertEqual(contig.reads[7].rt, None)
01833         self.assertEqual(contig.reads[7].wr, None)
01834 
01835         # Make sure there are no more contigs
01836         self.assertRaises(StopIteration, contigs.next)
01837 


Member Data Documentation

Definition at line 1343 of file test_Ace.py.


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