Back to index

python-biopython  1.60
test_NCBIXML.py
Go to the documentation of this file.
00001 # Copyright 2005 by Michiel de Hoon.  All rights reserved.
00002 # This code is part of the Biopython distribution and governed by its
00003 # license.  Please see the LICENSE file that should have been included
00004 # as part of this package.
00005 
00006 import os
00007 import unittest
00008 from Bio.Blast import NCBIXML
00009 
00010 E_VALUE_THRESH = 1e-10
00011 
00012 class TestNCBIXML(unittest.TestCase):
00013 
00014     def test_xbt001(self):
00015         "Parsing BLASTP 2.2.12, gi|49176427|ref|NP_418280.3| (xbt001)"
00016 
00017         filename = 'xbt001.xml'
00018         datafile = os.path.join("Blast", filename)
00019         handle = open(datafile)
00020         records = NCBIXML.parse(handle)
00021         record = records.next()
00022 
00023         alignments = record.alignments
00024         self.assertEqual(len(alignments), 212)
00025         self.assertEqual(record.query_id, "gi|49176427|ref|NP_418280.3|")
00026         self.assertEqual(sum([len(a.hsps) for a in alignments]), 212)
00027 
00028         alignment = alignments[0]
00029         self.assertEqual(alignment.title[:50], "gi|49176427|ref|NP_418280.3| component of Sec-inde")
00030         self.assertEqual(alignment.length, 103)
00031         self.assertEqual(len(alignment.hsps), 1)
00032         hsp = alignment.hsps[0]
00033         self.assertTrue(hsp.expect, 4.20576e-46)
00034         self.assertEqual(hsp.query[:75], "MRLCLIIIYHRGTCMGGISIWQXXXXXXXXXXXFGTKKLGSIGSDLGASIKGFKKAMSDDEPKQDKTSQDADFTA")
00035         self.assertEqual(hsp.match[:75], "MRLCLIIIYHRGTCMGGISIWQLLIIAVIVVLLFGTKKLGSIGSDLGASIKGFKKAMSDDEPKQDKTSQDADFTA")
00036         self.assertEqual(hsp.sbjct[:75], "MRLCLIIIYHRGTCMGGISIWQLLIIAVIVVLLFGTKKLGSIGSDLGASIKGFKKAMSDDEPKQDKTSQDADFTA")
00037 
00038         alignment = alignments[1]
00039         self.assertEqual(alignment.title[:50], "gi|15804428|ref|NP_290468.1| twin arginine translo")
00040         self.assertEqual(alignment.length, 103)
00041         self.assertEqual(len(alignment.hsps), 1)
00042         hsp = alignment.hsps[0]
00043         self.assertTrue(hsp.expect, 2.72609e-45)
00044         self.assertEqual(hsp.query[:75], "MRLCLIIIYHRGTCMGGISIWQXXXXXXXXXXXFGTKKLGSIGSDLGASIKGFKKAMSDDEPKQDKTSQDADFTA")
00045         self.assertEqual(hsp.match[:75], "MRLCLIIIYHR TCMGGISIWQLLIIAVIVVLLFGTKKLGSIGSDLGASIKGFKKAMSDDEPKQDKTSQDADFTA")
00046         self.assertEqual(hsp.sbjct[:75], "MRLCLIIIYHRXTCMGGISIWQLLIIAVIVVLLFGTKKLGSIGSDLGASIKGFKKAMSDDEPKQDKTSQDADFTA")
00047 
00048         alignment = alignments[2]
00049         self.assertEqual(alignment.title[:50], "gi|74314349|ref|YP_312768.1| hypothetical protein ")
00050         self.assertEqual(alignment.length, 103)
00051         self.assertEqual(len(alignment.hsps), 1)
00052         hsp = alignment.hsps[0]
00053         self.assertTrue(hsp.expect, 2.72609e-45)
00054         self.assertEqual(hsp.query[:75], "MRLCLIIIYHRGTCMGGISIWQXXXXXXXXXXXFGTKKLGSIGSDLGASIKGFKKAMSDDEPKQDKTSQDADFTA")
00055         self.assertEqual(hsp.match[:75], "MR CLIIIYHRGTCMGGISIWQLLIIAVIVVLLFGTKKLGSIGSDLGASIKGFKKAMSDDEPKQDKTSQDADFTA")
00056         self.assertEqual(hsp.sbjct[:75], "MRPCLIIIYHRGTCMGGISIWQLLIIAVIVVLLFGTKKLGSIGSDLGASIKGFKKAMSDDEPKQDKTSQDADFTA")
00057 
00058         alignment = alignments[3]
00059         self.assertEqual(alignment.title[:50], "gi|75256240|ref|ZP_00727918.1| COG1826: Sec-indepe")
00060         self.assertEqual(alignment.length, 89)
00061         self.assertEqual(len(alignment.hsps), 1)
00062         hsp = alignment.hsps[0]
00063         self.assertTrue(hsp.expect, 6.0872e-37)
00064         self.assertEqual(hsp.query[:75], "MGGISIWQXXXXXXXXXXXFGTKKLGSIGSDLGASIKGFKKAMSDDEPKQDKTSQDADFTAKTIADKQADTNQEQ")
00065         self.assertEqual(hsp.match[:75], "MGGISIWQLLIIAVIVVLLFGTKKLGSIGSDLGASIKGFKKAMSDDEPKQDKTSQDADFTAKTIADKQADTNQEQ")
00066         self.assertEqual(hsp.sbjct[:75], "MGGISIWQLLIIAVIVVLLFGTKKLGSIGSDLGASIKGFKKAMSDDEPKQDKTSQDADFTAKTIADKQADTNQEQ")
00067 
00068         alignment = alignments[4]
00069         self.assertEqual(alignment.title[:50], "gi|148236|gb|AAA67633.1| o261 [Escherichia coli]")
00070         self.assertEqual(alignment.length, 261)
00071         self.assertEqual(len(alignment.hsps), 1)
00072         hsp = alignment.hsps[0]
00073         self.assertTrue(hsp.expect, 6.74582e-28)
00074         self.assertEqual(hsp.query[:75], "FGTKKLGSIGSDLGASIKGFKKAMSDDEPKQDKTSQDADFTAKTIADKQADTNQEQAKTEDA")
00075         self.assertEqual(hsp.match[:75], "FGTKKLGSIGSDLGASIKGFKKAMSDDEPKQDKTSQDADFTAKTIADKQADTNQEQAKTEDA")
00076         self.assertEqual(hsp.sbjct[:75], "FGTKKLGSIGSDLGASIKGFKKAMSDDEPKQDKTSQDADFTAKTIADKQADTNQEQAKTEDA")
00077 
00078         alignment = alignments[5]
00079         self.assertEqual(alignment.title[:50], "gi|29143650|ref|NP_806992.1| sec-independent prote")
00080         self.assertEqual(alignment.length, 84)
00081         self.assertEqual(len(alignment.hsps), 1)
00082         hsp = alignment.hsps[0]
00083         self.assertTrue(hsp.expect, 4.37251e-27)
00084         self.assertEqual(hsp.query[:75], "MGGISIWQXXXXXXXXXXXFGTKKLGSIGSDLGASIKGFKKAMSDDEPKQDKTSQDADFTAKTIADKQADTNQEQ")
00085         self.assertEqual(hsp.match[:75], "MGGISIWQLLI+AVIVVLLFGTKKLGSIGSDLGASIKGFKKAMSDD+ KQDKTSQDADFTAK+IADKQ      +")
00086         self.assertEqual(hsp.sbjct[:75], "MGGISIWQLLIVAVIVVLLFGTKKLGSIGSDLGASIKGFKKAMSDDDAKQDKTSQDADFTAKSIADKQG-----E")
00087 
00088         alignment = alignments[6]
00089         self.assertEqual(alignment.title[:50], "gi|49609685|emb|CAG73118.1| sec-independent protei")
00090         self.assertEqual(alignment.length, 86)
00091         self.assertEqual(len(alignment.hsps), 1)
00092         hsp = alignment.hsps[0]
00093         self.assertTrue(hsp.expect, 4.10205e-17)
00094         self.assertEqual(hsp.query[:75], "MGGISIWQXXXXXXXXXXXFGTKKLGSIGSDLGASIKGFKKAMSDDEP--KQDKTSQDADFTAKTIADKQADTNQ")
00095         self.assertEqual(hsp.match[:75], "MGGIS+W LLIIAVIV+LLFGT KL ++GSDLGASIKGFKKAM DD+P    DK   DADF+ K+IAD Q+D   ")
00096         self.assertEqual(hsp.sbjct[:75], "MGGISLWNLLIIAVIVILLFGTNKLRTLGSDLGASIKGFKKAMGDDQPSTNADKAQPDADFSTKSIADNQSD---")
00097 
00098         alignment = alignments[7]
00099         self.assertEqual(alignment.title[:50], "gi|37528238|ref|NP_931583.1| Sec-independent prote")
00100         self.assertEqual(alignment.length, 86)
00101         self.assertEqual(len(alignment.hsps), 1)
00102         hsp = alignment.hsps[0]
00103         self.assertTrue(hsp.expect, 2.25087e-15)
00104         self.assertEqual(hsp.query[:75], "MGGISIWQXXXXXXXXXXXFGTKKLGSIGSDLGASIKGFKKAMSDD-EPKQ-DKTSQDADFTAKTIADKQADTNQ")
00105         self.assertEqual(hsp.match[:75], "MGGISIWQLLIIAVIVVLLFGT KL ++GSDLGASIKGFKKA+ DD +P+Q  KTS DADF  K I +KQ+    ")
00106         self.assertEqual(hsp.sbjct[:75], "MGGISIWQLLIIAVIVVLLFGTNKLRTLGSDLGASIKGFKKAIGDDNQPQQAQKTSSDADFETKNITEKQS----")
00107 
00108         alignment = alignments[8]
00109         self.assertEqual(alignment.title[:50], "gi|59710656|ref|YP_203432.1| Sec-independent prote")
00110         self.assertEqual(alignment.length, 82)
00111         self.assertEqual(len(alignment.hsps), 1)
00112         hsp = alignment.hsps[0]
00113         self.assertTrue(hsp.expect, 5.01441e-15)
00114         self.assertEqual(hsp.query[:75], "MGGISIWQXXXXXXXXXXXFGTKKLGSIGSDLGASIKGFKKAMSDDEPKQDKTSQDADFTAKTIADKQADTNQEQ")
00115         self.assertEqual(hsp.match[:75], "MGGISIWQLLIIAVI+VLLFGTKKL  +GSDLG+++KGFKKA+S+DEP ++   +DADF  + +  K+A+T ++Q")
00116         self.assertEqual(hsp.sbjct[:75], "MGGISIWQLLIIAVIIVLLFGTKKLRGVGSDLGSAVKGFKKAISEDEPAKE-AKKDADFVPQNLEKKEAETVEKQ")
00117 
00118         alignment = alignments[9]
00119         self.assertEqual(alignment.title[:50], "gi|54307340|ref|YP_128360.1| putative TatA protein")
00120         self.assertEqual(alignment.length, 87)
00121         self.assertEqual(len(alignment.hsps), 1)
00122         hsp = alignment.hsps[0]
00123         self.assertTrue(hsp.expect, 7.2408e-14)
00124         self.assertEqual(hsp.query[:75], "MGGISIWQXXXXXXXXXXXFGTKKLGSIGSDLGASIKGFKKAMSDDE--PKQDKTSQDADFTAKTIADKQADTNQ")
00125         self.assertEqual(hsp.match[:75], "MGGISIWQLLIIA+I+VLLFGTKKL S+G DLG+++KGFKKA+ D+E   K+D T  DADF  KT++ ++  +  ")
00126         self.assertEqual(hsp.sbjct[:75], "MGGISIWQLLIIALIIVLLFGTKKLRSLGGDLGSAVKGFKKAIGDEELTVKKDNTEADADFEQKTLSKEEQQSED")
00127 
00128         alignment = alignments[10]
00129         self.assertEqual(alignment.title[:50], "gi|45437890|gb|AAS63439.1| Sec-independent protein")
00130         self.assertEqual(alignment.length, 88)
00131         self.assertEqual(len(alignment.hsps), 1)
00132         hsp = alignment.hsps[0]
00133         self.assertTrue(hsp.expect, 1.61308e-13)
00134         self.assertEqual(hsp.query[:75], "MGGISIWQXXXXXXXXXXXFGTKKLGSIGSDLGASIKGFKKAMSDDE----PKQDKTSQDADFTAKTIADKQADT")
00135         self.assertEqual(hsp.match[:75], "MG I   QLLIIAVIVVLLFGT KL ++GSDLGASIKGFKKAM DD        DKTS DADF AK+I +KQ   ")
00136         self.assertEqual(hsp.sbjct[:75], "MGSIGWAQLLIIAVIVVLLFGTNKLRTLGSDLGASIKGFKKAMGDDSQTPPTNVDKTSNDADF-AKSITEKQ---")
00137 
00138         alignment = alignments[11]
00139         self.assertEqual(alignment.title[:50], "gi|75856473|ref|ZP_00764101.1| COG1826: Sec-indepe")
00140         self.assertEqual(alignment.length, 81)
00141         self.assertEqual(len(alignment.hsps), 1)
00142         hsp = alignment.hsps[0]
00143         self.assertTrue(hsp.expect, 2.10675e-13)
00144         self.assertEqual(hsp.query[:75], "MGGISIWQXXXXXXXXXXXFGTKKLGSIGSDLGASIKGFKKAMSDDEPKQDKTSQDADFTAKTIADKQADTNQEQ")
00145         self.assertEqual(hsp.match[:75], "MGGIS+WQLLIIAVIVVLLFGTKKL  IG DLG ++KGFKKAMS+DEP   K  +DADF  K++ ++Q    +++")
00146         self.assertEqual(hsp.sbjct[:75], "MGGISVWQLLIIAVIVVLLFGTKKLRGIGGDLGGAVKGFKKAMSEDEPA--KNDKDADFEPKSLEEQQ----KKE")
00147 
00148         alignment = alignments[12]
00149         self.assertEqual(alignment.title[:50], "gi|75829371|ref|ZP_00758676.1| COG1826: Sec-indepe")
00150         self.assertEqual(alignment.length, 82)
00151         self.assertEqual(len(alignment.hsps), 1)
00152         hsp = alignment.hsps[0]
00153         self.assertTrue(hsp.expect, 2.7515e-13)
00154         self.assertEqual(hsp.query[:75], "MGGISIWQXXXXXXXXXXXFGTKKLGSIGSDLGASIKGFKKAMSDDEPKQDKTSQDADFTAKTIADKQADTNQEQ")
00155         self.assertEqual(hsp.match[:75], "MGGISIWQLLIIAVIVVLLFGTKKL  IGSDLG+++KGFKKAMS++E       +DADF  K         N EQ")
00156         self.assertEqual(hsp.sbjct[:75], "MGGISIWQLLIIAVIVVLLFGTKKLRGIGSDLGSAVKGFKKAMSEEESNSAANQKDADFETK---------NLEQ")
00157 
00158         alignment = alignments[13]
00159         self.assertEqual(alignment.title[:50], "gi|75820019|ref|ZP_00750077.1| COG1826: Sec-indepe")
00160         self.assertEqual(alignment.length, 82)
00161         self.assertEqual(len(alignment.hsps), 1)
00162         hsp = alignment.hsps[0]
00163         self.assertTrue(hsp.expect, 3.59357e-13)
00164         self.assertEqual(hsp.query[:75], "MGGISIWQXXXXXXXXXXXFGTKKLGSIGSDLGASIKGFKKAMSDDEPKQDKTSQDADFTAKTIADKQADTNQEQ")
00165         self.assertEqual(hsp.match[:75], "MGGISIWQLLIIAVIVVLLFGTKKL  IGSDLG+++KGFKKAMS++E       +DADF  K         N EQ")
00166         self.assertEqual(hsp.sbjct[:75], "MGGISIWQLLIIAVIVVLLFGTKKLRGIGSDLGSAVKGFKKAMSEEESNSAANQKDADFETK---------NLEQ")
00167 
00168         alignment = alignments[14]
00169         self.assertEqual(alignment.title[:50], "gi|28896872|ref|NP_796477.1| TatA protein [Vibrio ")
00170         self.assertEqual(alignment.length, 81)
00171         self.assertEqual(len(alignment.hsps), 1)
00172         hsp = alignment.hsps[0]
00173         self.assertTrue(hsp.expect, 2.32928e-12)
00174         self.assertEqual(hsp.query[:75], "MGGISIWQXXXXXXXXXXXFGTKKLGSIGSDLGASIKGFKKAMSDDEPKQDKTSQDADFTAKTIADKQADTNQEQ")
00175         self.assertEqual(hsp.match[:75], "MGGIS+WQLLIIAVIVVLLFGTKKL  IG DLG+++KGFKKAMSD++    K  +DADF  K++  +Q    Q++")
00176         self.assertEqual(hsp.sbjct[:75], "MGGISVWQLLIIAVIVVLLFGTKKLRGIGGDLGSAVKGFKKAMSDED--SAKNEKDADFEPKSLEKQQ----QKE")
00177 
00178         alignment = alignments[15]
00179         self.assertEqual(alignment.title[:50], "gi|27364353|ref|NP_759881.1| Sec-independent prote")
00180         self.assertEqual(alignment.length, 78)
00181         self.assertEqual(len(alignment.hsps), 1)
00182         hsp = alignment.hsps[0]
00183         self.assertTrue(hsp.expect, 3.97316e-12)
00184         self.assertEqual(hsp.query[:75], "MGGISIWQXXXXXXXXXXXFGTKKLGSIGSDLGASIKGFKKAMSDDEPKQDKTSQDADFTAKTIADKQADTNQEQ")
00185         self.assertEqual(hsp.match[:75], "MGGISIWQLLIIAVIVVLLFGTKKL  IGSDLG +IKGFKKAM+++E ++    +DADF  K++     +   +Q")
00186         self.assertEqual(hsp.sbjct[:75], "MGGISIWQLLIIAVIVVLLFGTKKLRGIGSDLGGAIKGFKKAMNEEESEK----KDADFEPKSL-----EQQSKQ")
00187 
00188         alignment = alignments[16]
00189         self.assertEqual(alignment.title[:50], "gi|37678364|ref|NP_932973.1| Sec-independent prote")
00190         self.assertEqual(alignment.length, 78)
00191         self.assertEqual(len(alignment.hsps), 1)
00192         hsp = alignment.hsps[0]
00193         self.assertTrue(hsp.expect, 3.97316e-12)
00194         self.assertEqual(hsp.query[:75], "MGGISIWQXXXXXXXXXXXFGTKKLGSIGSDLGASIKGFKKAMSDDEPKQDKTSQDADFTAKTIADKQADTNQEQ")
00195         self.assertEqual(hsp.match[:75], "MGGISIWQLLIIAVIVVLLFGTKKL  IGSDLG +IKGFKKAM+++E ++    +DADF  K++     +   +Q")
00196         self.assertEqual(hsp.sbjct[:75], "MGGISIWQLLIIAVIVVLLFGTKKLRGIGSDLGGAIKGFKKAMNEEESEK----KDADFEPKSL-----EQQNKQ")
00197 
00198         alignment = alignments[17]
00199         self.assertEqual(alignment.title[:50], "gi|71277787|ref|YP_266931.1| Sec-independent prote")
00200         self.assertEqual(alignment.length, 85)
00201         self.assertEqual(len(alignment.hsps), 1)
00202         hsp = alignment.hsps[0]
00203         self.assertTrue(hsp.expect, 3.97316e-12)
00204         self.assertEqual(hsp.query[:75], "MGGISIWQXXXXXXXXXXXFGTKKLGSIGSDLGASIKGFKKAMSDDEPKQDKTSQDADFTAKTIADKQADTNQEQ")
00205         self.assertEqual(hsp.match[:75], "MGGI IWQL+I+AVIVVLLFGTKKL +IG DLG++IKGFK A+ +D  K+ K S  A+ T+ T+AD    T +E ")
00206         self.assertEqual(hsp.sbjct[:75], "MGGIGIWQLVIVAVIVVLLFGTKKLRNIGGDLGSAIKGFKSAIGED--KEQKNS--AEKTSDTLADSSKSTTEEV")
00207 
00208         alignment = alignments[18]
00209         self.assertEqual(alignment.title[:50], "gi|68541995|ref|ZP_00581733.1| Twin-arginine trans")
00210         self.assertEqual(alignment.length, 79)
00211         self.assertEqual(len(alignment.hsps), 1)
00212         hsp = alignment.hsps[0]
00213         self.assertTrue(hsp.expect, 2.57533e-11)
00214         self.assertEqual(hsp.query[:75], "MGGISIWQXXXXXXXXXXXFGTKKLGSIGSDLGASIKGFKKAMSDDEPKQDKTSQDADFTAKT---IADKQADTN")
00215         self.assertEqual(hsp.match[:75], "MGGISIWQLLI+A+IVVLLFGTKKL S+G DLG ++KGFK AMS +E K+     +A  TA+T     +K+ ++N")
00216         self.assertEqual(hsp.sbjct[:75], "MGGISIWQLLIVALIVVLLFGTKKLRSLGGDLGGAVKGFKNAMSSEEDKKALEDTEAAKTAQTTQQATEKKPESN")
00217 
00218         alignment = alignments[19]
00219         self.assertEqual(alignment.title[:50], "gi|77813363|ref|ZP_00812641.1| Twin-arginine trans")
00220         self.assertEqual(alignment.length, 79)
00221         self.assertEqual(len(alignment.hsps), 1)
00222         hsp = alignment.hsps[0]
00223         self.assertTrue(hsp.expect, 2.57533e-11)
00224         self.assertEqual(hsp.query[:75], "MGGISIWQXXXXXXXXXXXFGTKKLGSIGSDLGASIKGFKKAMSDDEPKQDKTSQDADFTAKT---IADKQADTN")
00225         self.assertEqual(hsp.match[:75], "MGGISIWQLLIIA+IVVLLFGTKKL S+G DLG ++KGFK AMS +E K+     +A  TA+T     +K+ ++N")
00226         self.assertEqual(hsp.sbjct[:75], "MGGISIWQLLIIALIVVLLFGTKKLRSLGGDLGGAVKGFKNAMSSEEDKKALEDTEAAKTAQTTQQATEKKPESN")
00227 
00228         alignment = alignments[20]
00229         self.assertEqual(alignment.title[:50], "gi|52306607|gb|AAU37107.1| TatA protein [Mannheimi")
00230         self.assertEqual(alignment.length, 75)
00231         self.assertEqual(len(alignment.hsps), 1)
00232         hsp = alignment.hsps[0]
00233         self.assertTrue(hsp.expect, 3.36348e-11)
00234         self.assertEqual(hsp.query[:75], "MGGISIWQXXXXXXXXXXXFGTKKLGSIGSDLGASIKGFKKAMSDDEPKQDKTSQDADFTAKTIADKQADTNQEQ")
00235         self.assertEqual(hsp.match[:75], "MGGISIWQLLII  I+VLLFGTKKL ++G+DLG S+KGFKKAM++DEPK      DA+F +    D+ A    E+")
00236         self.assertEqual(hsp.sbjct[:75], "MGGISIWQLLIIVAIIVLLFGTKKLRTLGTDLGESVKGFKKAMNEDEPK------DAEFKSLN-KDESATAGSEK")
00237 
00238         alignment = alignments[21]
00239         self.assertEqual(alignment.title[:50], "gi|75429751|ref|ZP_00732413.1| sec-independent pro")
00240         self.assertEqual(alignment.length, 74)
00241         self.assertEqual(len(alignment.hsps), 1)
00242         hsp = alignment.hsps[0]
00243         self.assertTrue(hsp.expect, 3.36348e-11)
00244         self.assertEqual(hsp.query[:75], "MGGISIWQXXXXXXXXXXXFGTKKLGSIGSDLGASIKGFKKAMSDDEPKQDKTSQDADFTAKTIADKQADTNQEQ")
00245         self.assertEqual(hsp.match[:75], "MGGISIWQLLII  IVVLLFGTKKL ++GSDLG S+KGFKKAM+ +EPK      DA+F +   A+  A T +E+")
00246         self.assertEqual(hsp.sbjct[:75], "MGGISIWQLLIIVAIVVLLFGTKKLRTLGSDLGESVKGFKKAMA-EEPK------DAEFKSLDKAENTAQTKKEE")
00247 
00248         alignment = alignments[22]
00249         self.assertEqual(alignment.title[:50], "gi|32033565|ref|ZP_00133892.1| COG1826: Sec-indepe")
00250         self.assertEqual(alignment.length, 76)
00251         self.assertEqual(len(alignment.hsps), 1)
00252         hsp = alignment.hsps[0]
00253         self.assertTrue(hsp.expect, 7.49305e-11)
00254         self.assertEqual(hsp.query[:75], "MGGISIWQXXXXXXXXXXXFGTKKLGSIGSDLGASIKGFKKAMSDDEPKQDKTSQDADFTAKTIADKQADTNQEQ")
00255         self.assertEqual(hsp.match[:75], "MGGISIWQLLII  I+VLLFGTKKL ++G+DLG S+KGFKKAM+DD+      SQ  D + + +  K+A + +++")
00256         self.assertEqual(hsp.sbjct[:75], "MGGISIWQLLIIVAIIVLLFGTKKLRTLGTDLGESVKGFKKAMADDK------SQPQDASFEKVEAKEAASTEQK")
00257 
00258         alignment = alignments[23]
00259         self.assertEqual(alignment.title[:50], "gi|12722097|gb|AAK03773.1| unknown [Pasteurella mu")
00260         self.assertEqual(alignment.length, 76)
00261         self.assertEqual(len(alignment.hsps), 1)
00262         self.assertTrue(alignment.hsps[0].expect > E_VALUE_THRESH)
00263 
00264         alignment = alignments[24]
00265         self.assertEqual(alignment.title[:50], "gi|68546478|ref|ZP_00586025.1| Twin-arginine trans")
00266         self.assertEqual(alignment.length, 77)
00267         self.assertEqual(len(alignment.hsps), 1)
00268         self.assertTrue(alignment.hsps[0].expect > E_VALUE_THRESH)
00269 
00270         alignment = alignments[25]
00271         self.assertEqual(alignment.title[:50], "gi|33151888|ref|NP_873241.1| sec-independent prote")
00272         self.assertEqual(alignment.length, 74)
00273         self.assertEqual(len(alignment.hsps), 1)
00274         self.assertTrue(alignment.hsps[0].expect > E_VALUE_THRESH)
00275 
00276         alignment = alignments[26]
00277         self.assertEqual(alignment.title[:50], "gi|24375687|ref|NP_719730.1| Sec-independent prote")
00278         self.assertEqual(alignment.length, 88)
00279         self.assertEqual(len(alignment.hsps), 1)
00280         self.assertTrue(alignment.hsps[0].expect > E_VALUE_THRESH)
00281 
00282         alignment = alignments[27]
00283         self.assertEqual(alignment.title[:50], "gi|71278553|ref|YP_269744.1| Sec-independent prote")
00284         self.assertEqual(alignment.length, 79)
00285         self.assertEqual(len(alignment.hsps), 1)
00286         self.assertTrue(alignment.hsps[0].expect > E_VALUE_THRESH)
00287 
00288         alignment = alignments[28]
00289         self.assertEqual(alignment.title[:50], "gi|69159855|gb|EAN71956.1| Twin-arginine transloca")
00290         self.assertEqual(alignment.length, 79)
00291         self.assertEqual(len(alignment.hsps), 1)
00292         self.assertTrue(alignment.hsps[0].expect > E_VALUE_THRESH)
00293 
00294         alignment = alignments[29]
00295         self.assertEqual(alignment.title[:50], "gi|69949858|ref|ZP_00637822.1| Twin-arginine trans")
00296         self.assertEqual(alignment.length, 81)
00297         self.assertEqual(len(alignment.hsps), 1)
00298         self.assertTrue(alignment.hsps[0].expect > E_VALUE_THRESH)
00299 
00300         alignment = alignments[30]
00301         self.assertEqual(alignment.title[:50], "gi|48863844|ref|ZP_00317737.1| hypothetical protei")
00302         self.assertEqual(alignment.length, 83)
00303         self.assertEqual(len(alignment.hsps), 1)
00304         self.assertTrue(alignment.hsps[0].expect > E_VALUE_THRESH)
00305 
00306         alignment = alignments[31]
00307         self.assertEqual(alignment.title[:50], "gi|77361831|ref|YP_341406.1| twin-arginine translo")
00308         self.assertEqual(alignment.length, 82)
00309         self.assertEqual(len(alignment.hsps), 1)
00310         self.assertTrue(alignment.hsps[0].expect > E_VALUE_THRESH)
00311 
00312         alignment = alignments[32]
00313         self.assertEqual(alignment.title[:50], "gi|67676224|ref|ZP_00472975.1| Twin-arginine trans")
00314         self.assertEqual(alignment.length, 90)
00315         self.assertEqual(len(alignment.hsps), 1)
00316         self.assertTrue(alignment.hsps[0].expect > E_VALUE_THRESH)
00317 
00318         alignment = alignments[33]
00319         self.assertEqual(alignment.title[:50], "gi|74317722|ref|YP_315462.1| twin-arginine translo")
00320         self.assertEqual(alignment.length, 70)
00321         self.assertEqual(len(alignment.hsps), 1)
00322         self.assertTrue(alignment.hsps[0].expect > E_VALUE_THRESH)
00323 
00324         alignment = alignments[34]
00325         self.assertEqual(alignment.title[:50], "gi|77166504|ref|YP_345029.1| Twin-arginine translo")
00326         self.assertEqual(alignment.length, 90)
00327         self.assertEqual(len(alignment.hsps), 1)
00328         self.assertTrue(alignment.hsps[0].expect > E_VALUE_THRESH)
00329 
00330         alignment = alignments[35]
00331         self.assertEqual(alignment.title[:50], "gi|16128610|ref|NP_415160.1| component of Sec-inde")
00332         self.assertEqual(alignment.length, 67)
00333         self.assertEqual(len(alignment.hsps), 1)
00334         self.assertTrue(alignment.hsps[0].expect > E_VALUE_THRESH)
00335 
00336         alignment = alignments[36]
00337         self.assertEqual(alignment.title[:50], "gi|12831974|emb|CAC29147.1| TatA protein [Pseudomo")
00338         self.assertEqual(alignment.length, 76)
00339         self.assertEqual(len(alignment.hsps), 1)
00340         self.assertTrue(alignment.hsps[0].expect > E_VALUE_THRESH)
00341 
00342         alignment = alignments[37]
00343         self.assertEqual(alignment.title[:50], "gi|32029972|ref|ZP_00132908.1| COG1826: Sec-indepe")
00344         self.assertEqual(alignment.length, 73)
00345         self.assertEqual(len(alignment.hsps), 1)
00346         self.assertTrue(alignment.hsps[0].expect > E_VALUE_THRESH)
00347 
00348         alignment = alignments[38]
00349         self.assertEqual(alignment.title[:50], "gi|455172|gb|AAA24073.1| ORF; putative")
00350         self.assertEqual(alignment.length, 67)
00351         self.assertEqual(len(alignment.hsps), 1)
00352         self.assertTrue(alignment.hsps[0].expect > E_VALUE_THRESH)
00353 
00354         alignment = alignments[39]
00355         self.assertEqual(alignment.title[:50], "gi|1224007|gb|AAA92108.1| ORF4")
00356         self.assertEqual(alignment.length, 192)
00357         self.assertEqual(len(alignment.hsps), 1)
00358         self.assertTrue(alignment.hsps[0].expect > E_VALUE_THRESH)
00359 
00360         alignment = alignments[40]
00361         self.assertEqual(alignment.title[:50], "gi|68056990|gb|AAX87243.1| Sec-independent protein")
00362         self.assertEqual(alignment.length, 95)
00363         self.assertEqual(len(alignment.hsps), 1)
00364         self.assertTrue(alignment.hsps[0].expect > E_VALUE_THRESH)
00365 
00366         alignment = alignments[41]
00367         self.assertEqual(alignment.title[:50], "gi|56461470|ref|YP_156751.1| Sec-independent prote")
00368         self.assertEqual(alignment.length, 73)
00369         self.assertEqual(len(alignment.hsps), 1)
00370         self.assertTrue(alignment.hsps[0].expect > E_VALUE_THRESH)
00371 
00372         alignment = alignments[42]
00373         self.assertEqual(alignment.title[:50], "gi|76793313|ref|ZP_00775802.1| Twin-arginine trans")
00374         self.assertEqual(alignment.length, 84)
00375         self.assertEqual(len(alignment.hsps), 1)
00376         self.assertTrue(alignment.hsps[0].expect > E_VALUE_THRESH)
00377 
00378         alignment = alignments[43]
00379         self.assertEqual(alignment.title[:50], "gi|42630489|ref|ZP_00156028.1| COG1826: Sec-indepe")
00380         self.assertEqual(alignment.length, 75)
00381         self.assertEqual(len(alignment.hsps), 1)
00382         self.assertTrue(alignment.hsps[0].expect > E_VALUE_THRESH)
00383 
00384         alignment = alignments[44]
00385         self.assertEqual(alignment.title[:50], "gi|1074302|pir||B64145 hypothetical protein HI0187")
00386         self.assertEqual(alignment.length, 109)
00387         self.assertEqual(len(alignment.hsps), 1)
00388         self.assertTrue(alignment.hsps[0].expect > E_VALUE_THRESH)
00389 
00390         alignment = alignments[45]
00391         self.assertEqual(alignment.title[:50], "gi|67641583|ref|ZP_00440359.1| COG1826: Sec-indepe")
00392         self.assertEqual(alignment.length, 77)
00393         self.assertEqual(len(alignment.hsps), 1)
00394         self.assertTrue(alignment.hsps[0].expect > E_VALUE_THRESH)
00395 
00396         alignment = alignments[46]
00397         self.assertEqual(alignment.title[:50], "gi|67545726|ref|ZP_00423646.1| Twin-arginine trans")
00398         self.assertEqual(alignment.length, 76)
00399         self.assertEqual(len(alignment.hsps), 1)
00400         self.assertTrue(alignment.hsps[0].expect > E_VALUE_THRESH)
00401 
00402         alignment = alignments[47]
00403         self.assertEqual(alignment.title[:50], "gi|45435806|gb|AAS61363.1| sec-independent protein")
00404         self.assertEqual(alignment.length, 85)
00405         self.assertEqual(len(alignment.hsps), 1)
00406         self.assertTrue(alignment.hsps[0].expect > E_VALUE_THRESH)
00407 
00408         alignment = alignments[48]
00409         self.assertEqual(alignment.title[:50], "gi|49610761|emb|CAG74206.1| Sec-independent protei")
00410         self.assertEqual(alignment.length, 65)
00411         self.assertEqual(len(alignment.hsps), 1)
00412         self.assertTrue(alignment.hsps[0].expect > E_VALUE_THRESH)
00413 
00414         alignment = alignments[49]
00415         self.assertEqual(alignment.title[:50], "gi|67663266|ref|ZP_00460549.1| Twin-arginine trans")
00416         self.assertEqual(alignment.length, 76)
00417         self.assertEqual(len(alignment.hsps), 1)
00418         self.assertTrue(alignment.hsps[0].expect > E_VALUE_THRESH)
00419 
00420         alignment = alignments[50]
00421         self.assertEqual(alignment.title[:50], "gi|33594634|ref|NP_882278.1| Sec-independent prote")
00422         self.assertEqual(alignment.length, 75)
00423         self.assertEqual(len(alignment.hsps), 1)
00424         self.assertTrue(alignment.hsps[0].expect > E_VALUE_THRESH)
00425 
00426         alignment = alignments[51]
00427         self.assertEqual(alignment.title[:50], "gi|46310681|ref|ZP_00211309.1| COG1826: Sec-indepe")
00428         self.assertEqual(alignment.length, 76)
00429         self.assertEqual(len(alignment.hsps), 1)
00430         self.assertTrue(alignment.hsps[0].expect > E_VALUE_THRESH)
00431 
00432         alignment = alignments[52]
00433         self.assertEqual(alignment.title[:50], "gi|58584031|ref|YP_203047.1| sec-independent prote")
00434         self.assertEqual(alignment.length, 75)
00435         self.assertEqual(len(alignment.hsps), 1)
00436         self.assertTrue(alignment.hsps[0].expect > E_VALUE_THRESH)
00437 
00438         alignment = alignments[53]
00439         self.assertEqual(alignment.title[:50], "gi|17429965|emb|CAD16649.1| PROBABLE SIGNAL PEPTID")
00440         self.assertEqual(alignment.length, 85)
00441         self.assertEqual(len(alignment.hsps), 1)
00442         self.assertTrue(alignment.hsps[0].expect > E_VALUE_THRESH)
00443 
00444         alignment = alignments[54]
00445         self.assertEqual(alignment.title[:50], "gi|47573371|ref|ZP_00243410.1| COG1826: Sec-indepe")
00446         self.assertEqual(alignment.length, 76)
00447         self.assertEqual(len(alignment.hsps), 1)
00448         self.assertTrue(alignment.hsps[0].expect > E_VALUE_THRESH)
00449 
00450         alignment = alignments[55]
00451         self.assertEqual(alignment.title[:50], "gi|16273687|ref|NP_438355.1| Sec-independent prote")
00452         self.assertEqual(alignment.length, 89)
00453         self.assertEqual(len(alignment.hsps), 1)
00454         self.assertTrue(alignment.hsps[0].expect > E_VALUE_THRESH)
00455 
00456         alignment = alignments[56]
00457         self.assertEqual(alignment.title[:50], "gi|73542784|ref|YP_297304.1| Twin-arginine translo")
00458         self.assertEqual(alignment.length, 73)
00459         self.assertEqual(len(alignment.hsps), 1)
00460         self.assertTrue(alignment.hsps[0].expect > E_VALUE_THRESH)
00461 
00462         alignment = alignments[57]
00463         self.assertEqual(alignment.title[:50], "gi|26987777|ref|NP_743202.1| Sec-independent prote")
00464         self.assertEqual(alignment.length, 77)
00465         self.assertEqual(len(alignment.hsps), 1)
00466         self.assertTrue(alignment.hsps[0].expect > E_VALUE_THRESH)
00467 
00468         alignment = alignments[58]
00469         self.assertEqual(alignment.title[:50], "gi|29142636|ref|NP_805978.1| sec-independent prote")
00470         self.assertEqual(alignment.length, 67)
00471         self.assertEqual(len(alignment.hsps), 1)
00472         self.assertTrue(alignment.hsps[0].expect > E_VALUE_THRESH)
00473 
00474         alignment = alignments[59]
00475         self.assertEqual(alignment.title[:50], "gi|18389921|gb|AAL68797.1| TatA [Ralstonia eutroph")
00476         self.assertEqual(alignment.length, 77)
00477         self.assertEqual(len(alignment.hsps), 1)
00478         self.assertTrue(alignment.hsps[0].expect > E_VALUE_THRESH)
00479 
00480         alignment = alignments[60]
00481         self.assertEqual(alignment.title[:50], "gi|48781637|ref|ZP_00278228.1| COG1826: Sec-indepe")
00482         self.assertEqual(alignment.length, 79)
00483         self.assertEqual(len(alignment.hsps), 1)
00484         self.assertTrue(alignment.hsps[0].expect > E_VALUE_THRESH)
00485 
00486         alignment = alignments[61]
00487         self.assertEqual(alignment.title[:50], "gi|77456610|ref|YP_346115.1| Twin-arginine translo")
00488         self.assertEqual(alignment.length, 92)
00489         self.assertEqual(len(alignment.hsps), 1)
00490         self.assertTrue(alignment.hsps[0].expect > E_VALUE_THRESH)
00491 
00492         alignment = alignments[62]
00493         self.assertEqual(alignment.title[:50], "gi|1684735|emb|CAA98158.1| ORF57 protein [Pseudomo")
00494         self.assertEqual(alignment.length, 57)
00495         self.assertEqual(len(alignment.hsps), 1)
00496         self.assertTrue(alignment.hsps[0].expect > E_VALUE_THRESH)
00497 
00498         alignment = alignments[63]
00499         self.assertEqual(alignment.title[:50], "gi|56476124|ref|YP_157713.1| Sec-independent prote")
00500         self.assertEqual(alignment.length, 75)
00501         self.assertEqual(len(alignment.hsps), 1)
00502         self.assertTrue(alignment.hsps[0].expect > E_VALUE_THRESH)
00503 
00504         alignment = alignments[64]
00505         self.assertEqual(alignment.title[:50], "gi|34496078|ref|NP_900293.1| Sec-independent prote")
00506         self.assertEqual(alignment.length, 68)
00507         self.assertEqual(len(alignment.hsps), 1)
00508         self.assertTrue(alignment.hsps[0].expect > E_VALUE_THRESH)
00509 
00510         alignment = alignments[65]
00511         self.assertEqual(alignment.title[:50], "gi|67848115|ref|ZP_00503233.1| Twin-arginine trans")
00512         self.assertEqual(alignment.length, 83)
00513         self.assertEqual(len(alignment.hsps), 1)
00514         self.assertTrue(alignment.hsps[0].expect > E_VALUE_THRESH)
00515 
00516         alignment = alignments[66]
00517         self.assertEqual(alignment.title[:50], "gi|26991692|ref|NP_747117.1| Sec-independent prote")
00518         self.assertEqual(alignment.length, 90)
00519         self.assertEqual(len(alignment.hsps), 1)
00520         self.assertTrue(alignment.hsps[0].expect > E_VALUE_THRESH)
00521 
00522         alignment = alignments[67]
00523         self.assertEqual(alignment.title[:50], "gi|15601293|ref|NP_232924.1| tatA protein [Vibrio ")
00524         self.assertEqual(alignment.length, 78)
00525         self.assertEqual(len(alignment.hsps), 1)
00526         self.assertTrue(alignment.hsps[0].expect > E_VALUE_THRESH)
00527 
00528         alignment = alignments[68]
00529         self.assertEqual(alignment.title[:50], "gi|66770480|ref|YP_245242.1| sec-independent prote")
00530         self.assertEqual(alignment.length, 75)
00531         self.assertEqual(len(alignment.hsps), 1)
00532         self.assertTrue(alignment.hsps[0].expect > E_VALUE_THRESH)
00533 
00534         alignment = alignments[69]
00535         self.assertEqual(alignment.title[:50], "gi|53804435|ref|YP_113945.1| Sec-independent prote")
00536         self.assertEqual(alignment.length, 70)
00537         self.assertEqual(len(alignment.hsps), 1)
00538         self.assertTrue(alignment.hsps[0].expect > E_VALUE_THRESH)
00539 
00540         alignment = alignments[70]
00541         self.assertEqual(alignment.title[:50], "gi|75825357|ref|ZP_00754793.1| COG1826: Sec-indepe")
00542         self.assertEqual(alignment.length, 80)
00543         self.assertEqual(len(alignment.hsps), 1)
00544         self.assertTrue(alignment.hsps[0].expect > E_VALUE_THRESH)
00545 
00546         alignment = alignments[71]
00547         self.assertEqual(alignment.title[:50], "gi|71908987|ref|YP_286574.1| Twin-arginine translo")
00548         self.assertEqual(alignment.length, 76)
00549         self.assertEqual(len(alignment.hsps), 1)
00550         self.assertTrue(alignment.hsps[0].expect > E_VALUE_THRESH)
00551 
00552         alignment = alignments[72]
00553         self.assertEqual(alignment.title[:50], "gi|68526571|gb|EAN49542.1| Twin-arginine transloca")
00554         self.assertEqual(alignment.length, 77)
00555         self.assertEqual(len(alignment.hsps), 1)
00556         self.assertTrue(alignment.hsps[0].expect > E_VALUE_THRESH)
00557 
00558         alignment = alignments[73]
00559         self.assertEqual(alignment.title[:50], "gi|71736448|ref|YP_272670.1| sec-independent prote")
00560         self.assertEqual(alignment.length, 91)
00561         self.assertEqual(len(alignment.hsps), 1)
00562         self.assertTrue(alignment.hsps[0].expect > E_VALUE_THRESH)
00563 
00564         alignment = alignments[74]
00565         self.assertEqual(alignment.title[:50], "gi|56460344|ref|YP_155625.1| Sec-independent prote")
00566         self.assertEqual(alignment.length, 72)
00567         self.assertEqual(len(alignment.hsps), 1)
00568         self.assertTrue(alignment.hsps[0].expect > E_VALUE_THRESH)
00569 
00570         alignment = alignments[75]
00571         self.assertEqual(alignment.title[:50], "gi|68214708|ref|ZP_00566522.1| Twin-arginine trans")
00572         self.assertEqual(alignment.length, 72)
00573         self.assertEqual(len(alignment.hsps), 1)
00574         self.assertTrue(alignment.hsps[0].expect > E_VALUE_THRESH)
00575 
00576         alignment = alignments[76]
00577         self.assertEqual(alignment.title[:50], "gi|30248650|ref|NP_840720.1| mttA/Hcf106 family [N")
00578         self.assertEqual(alignment.length, 76)
00579         self.assertEqual(len(alignment.hsps), 1)
00580         self.assertTrue(alignment.hsps[0].expect > E_VALUE_THRESH)
00581 
00582         alignment = alignments[77]
00583         self.assertEqual(alignment.title[:50], "gi|75822907|ref|ZP_00752458.1| COG1826: Sec-indepe")
00584         self.assertEqual(alignment.length, 78)
00585         self.assertEqual(len(alignment.hsps), 1)
00586         self.assertTrue(alignment.hsps[0].expect > E_VALUE_THRESH)
00587 
00588         alignment = alignments[78]
00589         self.assertEqual(alignment.title[:50], "gi|70733926|ref|YP_257566.1| sec-independent prote")
00590         self.assertEqual(alignment.length, 93)
00591         self.assertEqual(len(alignment.hsps), 1)
00592         self.assertTrue(alignment.hsps[0].expect > E_VALUE_THRESH)
00593 
00594         alignment = alignments[79]
00595         self.assertEqual(alignment.title[:50], "gi|63254358|gb|AAY35454.1| Twin-arginine transloca")
00596         self.assertEqual(alignment.length, 91)
00597         self.assertEqual(len(alignment.hsps), 1)
00598         self.assertTrue(alignment.hsps[0].expect > E_VALUE_THRESH)
00599 
00600         alignment = alignments[80]
00601         self.assertEqual(alignment.title[:50], "gi|73354814|gb|AAZ75668.1| TatA [Pseudomonas syrin")
00602         self.assertEqual(alignment.length, 91)
00603         self.assertEqual(len(alignment.hsps), 1)
00604         self.assertTrue(alignment.hsps[0].expect > E_VALUE_THRESH)
00605 
00606         alignment = alignments[81]
00607         self.assertEqual(alignment.title[:50], "gi|50083761|ref|YP_045271.1| Sec-independent prote")
00608         self.assertEqual(alignment.length, 78)
00609         self.assertEqual(len(alignment.hsps), 1)
00610         self.assertTrue(alignment.hsps[0].expect > E_VALUE_THRESH)
00611 
00612         alignment = alignments[82]
00613         self.assertEqual(alignment.title[:50], "gi|71548504|ref|ZP_00668728.1| Twin-arginine trans")
00614         self.assertEqual(alignment.length, 77)
00615         self.assertEqual(len(alignment.hsps), 1)
00616         self.assertTrue(alignment.hsps[0].expect > E_VALUE_THRESH)
00617 
00618         alignment = alignments[83]
00619         self.assertEqual(alignment.title[:50], "gi|55247002|gb|EAL42253.1| ENSANGP00000028218 [Ano")
00620         self.assertEqual(alignment.length, 53)
00621         self.assertEqual(len(alignment.hsps), 1)
00622         self.assertTrue(alignment.hsps[0].expect > E_VALUE_THRESH)
00623 
00624         alignment = alignments[84]
00625         self.assertEqual(alignment.title[:50], "gi|50084688|ref|YP_046198.1| Sec-independent prote")
00626         self.assertEqual(alignment.length, 71)
00627         self.assertEqual(len(alignment.hsps), 1)
00628         self.assertTrue(alignment.hsps[0].expect > E_VALUE_THRESH)
00629 
00630         alignment = alignments[85]
00631         self.assertEqual(alignment.title[:50], "gi|28872267|ref|NP_794886.1| sec-independent prote")
00632         self.assertEqual(alignment.length, 91)
00633         self.assertEqual(len(alignment.hsps), 1)
00634         self.assertTrue(alignment.hsps[0].expect > E_VALUE_THRESH)
00635 
00636         alignment = alignments[86]
00637         self.assertEqual(alignment.title[:50], "gi|49082486|gb|AAT50643.1| PA5068 [synthetic const")
00638         self.assertEqual(alignment.length, 83)
00639         self.assertEqual(len(alignment.hsps), 1)
00640         self.assertTrue(alignment.hsps[0].expect > E_VALUE_THRESH)
00641 
00642         alignment = alignments[87]
00643         self.assertEqual(alignment.title[:50], "gi|53726598|ref|ZP_00141543.2| COG1826: Sec-indepe")
00644         self.assertEqual(alignment.length, 82)
00645         self.assertEqual(len(alignment.hsps), 1)
00646         self.assertTrue(alignment.hsps[0].expect > E_VALUE_THRESH)
00647 
00648         alignment = alignments[88]
00649         self.assertEqual(alignment.title[:50], "gi|68213616|ref|ZP_00565447.1| Twin-arginine trans")
00650         self.assertEqual(alignment.length, 54)
00651         self.assertEqual(len(alignment.hsps), 1)
00652         self.assertTrue(alignment.hsps[0].expect > E_VALUE_THRESH)
00653 
00654         alignment = alignments[89]
00655         self.assertEqual(alignment.title[:50], "gi|74023810|ref|ZP_00694377.1| Twin-arginine trans")
00656         self.assertEqual(alignment.length, 79)
00657         self.assertEqual(len(alignment.hsps), 1)
00658         self.assertTrue(alignment.hsps[0].expect > E_VALUE_THRESH)
00659 
00660         alignment = alignments[90]
00661         self.assertEqual(alignment.title[:50], "gi|71066554|ref|YP_265281.1| twin-arginine translo")
00662         self.assertEqual(alignment.length, 87)
00663         self.assertEqual(len(alignment.hsps), 1)
00664         self.assertTrue(alignment.hsps[0].expect > E_VALUE_THRESH)
00665 
00666         alignment = alignments[91]
00667         self.assertEqual(alignment.title[:50], "gi|15611372|ref|NP_223023.1| hypothetical protein ")
00668         self.assertEqual(alignment.length, 79)
00669         self.assertEqual(len(alignment.hsps), 1)
00670         self.assertTrue(alignment.hsps[0].expect > E_VALUE_THRESH)
00671 
00672         alignment = alignments[92]
00673         self.assertEqual(alignment.title[:50], "gi|13471183|ref|NP_102752.1| sec-independent prote")
00674         self.assertEqual(alignment.length, 73)
00675         self.assertEqual(len(alignment.hsps), 1)
00676         self.assertTrue(alignment.hsps[0].expect > E_VALUE_THRESH)
00677 
00678         alignment = alignments[93]
00679         self.assertEqual(alignment.title[:50], "gi|42523995|ref|NP_969375.1| twin-arginine-depende")
00680         self.assertEqual(alignment.length, 81)
00681         self.assertEqual(len(alignment.hsps), 1)
00682         self.assertTrue(alignment.hsps[0].expect > E_VALUE_THRESH)
00683 
00684         alignment = alignments[94]
00685         self.assertEqual(alignment.title[:50], "gi|67158086|ref|ZP_00419176.1| Twin-arginine trans")
00686         self.assertEqual(alignment.length, 85)
00687         self.assertEqual(len(alignment.hsps), 1)
00688         self.assertTrue(alignment.hsps[0].expect > E_VALUE_THRESH)
00689 
00690         alignment = alignments[95]
00691         self.assertEqual(alignment.title[:50], "gi|15644948|ref|NP_207118.1| conserved hypothetica")
00692         self.assertEqual(alignment.length, 79)
00693         self.assertEqual(len(alignment.hsps), 1)
00694         self.assertTrue(alignment.hsps[0].expect > E_VALUE_THRESH)
00695 
00696         alignment = alignments[96]
00697         self.assertEqual(alignment.title[:50], "gi|13277311|emb|CAC34414.1| putative TatA protein ")
00698         self.assertEqual(alignment.length, 61)
00699         self.assertEqual(len(alignment.hsps), 1)
00700         self.assertTrue(alignment.hsps[0].expect > E_VALUE_THRESH)
00701 
00702         alignment = alignments[97]
00703         self.assertEqual(alignment.title[:50], "gi|54298906|ref|YP_125275.1| Putative TatA protein")
00704         self.assertEqual(alignment.length, 61)
00705         self.assertEqual(len(alignment.hsps), 1)
00706         self.assertTrue(alignment.hsps[0].expect > E_VALUE_THRESH)
00707 
00708         alignment = alignments[98]
00709         self.assertEqual(alignment.title[:50], "gi|71363513|ref|ZP_00654157.1| Twin-arginine trans")
00710         self.assertEqual(alignment.length, 94)
00711         self.assertEqual(len(alignment.hsps), 1)
00712         self.assertTrue(alignment.hsps[0].expect > E_VALUE_THRESH)
00713 
00714         alignment = alignments[99]
00715         self.assertEqual(alignment.title[:50], "gi|71362217|ref|ZP_00653377.1| Twin-arginine trans")
00716         self.assertEqual(alignment.length, 80)
00717         self.assertEqual(len(alignment.hsps), 1)
00718         self.assertTrue(alignment.hsps[0].expect > E_VALUE_THRESH)
00719 
00720         alignment = alignments[100]
00721         self.assertEqual(alignment.title[:50], "gi|27379862|ref|NP_771391.1| hypothetical protein ")
00722         self.assertEqual(alignment.length, 77)
00723         self.assertEqual(len(alignment.hsps), 1)
00724         self.assertTrue(alignment.hsps[0].expect > E_VALUE_THRESH)
00725 
00726         alignment = alignments[101]
00727         self.assertEqual(alignment.title[:50], "gi|39935914|ref|NP_948190.1| putative sec-independ")
00728         self.assertEqual(alignment.length, 78)
00729         self.assertEqual(len(alignment.hsps), 1)
00730         self.assertTrue(alignment.hsps[0].expect > E_VALUE_THRESH)
00731 
00732         alignment = alignments[102]
00733         self.assertEqual(alignment.title[:50], "gi|17935600|ref|NP_532390.1| SEC-independent prote")
00734         self.assertEqual(alignment.length, 70)
00735         self.assertEqual(len(alignment.hsps), 1)
00736         self.assertTrue(alignment.hsps[0].expect > E_VALUE_THRESH)
00737 
00738         alignment = alignments[103]
00739         self.assertEqual(alignment.title[:50], "gi|62289827|ref|YP_221620.1| Sec-independent prote")
00740         self.assertEqual(alignment.length, 72)
00741         self.assertEqual(len(alignment.hsps), 1)
00742         self.assertTrue(alignment.hsps[0].expect > E_VALUE_THRESH)
00743 
00744         alignment = alignments[104]
00745         self.assertEqual(alignment.title[:50], "gi|23347697|gb|AAN29810.1| Sec-independent protein")
00746         self.assertEqual(alignment.length, 80)
00747         self.assertEqual(len(alignment.hsps), 1)
00748         self.assertTrue(alignment.hsps[0].expect > E_VALUE_THRESH)
00749 
00750         alignment = alignments[105]
00751         self.assertEqual(alignment.title[:50], "gi|75675971|ref|YP_318392.1| twin-arginine translo")
00752         self.assertEqual(alignment.length, 78)
00753         self.assertEqual(len(alignment.hsps), 1)
00754         self.assertTrue(alignment.hsps[0].expect > E_VALUE_THRESH)
00755 
00756         alignment = alignments[106]
00757         self.assertEqual(alignment.title[:50], "gi|69928230|ref|ZP_00625391.1| Twin-arginine trans")
00758         self.assertEqual(alignment.length, 79)
00759         self.assertEqual(len(alignment.hsps), 1)
00760         self.assertTrue(alignment.hsps[0].expect > E_VALUE_THRESH)
00761 
00762         alignment = alignments[107]
00763         self.assertEqual(alignment.title[:50], "gi|77689454|ref|ZP_00804635.1| Twin-arginine trans")
00764         self.assertEqual(alignment.length, 79)
00765         self.assertEqual(len(alignment.hsps), 1)
00766         self.assertTrue(alignment.hsps[0].expect > E_VALUE_THRESH)
00767 
00768         alignment = alignments[108]
00769         self.assertEqual(alignment.title[:50], "gi|77743614|ref|ZP_00812071.1| Twin-arginine trans")
00770         self.assertEqual(alignment.length, 78)
00771         self.assertEqual(len(alignment.hsps), 1)
00772         self.assertTrue(alignment.hsps[0].expect > E_VALUE_THRESH)
00773 
00774         alignment = alignments[109]
00775         self.assertEqual(alignment.title[:50], "gi|71066141|ref|YP_264868.1| twin-arginine translo")
00776         self.assertEqual(alignment.length, 89)
00777         self.assertEqual(len(alignment.hsps), 1)
00778         self.assertTrue(alignment.hsps[0].expect > E_VALUE_THRESH)
00779 
00780         alignment = alignments[110]
00781         self.assertEqual(alignment.title[:50], "gi|28199457|ref|NP_779771.1| SEC-independent prote")
00782         self.assertEqual(alignment.length, 71)
00783         self.assertEqual(len(alignment.hsps), 1)
00784         self.assertTrue(alignment.hsps[0].expect > E_VALUE_THRESH)
00785 
00786         alignment = alignments[111]
00787         self.assertEqual(alignment.title[:50], "gi|15837166|ref|NP_297854.1| hypothetical protein ")
00788         self.assertEqual(alignment.length, 71)
00789         self.assertEqual(len(alignment.hsps), 1)
00790         self.assertTrue(alignment.hsps[0].expect > E_VALUE_THRESH)
00791 
00792         alignment = alignments[112]
00793         self.assertEqual(alignment.title[:50], "gi|15074462|emb|CAC46108.1| HYPOTHETICAL TRANSMEMB")
00794         self.assertEqual(alignment.length, 68)
00795         self.assertEqual(len(alignment.hsps), 1)
00796         self.assertTrue(alignment.hsps[0].expect > E_VALUE_THRESH)
00797 
00798         alignment = alignments[113]
00799         self.assertEqual(alignment.title[:50], "gi|27462871|gb|AAO15625.1| Sec-independent protein")
00800         self.assertEqual(alignment.length, 63)
00801         self.assertEqual(len(alignment.hsps), 1)
00802         self.assertTrue(alignment.hsps[0].expect > E_VALUE_THRESH)
00803 
00804         alignment = alignments[114]
00805         self.assertEqual(alignment.title[:50], "gi|35211273|dbj|BAC88652.1| gsl0711 [Gloeobacter v")
00806         self.assertEqual(alignment.length, 72)
00807         self.assertEqual(len(alignment.hsps), 1)
00808         self.assertTrue(alignment.hsps[0].expect > E_VALUE_THRESH)
00809 
00810         alignment = alignments[115]
00811         self.assertEqual(alignment.title[:50], "gi|34482347|emb|CAE09348.1| hypothetical protein [")
00812         self.assertEqual(alignment.length, 80)
00813         self.assertEqual(len(alignment.hsps), 1)
00814         self.assertTrue(alignment.hsps[0].expect > E_VALUE_THRESH)
00815 
00816         alignment = alignments[116]
00817         self.assertEqual(alignment.title[:50], "gi|32262257|gb|AAP77305.1| component of Sec-indepe")
00818         self.assertEqual(alignment.length, 82)
00819         self.assertEqual(len(alignment.hsps), 1)
00820         self.assertTrue(alignment.hsps[0].expect > E_VALUE_THRESH)
00821 
00822         alignment = alignments[117]
00823         self.assertEqual(alignment.title[:50], "gi|76261408|ref|ZP_00769019.1| Twin-arginine trans")
00824         self.assertEqual(alignment.length, 62)
00825         self.assertEqual(len(alignment.hsps), 1)
00826         self.assertTrue(alignment.hsps[0].expect > E_VALUE_THRESH)
00827 
00828         alignment = alignments[118]
00829         self.assertEqual(alignment.title[:50], "gi|69933726|ref|ZP_00628928.1| sec-independent tra")
00830         self.assertEqual(alignment.length, 159)
00831         self.assertEqual(len(alignment.hsps), 1)
00832         self.assertTrue(alignment.hsps[0].expect > E_VALUE_THRESH)
00833 
00834         alignment = alignments[119]
00835         self.assertEqual(alignment.title[:50], "gi|15605662|ref|NP_213037.1| hypothetical protein ")
00836         self.assertEqual(alignment.length, 59)
00837         self.assertEqual(len(alignment.hsps), 1)
00838         self.assertTrue(alignment.hsps[0].expect > E_VALUE_THRESH)
00839 
00840         alignment = alignments[120]
00841         self.assertEqual(alignment.title[:50], "gi|68538777|ref|ZP_00578553.1| Twin-arginine trans")
00842         self.assertEqual(alignment.length, 77)
00843         self.assertEqual(len(alignment.hsps), 1)
00844         self.assertTrue(alignment.hsps[0].expect > E_VALUE_THRESH)
00845 
00846         alignment = alignments[121]
00847         self.assertEqual(alignment.title[:50], "gi|68136098|ref|ZP_00544086.1| Twin-arginine trans")
00848         self.assertEqual(alignment.length, 130)
00849         self.assertEqual(len(alignment.hsps), 1)
00850         self.assertTrue(alignment.hsps[0].expect > E_VALUE_THRESH)
00851 
00852         alignment = alignments[122]
00853         self.assertEqual(alignment.title[:50], "gi|20259265|gb|AAM14368.1| putative Tha4 protein [")
00854         self.assertEqual(alignment.length, 147)
00855         self.assertEqual(len(alignment.hsps), 1)
00856         self.assertTrue(alignment.hsps[0].expect > E_VALUE_THRESH)
00857 
00858         alignment = alignments[123]
00859         self.assertEqual(alignment.title[:50], "gi|75910646|ref|YP_324942.1| Twin-arginine translo")
00860         self.assertEqual(alignment.length, 90)
00861         self.assertEqual(len(alignment.hsps), 1)
00862         self.assertTrue(alignment.hsps[0].expect > E_VALUE_THRESH)
00863 
00864         alignment = alignments[124]
00865         self.assertEqual(alignment.title[:50], "gi|39982657|gb|AAR34117.1| twin-arginine transloca")
00866         self.assertEqual(alignment.length, 57)
00867         self.assertEqual(len(alignment.hsps), 1)
00868         self.assertTrue(alignment.hsps[0].expect > E_VALUE_THRESH)
00869 
00870         alignment = alignments[125]
00871         self.assertEqual(alignment.title[:50], "gi|33635687|emb|CAE22011.1| mttA/Hcf106 family [Pr")
00872         self.assertEqual(alignment.length, 91)
00873         self.assertEqual(len(alignment.hsps), 1)
00874         self.assertTrue(alignment.hsps[0].expect > E_VALUE_THRESH)
00875 
00876         alignment = alignments[126]
00877         self.assertEqual(alignment.title[:50], "gi|76791934|ref|ZP_00774438.1| Twin-arginine trans")
00878         self.assertEqual(alignment.length, 68)
00879         self.assertEqual(len(alignment.hsps), 1)
00880         self.assertTrue(alignment.hsps[0].expect > E_VALUE_THRESH)
00881 
00882         alignment = alignments[127]
00883         self.assertEqual(alignment.title[:50], "gi|23129516|ref|ZP_00111343.1| COG1826: Sec-indepe")
00884         self.assertEqual(alignment.length, 91)
00885         self.assertEqual(len(alignment.hsps), 1)
00886         self.assertTrue(alignment.hsps[0].expect > E_VALUE_THRESH)
00887 
00888         alignment = alignments[128]
00889         self.assertEqual(alignment.title[:50], "gi|48764199|ref|ZP_00268751.1| COG1826: Sec-indepe")
00890         self.assertEqual(alignment.length, 96)
00891         self.assertEqual(len(alignment.hsps), 1)
00892         self.assertTrue(alignment.hsps[0].expect > E_VALUE_THRESH)
00893 
00894         alignment = alignments[129]
00895         self.assertEqual(alignment.title[:50], "gi|15677995|ref|NP_273645.1| hypothetical protein ")
00896         self.assertEqual(alignment.length, 67)
00897         self.assertEqual(len(alignment.hsps), 1)
00898         self.assertTrue(alignment.hsps[0].expect > E_VALUE_THRESH)
00899 
00900         alignment = alignments[130]
00901         self.assertEqual(alignment.title[:50], "gi|50917153|ref|XP_468973.1| putative sec-independ")
00902         self.assertEqual(alignment.length, 170)
00903         self.assertEqual(len(alignment.hsps), 1)
00904         self.assertTrue(alignment.hsps[0].expect > E_VALUE_THRESH)
00905 
00906         alignment = alignments[131]
00907         self.assertEqual(alignment.title[:50], "gi|16329622|ref|NP_440350.1| hypothetical protein ")
00908         self.assertEqual(alignment.length, 126)
00909         self.assertEqual(len(alignment.hsps), 1)
00910         self.assertTrue(alignment.hsps[0].expect > E_VALUE_THRESH)
00911 
00912         alignment = alignments[132]
00913         self.assertEqual(alignment.title[:50], "gi|71083667|ref|YP_266387.1| Twin-arginine translo")
00914         self.assertEqual(alignment.length, 66)
00915         self.assertEqual(len(alignment.hsps), 1)
00916         self.assertTrue(alignment.hsps[0].expect > E_VALUE_THRESH)
00917 
00918         alignment = alignments[133]
00919         self.assertEqual(alignment.title[:50], "gi|17130190|dbj|BAB72802.1| asl0845 [Nostoc sp. PC")
00920         self.assertEqual(alignment.length, 90)
00921         self.assertEqual(len(alignment.hsps), 1)
00922         self.assertTrue(alignment.hsps[0].expect > E_VALUE_THRESH)
00923 
00924         alignment = alignments[134]
00925         self.assertEqual(alignment.title[:50], "gi|68246031|gb|EAN28138.1| Twin-arginine transloca")
00926         self.assertEqual(alignment.length, 69)
00927         self.assertEqual(len(alignment.hsps), 1)
00928         self.assertTrue(alignment.hsps[0].expect > E_VALUE_THRESH)
00929 
00930         alignment = alignments[135]
00931         self.assertEqual(alignment.title[:50], "gi|15604583|ref|NP_221101.1| hypothetical protein ")
00932         self.assertEqual(alignment.length, 54)
00933         self.assertEqual(len(alignment.hsps), 1)
00934         self.assertTrue(alignment.hsps[0].expect > E_VALUE_THRESH)
00935 
00936         alignment = alignments[136]
00937         self.assertEqual(alignment.title[:50], "gi|77685166|ref|ZP_00800574.1| Twin-arginine trans")
00938         self.assertEqual(alignment.length, 69)
00939         self.assertEqual(len(alignment.hsps), 1)
00940         self.assertTrue(alignment.hsps[0].expect > E_VALUE_THRESH)
00941 
00942         alignment = alignments[137]
00943         self.assertEqual(alignment.title[:50], "gi|39985226|gb|AAR36581.1| twin-arginine transloca")
00944         self.assertEqual(alignment.length, 78)
00945         self.assertEqual(len(alignment.hsps), 1)
00946         self.assertTrue(alignment.hsps[0].expect > E_VALUE_THRESH)
00947 
00948         alignment = alignments[138]
00949         self.assertEqual(alignment.title[:50], "gi|1825636|gb|AAB42258.1| Hypothetical protein ZK3")
00950         self.assertEqual(alignment.length, 312)
00951         self.assertEqual(len(alignment.hsps), 1)
00952         self.assertTrue(alignment.hsps[0].expect > E_VALUE_THRESH)
00953 
00954         alignment = alignments[139]
00955         self.assertEqual(alignment.title[:50], "gi|65321915|ref|ZP_00394874.1| COG5386: Cell surfa")
00956         self.assertEqual(alignment.length, 237)
00957         self.assertEqual(len(alignment.hsps), 1)
00958         self.assertTrue(alignment.hsps[0].expect > E_VALUE_THRESH)
00959 
00960         alignment = alignments[140]
00961         self.assertEqual(alignment.title[:50], "gi|30022625|ref|NP_834256.1| Cell surface protein ")
00962         self.assertEqual(alignment.length, 237)
00963         self.assertEqual(len(alignment.hsps), 1)
00964         self.assertTrue(alignment.hsps[0].expect > E_VALUE_THRESH)
00965 
00966         alignment = alignments[141]
00967         self.assertEqual(alignment.title[:50], "gi|55623442|ref|XP_517520.1| PREDICTED: similar to")
00968         self.assertEqual(alignment.length, 234)
00969         self.assertEqual(len(alignment.hsps), 1)
00970         self.assertTrue(alignment.hsps[0].expect > E_VALUE_THRESH)
00971 
00972         alignment = alignments[142]
00973         self.assertEqual(alignment.title[:50], "gi|75762866|ref|ZP_00742681.1| Cell surface protei")
00974         self.assertEqual(alignment.length, 237)
00975         self.assertEqual(len(alignment.hsps), 1)
00976         self.assertTrue(alignment.hsps[0].expect > E_VALUE_THRESH)
00977 
00978         alignment = alignments[143]
00979         self.assertEqual(alignment.title[:50], "gi|22945598|gb|AAN10511.1| CG18497-PC, isoform C [")
00980         self.assertEqual(alignment.length, 5476)
00981         self.assertEqual(len(alignment.hsps), 1)
00982         self.assertTrue(alignment.hsps[0].expect > E_VALUE_THRESH)
00983 
00984         alignment = alignments[144]
00985         self.assertEqual(alignment.title[:50], "gi|10727420|gb|AAF51534.2| CG18497-PB, isoform B [")
00986         self.assertEqual(alignment.length, 5533)
00987         self.assertEqual(len(alignment.hsps), 1)
00988         self.assertTrue(alignment.hsps[0].expect > E_VALUE_THRESH)
00989 
00990         alignment = alignments[145]
00991         self.assertEqual(alignment.title[:50], "gi|10727421|gb|AAF51535.2| CG18497-PA, isoform A [")
00992         self.assertEqual(alignment.length, 5560)
00993         self.assertEqual(len(alignment.hsps), 1)
00994         self.assertTrue(alignment.hsps[0].expect > E_VALUE_THRESH)
00995 
00996         alignment = alignments[146]
00997         self.assertEqual(alignment.title[:50], "gi|71481981|ref|ZP_00661682.1| Twin-arginine trans")
00998         self.assertEqual(alignment.length, 69)
00999         self.assertEqual(len(alignment.hsps), 1)
01000         self.assertTrue(alignment.hsps[0].expect > E_VALUE_THRESH)
01001 
01002         alignment = alignments[147]
01003         self.assertEqual(alignment.title[:50], "gi|71150623|ref|ZP_00649545.1| Twin-arginine trans")
01004         self.assertEqual(alignment.length, 81)
01005         self.assertEqual(len(alignment.hsps), 1)
01006         self.assertTrue(alignment.hsps[0].expect > E_VALUE_THRESH)
01007 
01008         alignment = alignments[148]
01009         self.assertEqual(alignment.title[:50], "gi|20151563|gb|AAM11141.1| LD15253p [Drosophila me")
01010         self.assertEqual(alignment.length, 1521)
01011         self.assertEqual(len(alignment.hsps), 1)
01012         self.assertTrue(alignment.hsps[0].expect > E_VALUE_THRESH)
01013 
01014         alignment = alignments[149]
01015         self.assertEqual(alignment.title[:50], "gi|6979936|gb|AAF34661.1| split ends long isoform ")
01016         self.assertEqual(alignment.length, 5554)
01017         self.assertEqual(len(alignment.hsps), 1)
01018         self.assertTrue(alignment.hsps[0].expect > E_VALUE_THRESH)
01019 
01020         alignment = alignments[150]
01021         self.assertEqual(alignment.title[:50], "gi|6467825|gb|AAF13218.1| Spen RNP motif protein l")
01022         self.assertEqual(alignment.length, 5533)
01023         self.assertEqual(len(alignment.hsps), 1)
01024         self.assertTrue(alignment.hsps[0].expect > E_VALUE_THRESH)
01025 
01026         alignment = alignments[151]
01027         self.assertEqual(alignment.title[:50], "gi|61102013|ref|ZP_00377467.1| hypothetical protei")
01028         self.assertEqual(alignment.length, 80)
01029         self.assertEqual(len(alignment.hsps), 1)
01030         self.assertTrue(alignment.hsps[0].expect > E_VALUE_THRESH)
01031 
01032         alignment = alignments[152]
01033         self.assertEqual(alignment.title[:50], "gi|68056232|ref|ZP_00540361.1| Twin-arginine trans")
01034         self.assertEqual(alignment.length, 68)
01035         self.assertEqual(len(alignment.hsps), 1)
01036         self.assertTrue(alignment.hsps[0].expect > E_VALUE_THRESH)
01037 
01038         alignment = alignments[153]
01039         self.assertEqual(alignment.title[:50], "gi|68190120|gb|EAN04781.1| Twin-arginine transloca")
01040         self.assertEqual(alignment.length, 71)
01041         self.assertEqual(len(alignment.hsps), 1)
01042         self.assertTrue(alignment.hsps[0].expect > E_VALUE_THRESH)
01043 
01044         alignment = alignments[154]
01045         self.assertEqual(alignment.title[:50], "gi|15605663|ref|NP_213038.1| hypothetical protein ")
01046         self.assertEqual(alignment.length, 77)
01047         self.assertEqual(len(alignment.hsps), 1)
01048         self.assertTrue(alignment.hsps[0].expect > E_VALUE_THRESH)
01049 
01050         alignment = alignments[155]
01051         self.assertEqual(alignment.title[:50], "gi|60493413|emb|CAH08199.1| aerotolerance-related ")
01052         self.assertEqual(alignment.length, 238)
01053         self.assertEqual(len(alignment.hsps), 1)
01054         self.assertTrue(alignment.hsps[0].expect > E_VALUE_THRESH)
01055 
01056         alignment = alignments[156]
01057         self.assertEqual(alignment.title[:50], "gi|50877510|emb|CAG37350.1| related to Sec-indepen")
01058         self.assertEqual(alignment.length, 84)
01059         self.assertEqual(len(alignment.hsps), 1)
01060         self.assertTrue(alignment.hsps[0].expect > E_VALUE_THRESH)
01061 
01062         alignment = alignments[157]
01063         self.assertEqual(alignment.title[:50], "gi|42739647|gb|AAS43573.1| conserved domain protei")
01064         self.assertEqual(alignment.length, 236)
01065         self.assertEqual(len(alignment.hsps), 1)
01066         self.assertTrue(alignment.hsps[0].expect > E_VALUE_THRESH)
01067 
01068         alignment = alignments[158]
01069         self.assertEqual(alignment.title[:50], "gi|53713708|ref|YP_099700.1| conserved hypothetica")
01070         self.assertEqual(alignment.length, 238)
01071         self.assertEqual(len(alignment.hsps), 1)
01072         self.assertTrue(alignment.hsps[0].expect > E_VALUE_THRESH)
01073 
01074         alignment = alignments[159]
01075         self.assertEqual(alignment.title[:50], "gi|33860901|ref|NP_892462.1| mttA/Hcf106 family [P")
01076         self.assertEqual(alignment.length, 96)
01077         self.assertEqual(len(alignment.hsps), 1)
01078         self.assertTrue(alignment.hsps[0].expect > E_VALUE_THRESH)
01079 
01080         alignment = alignments[160]
01081         self.assertEqual(alignment.title[:50], "gi|48851224|ref|ZP_00305466.1| COG1826: Sec-indepe")
01082         self.assertEqual(alignment.length, 83)
01083         self.assertEqual(len(alignment.hsps), 1)
01084         self.assertTrue(alignment.hsps[0].expect > E_VALUE_THRESH)
01085 
01086         alignment = alignments[161]
01087         self.assertEqual(alignment.title[:50], "gi|67938449|ref|ZP_00530974.1| Twin-arginine trans")
01088         self.assertEqual(alignment.length, 69)
01089         self.assertEqual(len(alignment.hsps), 1)
01090         self.assertTrue(alignment.hsps[0].expect > E_VALUE_THRESH)
01091 
01092         alignment = alignments[162]
01093         self.assertEqual(alignment.title[:50], "gi|45657833|ref|YP_001919.1| sec-independent prote")
01094         self.assertEqual(alignment.length, 90)
01095         self.assertEqual(len(alignment.hsps), 1)
01096         self.assertTrue(alignment.hsps[0].expect > E_VALUE_THRESH)
01097 
01098         alignment = alignments[163]
01099         self.assertEqual(alignment.title[:50], "gi|57238048|ref|YP_179297.1| twin-arginine translo")
01100         self.assertEqual(alignment.length, 79)
01101         self.assertEqual(len(alignment.hsps), 1)
01102         self.assertTrue(alignment.hsps[0].expect > E_VALUE_THRESH)
01103 
01104         alignment = alignments[164]
01105         self.assertEqual(alignment.title[:50], "gi|56962648|ref|YP_174374.1| sec-independent prote")
01106         self.assertEqual(alignment.length, 63)
01107         self.assertEqual(len(alignment.hsps), 1)
01108         self.assertTrue(alignment.hsps[0].expect > E_VALUE_THRESH)
01109 
01110         alignment = alignments[165]
01111         self.assertEqual(alignment.title[:50], "gi|33239734|ref|NP_874676.1| Sec-independent prote")
01112         self.assertEqual(alignment.length, 84)
01113         self.assertEqual(len(alignment.hsps), 1)
01114         self.assertTrue(alignment.hsps[0].expect > E_VALUE_THRESH)
01115 
01116         alignment = alignments[166]
01117         self.assertEqual(alignment.title[:50], "gi|21674434|ref|NP_662499.1| Sec-independent prote")
01118         self.assertEqual(alignment.length, 67)
01119         self.assertEqual(len(alignment.hsps), 1)
01120         self.assertTrue(alignment.hsps[0].expect > E_VALUE_THRESH)
01121 
01122         alignment = alignments[167]
01123         self.assertEqual(alignment.title[:50], "gi|39968009|ref|XP_365395.1| hypothetical protein ")
01124         self.assertEqual(alignment.length, 823)
01125         self.assertEqual(len(alignment.hsps), 1)
01126         self.assertTrue(alignment.hsps[0].expect > E_VALUE_THRESH)
01127 
01128         alignment = alignments[168]
01129         self.assertEqual(alignment.title[:50], "gi|4877986|gb|AAD31523.1| THA9 [Zea mays]")
01130         self.assertEqual(alignment.length, 169)
01131         self.assertEqual(len(alignment.hsps), 1)
01132         self.assertTrue(alignment.hsps[0].expect > E_VALUE_THRESH)
01133 
01134         alignment = alignments[169]
01135         self.assertEqual(alignment.title[:50], "gi|67934419|ref|ZP_00527476.1| Twin-arginine trans")
01136         self.assertEqual(alignment.length, 56)
01137         self.assertEqual(len(alignment.hsps), 1)
01138         self.assertTrue(alignment.hsps[0].expect > E_VALUE_THRESH)
01139 
01140         alignment = alignments[170]
01141         self.assertEqual(alignment.title[:50], "gi|42523658|ref|NP_969038.1| twin-argine protein t")
01142         self.assertEqual(alignment.length, 79)
01143         self.assertEqual(len(alignment.hsps), 1)
01144         self.assertTrue(alignment.hsps[0].expect > E_VALUE_THRESH)
01145 
01146         alignment = alignments[171]
01147         self.assertEqual(alignment.title[:50], "gi|71546080|ref|ZP_00666945.1| Twin-arginine trans")
01148         self.assertEqual(alignment.length, 73)
01149         self.assertEqual(len(alignment.hsps), 1)
01150         self.assertTrue(alignment.hsps[0].expect > E_VALUE_THRESH)
01151 
01152         alignment = alignments[172]
01153         self.assertEqual(alignment.title[:50], "gi|68002197|ref|ZP_00534828.1| Twin-arginine trans")
01154         self.assertEqual(alignment.length, 60)
01155         self.assertEqual(len(alignment.hsps), 1)
01156         self.assertTrue(alignment.hsps[0].expect > E_VALUE_THRESH)
01157 
01158         alignment = alignments[173]
01159         self.assertEqual(alignment.title[:50], "gi|67481641|ref|XP_656170.1| hypothetical protein ")
01160         self.assertEqual(alignment.length, 434)
01161         self.assertEqual(len(alignment.hsps), 1)
01162         self.assertTrue(alignment.hsps[0].expect > E_VALUE_THRESH)
01163 
01164         alignment = alignments[174]
01165         self.assertEqual(alignment.title[:50], "gi|50935447|ref|XP_477251.1| putative Calreticulin")
01166         self.assertEqual(alignment.length, 424)
01167         self.assertEqual(len(alignment.hsps), 1)
01168         self.assertTrue(alignment.hsps[0].expect > E_VALUE_THRESH)
01169 
01170         alignment = alignments[175]
01171         self.assertEqual(alignment.title[:50], "gi|50978634|ref|NP_001003013.1| acidic (leucine-ri")
01172         self.assertEqual(alignment.length, 249)
01173         self.assertEqual(len(alignment.hsps), 1)
01174         self.assertTrue(alignment.hsps[0].expect > E_VALUE_THRESH)
01175 
01176         alignment = alignments[176]
01177         self.assertEqual(alignment.title[:50], "gi|70936814|ref|XP_739300.1| 40S ribosomal subunit")
01178         self.assertEqual(alignment.length, 184)
01179         self.assertEqual(len(alignment.hsps), 1)
01180         self.assertTrue(alignment.hsps[0].expect > E_VALUE_THRESH)
01181 
01182         alignment = alignments[177]
01183         self.assertEqual(alignment.title[:50], "gi|68075857|ref|XP_679848.1| hypothetical protein ")
01184         self.assertEqual(alignment.length, 340)
01185         self.assertEqual(len(alignment.hsps), 1)
01186         self.assertTrue(alignment.hsps[0].expect > E_VALUE_THRESH)
01187 
01188         alignment = alignments[178]
01189         self.assertEqual(alignment.title[:50], "gi|39594005|emb|CAE70115.1| Hypothetical protein C")
01190         self.assertEqual(alignment.length, 192)
01191         self.assertEqual(len(alignment.hsps), 1)
01192         self.assertTrue(alignment.hsps[0].expect > E_VALUE_THRESH)
01193 
01194         alignment = alignments[179]
01195         self.assertEqual(alignment.title[:50], "gi|66809957|ref|XP_638702.1| hypothetical protein ")
01196         self.assertEqual(alignment.length, 721)
01197         self.assertEqual(len(alignment.hsps), 1)
01198         self.assertTrue(alignment.hsps[0].expect > E_VALUE_THRESH)
01199 
01200         alignment = alignments[180]
01201         self.assertEqual(alignment.title[:50], "gi|68550463|ref|ZP_00589911.1| Twin-arginine trans")
01202         self.assertEqual(alignment.length, 69)
01203         self.assertEqual(len(alignment.hsps), 1)
01204         self.assertTrue(alignment.hsps[0].expect > E_VALUE_THRESH)
01205 
01206         alignment = alignments[181]
01207         self.assertEqual(alignment.title[:50], "gi|51473916|ref|YP_067673.1| TatA/E-like Sec-indep")
01208         self.assertEqual(alignment.length, 53)
01209         self.assertEqual(len(alignment.hsps), 1)
01210         self.assertTrue(alignment.hsps[0].expect > E_VALUE_THRESH)
01211 
01212         alignment = alignments[182]
01213         self.assertEqual(alignment.title[:50], "gi|61857708|ref|XP_612559.1| PREDICTED: similar to")
01214         self.assertEqual(alignment.length, 236)
01215         self.assertEqual(len(alignment.hsps), 1)
01216         self.assertTrue(alignment.hsps[0].expect > E_VALUE_THRESH)
01217 
01218         alignment = alignments[183]
01219         self.assertEqual(alignment.title[:50], "gi|39982651|gb|AAR34111.1| twin-arginine transloca")
01220         self.assertEqual(alignment.length, 59)
01221         self.assertEqual(len(alignment.hsps), 1)
01222         self.assertTrue(alignment.hsps[0].expect > E_VALUE_THRESH)
01223 
01224         alignment = alignments[184]
01225         self.assertEqual(alignment.title[:50], "gi|50877509|emb|CAG37349.1| related to Sec-indepen")
01226         self.assertEqual(alignment.length, 66)
01227         self.assertEqual(len(alignment.hsps), 1)
01228         self.assertTrue(alignment.hsps[0].expect > E_VALUE_THRESH)
01229 
01230         alignment = alignments[185]
01231         self.assertEqual(alignment.title[:50], "gi|52699323|ref|ZP_00340731.1| COG1826: Sec-indepe")
01232         self.assertEqual(alignment.length, 53)
01233         self.assertEqual(len(alignment.hsps), 1)
01234         self.assertTrue(alignment.hsps[0].expect > E_VALUE_THRESH)
01235 
01236         alignment = alignments[186]
01237         self.assertEqual(alignment.title[:50], "gi|62426215|ref|ZP_00381343.1| COG1826: Sec-indepe")
01238         self.assertEqual(alignment.length, 93)
01239         self.assertEqual(len(alignment.hsps), 1)
01240         self.assertTrue(alignment.hsps[0].expect > E_VALUE_THRESH)
01241 
01242         alignment = alignments[187]
01243         self.assertEqual(alignment.title[:50], "gi|11131838|sp|Q9SLY8|CRTC_ORYSA Calreticulin prec")
01244         self.assertEqual(alignment.length, 424)
01245         self.assertEqual(len(alignment.hsps), 1)
01246         self.assertTrue(alignment.hsps[0].expect > E_VALUE_THRESH)
01247 
01248         alignment = alignments[188]
01249         self.assertEqual(alignment.title[:50], "gi|56543690|gb|AAV89844.1| Sec-independent protein")
01250         self.assertEqual(alignment.length, 87)
01251         self.assertEqual(len(alignment.hsps), 1)
01252         self.assertTrue(alignment.hsps[0].expect > E_VALUE_THRESH)
01253 
01254         alignment = alignments[189]
01255         self.assertEqual(alignment.title[:50], "gi|67923730|ref|ZP_00517196.1| Twin-arginine trans")
01256         self.assertEqual(alignment.length, 95)
01257         self.assertEqual(len(alignment.hsps), 1)
01258         self.assertTrue(alignment.hsps[0].expect > E_VALUE_THRESH)
01259 
01260         alignment = alignments[190]
01261         self.assertEqual(alignment.title[:50], "gi|67462585|ref|XP_647954.1| hypothetical protein ")
01262         self.assertEqual(alignment.length, 140)
01263         self.assertEqual(len(alignment.hsps), 1)
01264         self.assertTrue(alignment.hsps[0].expect > E_VALUE_THRESH)
01265 
01266         alignment = alignments[191]
01267         self.assertEqual(alignment.title[:50], "gi|51970620|dbj|BAD44002.1| unknown protein [Arabi")
01268         self.assertEqual(alignment.length, 784)
01269         self.assertEqual(len(alignment.hsps), 1)
01270         self.assertTrue(alignment.hsps[0].expect > E_VALUE_THRESH)
01271 
01272         alignment = alignments[192]
01273         self.assertEqual(alignment.title[:50], "gi|34581241|ref|ZP_00142721.1| hypothetical protei")
01274         self.assertEqual(alignment.length, 53)
01275         self.assertEqual(len(alignment.hsps), 1)
01276         self.assertTrue(alignment.hsps[0].expect > E_VALUE_THRESH)
01277 
01278         alignment = alignments[193]
01279         self.assertEqual(alignment.title[:50], "gi|4877984|gb|AAD31522.1| THA4 [Zea mays]")
01280         self.assertEqual(alignment.length, 170)
01281         self.assertEqual(len(alignment.hsps), 1)
01282         self.assertTrue(alignment.hsps[0].expect > E_VALUE_THRESH)
01283 
01284         alignment = alignments[194]
01285         self.assertEqual(alignment.title[:50], "gi|9757886|dbj|BAB08393.1| unnamed protein product")
01286         self.assertEqual(alignment.length, 707)
01287         self.assertEqual(len(alignment.hsps), 1)
01288         self.assertTrue(alignment.hsps[0].expect > E_VALUE_THRESH)
01289 
01290         alignment = alignments[195]
01291         self.assertEqual(alignment.title[:50], "gi|32422107|ref|XP_331497.1| predicted protein [Ne")
01292         self.assertEqual(alignment.length, 216)
01293         self.assertEqual(len(alignment.hsps), 1)
01294         self.assertTrue(alignment.hsps[0].expect > E_VALUE_THRESH)
01295 
01296         alignment = alignments[196]
01297         self.assertEqual(alignment.title[:50], "gi|68552035|ref|ZP_00591428.1| Twin-arginine trans")
01298         self.assertEqual(alignment.length, 70)
01299         self.assertEqual(len(alignment.hsps), 1)
01300         self.assertTrue(alignment.hsps[0].expect > E_VALUE_THRESH)
01301 
01302         alignment = alignments[197]
01303         self.assertEqual(alignment.title[:50], "gi|68177649|ref|ZP_00550794.1| Twin-arginine trans")
01304         self.assertEqual(alignment.length, 58)
01305         self.assertEqual(len(alignment.hsps), 1)
01306         self.assertTrue(alignment.hsps[0].expect > E_VALUE_THRESH)
01307 
01308         alignment = alignments[198]
01309         self.assertEqual(alignment.title[:50], "gi|67934756|ref|ZP_00527782.1| Twin-arginine trans")
01310         self.assertEqual(alignment.length, 65)
01311         self.assertEqual(len(alignment.hsps), 1)
01312         self.assertTrue(alignment.hsps[0].expect > E_VALUE_THRESH)
01313 
01314         alignment = alignments[199]
01315         self.assertEqual(alignment.title[:50], "gi|42550455|gb|EAA73298.1| hypothetical protein FG")
01316         self.assertEqual(alignment.length, 297)
01317         self.assertEqual(len(alignment.hsps), 1)
01318         self.assertTrue(alignment.hsps[0].expect > E_VALUE_THRESH)
01319 
01320         alignment = alignments[200]
01321         self.assertEqual(alignment.title[:50], "gi|15893083|ref|NP_360797.1| hypothetical protein ")
01322         self.assertEqual(alignment.length, 53)
01323         self.assertEqual(len(alignment.hsps), 1)
01324         self.assertTrue(alignment.hsps[0].expect > E_VALUE_THRESH)
01325 
01326         alignment = alignments[201]
01327         self.assertEqual(alignment.title[:50], "gi|57233621|ref|YP_182297.1| twin-arginine translo")
01328         self.assertEqual(alignment.length, 65)
01329         self.assertEqual(len(alignment.hsps), 1)
01330         self.assertTrue(alignment.hsps[0].expect > E_VALUE_THRESH)
01331 
01332         alignment = alignments[202]
01333         self.assertEqual(alignment.title[:50], "gi|75908036|ref|YP_322332.1| Twin-arginine translo")
01334         self.assertEqual(alignment.length, 56)
01335         self.assertEqual(len(alignment.hsps), 1)
01336         self.assertTrue(alignment.hsps[0].expect > E_VALUE_THRESH)
01337 
01338         alignment = alignments[203]
01339         self.assertEqual(alignment.title[:50], "gi|72383453|ref|YP_292808.1| Twin-arginine translo")
01340         self.assertEqual(alignment.length, 71)
01341         self.assertEqual(len(alignment.hsps), 1)
01342         self.assertTrue(alignment.hsps[0].expect > E_VALUE_THRESH)
01343 
01344         alignment = alignments[204]
01345         self.assertEqual(alignment.title[:50], "gi|1666185|emb|CAB04766.1| ORF13(1) [Rhodococcus e")
01346         self.assertEqual(alignment.length, 98)
01347         self.assertEqual(len(alignment.hsps), 1)
01348         self.assertTrue(alignment.hsps[0].expect > E_VALUE_THRESH)
01349 
01350         alignment = alignments[205]
01351         self.assertEqual(alignment.title[:50], "gi|72138252|ref|XP_800288.1| PREDICTED: hypothetic")
01352         self.assertEqual(alignment.length, 946)
01353         self.assertEqual(len(alignment.hsps), 1)
01354         self.assertTrue(alignment.hsps[0].expect > E_VALUE_THRESH)
01355 
01356         alignment = alignments[206]
01357         self.assertEqual(alignment.title[:50], "gi|67923190|ref|ZP_00516678.1| Twin-arginine trans")
01358         self.assertEqual(alignment.length, 50)
01359         self.assertEqual(len(alignment.hsps), 1)
01360         self.assertTrue(alignment.hsps[0].expect > E_VALUE_THRESH)
01361 
01362         alignment = alignments[207]
01363         self.assertEqual(alignment.title[:50], "gi|3329623|gb|AAC26930.1| Hypothetical protein F36")
01364         self.assertEqual(alignment.length, 335)
01365         self.assertEqual(len(alignment.hsps), 1)
01366         self.assertTrue(alignment.hsps[0].expect > E_VALUE_THRESH)
01367 
01368         alignment = alignments[208]
01369         self.assertEqual(alignment.title[:50], "gi|39597929|emb|CAE68621.1| Hypothetical protein C")
01370         self.assertEqual(alignment.length, 2691)
01371         self.assertEqual(len(alignment.hsps), 1)
01372         self.assertTrue(alignment.hsps[0].expect > E_VALUE_THRESH)
01373 
01374         alignment = alignments[209]
01375         self.assertEqual(alignment.title[:50], "gi|68182025|ref|ZP_00555006.1| hypothetical protei")
01376         self.assertEqual(alignment.length, 438)
01377         self.assertEqual(len(alignment.hsps), 1)
01378         self.assertTrue(alignment.hsps[0].expect > E_VALUE_THRESH)
01379 
01380         alignment = alignments[210]
01381         self.assertEqual(alignment.title[:50], "gi|21204492|dbj|BAB95189.1| ebh [Staphylococcus au")
01382         self.assertEqual(alignment.length, 9904)
01383         self.assertEqual(len(alignment.hsps), 1)
01384         self.assertTrue(alignment.hsps[0].expect > E_VALUE_THRESH)
01385 
01386         alignment = alignments[211]
01387         self.assertEqual(alignment.title[:50], "gi|39593039|emb|CAE64508.1| Hypothetical protein C")
01388         self.assertEqual(alignment.length, 960)
01389         self.assertEqual(len(alignment.hsps), 1)
01390         self.assertTrue(alignment.hsps[0].expect > E_VALUE_THRESH)
01391 
01392         self.assertRaises(StopIteration, records.next)
01393         handle.close()
01394 
01395         handle = open(datafile)
01396         record = NCBIXML.read(handle)
01397         handle.close()
01398 
01399     def test_xbt002(self):
01400         "Parsing BLASTN 2.2.12, gi|1348916|gb|G26684.1|G26684 (xbt002)"
01401 
01402         filename = 'xbt002.xml'
01403         datafile = os.path.join("Blast", filename)
01404         handle = open(datafile)
01405         records = NCBIXML.parse(handle)
01406         record = records.next()
01407         alignments = record.alignments
01408 
01409         self.assertEqual(record.query_id, "gi|1348916|gb|G26684.1|G26684")
01410         self.assertEqual(len(alignments), 2)
01411         self.assertEqual(sum([len(a.hsps) for a in alignments]), 2)
01412         self.assertEqual(alignments[0].title[:50], "gi|9950606|gb|AE004854.1| Pseudomonas aeruginosa P")
01413         self.assertEqual(alignments[0].length, 11884)
01414         self.assertEqual(len(alignments[0].hsps), 1)
01415         self.assertTrue(alignments[0].hsps[0].expect > E_VALUE_THRESH)
01416         self.assertEqual(alignments[1].title[:50], "gi|15073988|emb|AL591786.1|SME591786 Sinorhizobium")
01417         self.assertEqual(alignments[1].length, 299350)
01418         self.assertEqual(len(alignments[1].hsps), 1)
01419         self.assertTrue(alignments[1].hsps[0].expect > E_VALUE_THRESH)
01420 
01421         self.assertRaises(StopIteration, records.next)
01422         handle.close()
01423 
01424         handle = open(datafile)
01425         record = NCBIXML.read(handle)
01426         handle.close()
01427 
01428     def test_xbt003(self):
01429         "Parsing BLASTX 2.2.12, gi|1347369|gb|G25137.1|G25137 (xbt003)"
01430 
01431         filename = 'xbt003.xml'
01432         datafile = os.path.join("Blast", filename)
01433 
01434         handle = open(datafile)
01435         records = NCBIXML.parse(handle)
01436         record = records.next()
01437         alignments = record.alignments
01438         self.assertEqual(record.query_id, "gi|1347369|gb|G25137.1|G25137")
01439         self.assertEqual(len(alignments), 78)
01440         self.assertEqual(sum([len(a.hsps) for a in alignments]), 84)
01441         self.assertRaises(StopIteration, records.next)
01442         handle.close()
01443 
01444         handle = open(datafile)
01445         record = NCBIXML.read(handle)
01446         handle.close()
01447 
01448     def test_xbt004(self):
01449         "Parsing TBLASTN 2.2.12, gi|729325|sp|P39483|DHG2_BACME (xbt004)"
01450 
01451         filename = 'xbt004.xml'
01452         datafile = os.path.join("Blast", filename)
01453 
01454         handle = open(datafile)
01455         records = NCBIXML.parse(handle)
01456         record = records.next()
01457         alignments = record.alignments
01458         self.assertEqual(record.query_id, "gi|729325|sp|P39483|DHG2_BACME")
01459         self.assertEqual(len(alignments), 100)
01460         self.assertEqual(sum([len(a.hsps) for a in alignments]), 127)
01461         self.assertRaises(StopIteration, records.next)
01462         handle.close()
01463 
01464         handle = open(datafile)
01465         record = NCBIXML.read(handle)
01466         handle.close()
01467 
01468     def test_xbt005(self):
01469         "Parsing TBLASTX 2.2.12, gi|1348853|gb|G26621.1|G26621, BLOSUM80 (xbt005)"
01470 
01471         filename = 'xbt005.xml'
01472         datafile = os.path.join("Blast", filename)
01473 
01474         handle = open(datafile)
01475         records = NCBIXML.parse(handle)
01476         record = records.next()
01477         alignments = record.alignments
01478         self.assertEqual(record.query_id, "gi|1348853|gb|G26621.1|G26621")
01479         self.assertEqual(len(alignments), 10)
01480         self.assertEqual(sum([len(a.hsps) for a in alignments]), 102)
01481         self.assertRaises(StopIteration, records.next)
01482         handle.close()
01483 
01484         handle = open(datafile)
01485         record = NCBIXML.read(handle)
01486         handle.close()
01487 
01488     def test_xbt006(self):
01489         "Parsing BLASTP 2.2.18+, gi|160837788|ref|NP_075631.2| (xbt006)"
01490         # NOTE - no date in version field, downloaded 2008/05/08
01491 
01492         filename = 'xbt006.xml'
01493         datafile = os.path.join("Blast", filename)
01494 
01495         handle = open(datafile)
01496         records = NCBIXML.parse(handle)
01497 
01498         record = records.next()
01499         alignments = record.alignments
01500         self.assertEqual(record.query_id, "31493")
01501         self.assertEqual(len(alignments), 10)
01502         self.assertEqual(sum([len(a.hsps) for a in alignments]), 14)
01503         self.assertEqual(alignments[0].title[:50], "gi|151942244|gb|EDN60600.1| cytosolic iron-sulfur ")
01504         self.assertEqual(alignments[0].length, 330)
01505         self.assertEqual(len(alignments[0].hsps), 1)
01506         self.assertTrue(alignments[0].hsps[0].expect > E_VALUE_THRESH)
01507         self.assertEqual(alignments[1].title[:50], "gi|476059|emb|CAA55606.1| YBR0832 [Saccharomyces c")
01508         self.assertEqual(alignments[1].length, 535)
01509         self.assertEqual(len(alignments[1].hsps), 1)
01510         self.assertTrue(alignments[1].hsps[0].expect > E_VALUE_THRESH)
01511         self.assertEqual(alignments[2].title[:50], "gi|6320473|ref|NP_010553.1| Essential protein invo")
01512         self.assertEqual(alignments[2].length, 330)
01513         self.assertEqual(len(alignments[2].hsps), 1)
01514         self.assertTrue(alignments[2].hsps[0].expect > E_VALUE_THRESH)
01515         self.assertEqual(alignments[3].title[:50], "gi|61679798|pdb|1R5M|A Chain A, Crystal Structure ")
01516         self.assertEqual(alignments[3].length, 425)
01517         self.assertEqual(len(alignments[3].hsps), 1)
01518         self.assertTrue(alignments[3].hsps[0].expect > E_VALUE_THRESH)
01519         self.assertEqual(alignments[4].title[:50], "gi|6319579|ref|NP_009661.1| WD40 repeat-containing")
01520         self.assertEqual(alignments[4].length, 535)
01521         self.assertEqual(len(alignments[4].hsps), 1)
01522         self.assertTrue(alignments[4].hsps[0].expect > E_VALUE_THRESH)
01523         self.assertEqual(alignments[5].title[:50], "gi|151946495|gb|EDN64717.1| Sir4p-interacting fact")
01524         self.assertEqual(alignments[5].length, 535)
01525         self.assertEqual(len(alignments[5].hsps), 1)
01526         self.assertTrue(alignments[5].hsps[0].expect > E_VALUE_THRESH)
01527         self.assertEqual(alignments[6].title[:50], "gi|151943708|gb|EDN62018.1| nuclear pore complex s")
01528         self.assertEqual(alignments[6].length, 349)
01529         self.assertEqual(len(alignments[6].hsps), 2)
01530         self.assertTrue(alignments[6].hsps[0].expect > E_VALUE_THRESH)
01531         self.assertTrue(alignments[6].hsps[1].expect > E_VALUE_THRESH)
01532         self.assertEqual(alignments[7].title[:50], "gi|151567866|pdb|2PM7|B Chain B, Crystal Structure")
01533         self.assertEqual(alignments[7].length, 297)
01534         self.assertEqual(len(alignments[7].hsps), 2)
01535         self.assertTrue(alignments[7].hsps[0].expect > E_VALUE_THRESH)
01536         self.assertTrue(alignments[7].hsps[1].expect > E_VALUE_THRESH)
01537         self.assertEqual(alignments[8].title[:50], "gi|6321338|ref|NP_011415.1| Nuclear pore protein t")
01538         self.assertEqual(alignments[8].length, 349)
01539         self.assertEqual(len(alignments[8].hsps), 2)
01540         self.assertTrue(alignments[8].hsps[0].expect > E_VALUE_THRESH)
01541         self.assertTrue(alignments[8].hsps[1].expect > E_VALUE_THRESH)
01542         self.assertEqual(alignments[9].title[:50], "gi|151567870|pdb|2PM9|B Chain B, Crystal Structure")
01543         self.assertEqual(alignments[9].length, 297)
01544         self.assertEqual(len(alignments[9].hsps), 2)
01545         self.assertTrue(alignments[9].hsps[0].expect > E_VALUE_THRESH)
01546         self.assertTrue(alignments[9].hsps[1].expect > E_VALUE_THRESH)
01547 
01548         self.assertRaises(StopIteration, records.next)
01549         handle.close()
01550 
01551         handle = open(datafile)
01552         record = NCBIXML.read(handle)
01553         handle.close()
01554 
01555     def test_xbt007(self):
01556         "Parsing BLASTP 2.2.18+, SwissProt Q08386 and P07175, no hits (xbt007)"
01557 
01558         filename = 'xbt007.xml'
01559         datafile = os.path.join("Blast", filename)
01560         handle = open(datafile)
01561         records = NCBIXML.parse(handle)
01562         record = records.next()
01563         self.assertEqual(record.query_id, "gi|585505|sp|Q08386|MOPB_RHOCA")
01564         alignments = record.alignments
01565         self.assertEqual(len(record.alignments), 0)
01566         record = records.next()
01567         self.assertEqual(record.query_id, "gi|129628|sp|P07175.1|PARA_AGRTU")
01568         self.assertEqual(len(record.alignments), 0)
01569         self.assertRaises(StopIteration, records.next)
01570         handle.close()
01571 
01572     def test_xbt008(self):
01573         "Parsing BLASTP 2.2.18, Fake query (xbt008)"
01574 
01575         filename = 'xbt008.xml'
01576         datafile = os.path.join("Blast", filename)
01577 
01578         handle = open(datafile)
01579         records = NCBIXML.parse(handle)
01580         record = records.next()
01581         self.assertEqual(record.query_id, "lcl|1_0")
01582         alignments = record.alignments
01583         self.assertEqual(len(alignments), 0)
01584         self.assertRaises(StopIteration, records.next)
01585         handle.close()
01586 
01587         handle = open(datafile)
01588         record = NCBIXML.read(handle)
01589         handle.close()
01590 
01591     def test_xbt009(self):
01592         "Parsing BLASTX 2.2.22+, multiple queries against NR (xbt009)"
01593         #See also plain text file bt081.txt (matching output from blastx tool)
01594 
01595         filename = 'xbt009.xml'
01596         datafile = os.path.join("Blast", filename)
01597 
01598         handle = open(datafile)
01599         records = NCBIXML.parse(handle)
01600 
01601         record = records.next()
01602         self.assertEqual(record.application, "BLASTX")
01603         self.assertEqual(record.version, '2.2.22+')
01604         self.assertEqual(record.date, "")
01605         self.assertEqual(record.query, "gi|4104054|gb|AH007193.1|SEG_CVIGS Centaurea vallesiaca 18S ribosomal RNA gene, partial sequence")
01606         self.assertEqual(record.query_letters, 1002)
01607         self.assertEqual(record.database, "nr")
01608         self.assertEqual(record.num_sequences_in_database, 8994603)
01609         self.assertEqual(record.database_sequences, 8994603)
01610         #self.assertEqual(record.database_length, 3078807967)
01611         self.assertEqual(record.database_length, -1216159329) #NCBI bug!
01612         self.assertEqual(len(record.descriptions), 1)
01613         self.assertEqual(len(record.alignments), 1)
01614         self.assertEqual(len(record.alignments[0].hsps), 1)
01615 
01616         record = records.next()
01617         self.assertEqual(record.application, "BLASTX")
01618         self.assertEqual(record.version, '2.2.22+')
01619         self.assertEqual(record.date, "")
01620         self.assertEqual(record.query, "gi|4218935|gb|AF074388.1|AF074388 Sambucus nigra hevein-like protein HLPf gene, partial cds")
01621         self.assertEqual(record.query_letters, 2050)
01622         self.assertEqual(record.database, "nr")
01623         self.assertEqual(record.num_sequences_in_database, 8994603)
01624         self.assertEqual(record.database_sequences, 8994603)
01625         #self.assertEqual(record.database_length, 3078807967)
01626         self.assertEqual(record.database_length, -1216159329) #NCBI bug!
01627         # I used -num_descriptions 10 and -num_alignments 1
01628         self.assertEqual(len(record.descriptions), 10)
01629         self.assertEqual(len(record.alignments), 10)
01630         self.assertEqual(len(record.alignments[0].hsps), 2)
01631         self.assertEqual(len(record.alignments[1].hsps), 2)
01632         self.assertEqual(len(record.alignments[9].hsps), 2)
01633         
01634         record = records.next()
01635         self.assertEqual(record.application, "BLASTX")
01636         self.assertEqual(record.version, '2.2.22+')
01637         self.assertEqual(record.date, "")
01638         self.assertEqual(record.query, "gi|5690369|gb|AF158246.1|AF158246 Cricetulus griseus glucose phosphate isomerase (GPI) gene, partial intron sequence")
01639         self.assertEqual(record.query_letters, 550)
01640         self.assertEqual(record.database, "nr")
01641         self.assertEqual(record.num_sequences_in_database, 8994603)
01642         self.assertEqual(record.database_sequences, 8994603)
01643         #self.assertEqual(record.database_length, 3078807967)
01644         self.assertEqual(record.database_length, -1216159329) #NCBI bug!
01645         self.assertEqual(len(record.descriptions), 0)
01646         self.assertEqual(len(record.alignments), 0)
01647 
01648         record = records.next()
01649         self.assertEqual(record.application, "BLASTX")
01650         self.assertEqual(record.version, '2.2.22+')
01651         self.assertEqual(record.date, "")
01652         self.assertEqual(record.query, "gi|5049839|gb|AI730987.1|AI730987 BNLGHi8354 Six-day Cotton fiber Gossypium hirsutum cDNA 5' similar to TUBULIN BETA-1 CHAIN gi|486734|pir|S35142 tubulin beta chain - white lupine gi|402636 (X70184) Beta tubulin 1 [Lupinus albus], mRNA sequence")
01653         self.assertEqual(record.query_letters, 655)
01654         self.assertEqual(record.database, "nr")
01655         self.assertEqual(record.num_sequences_in_database, 8994603)
01656         self.assertEqual(record.database_sequences, 8994603)
01657         #self.assertEqual(record.database_length, 3078807967)
01658         self.assertEqual(record.database_length, -1216159329) #NCBI bug!
01659         self.assertEqual(len(record.descriptions), 10)
01660         self.assertEqual(len(record.alignments), 10)
01661         self.assertEqual(len(record.alignments[0].hsps), 1)
01662         self.assertEqual(len(record.alignments[9].hsps), 1)
01663 
01664         record = records.next()
01665         self.assertEqual(record.application, "BLASTX")
01666         self.assertEqual(record.version, '2.2.22+')
01667         self.assertEqual(record.date, "")
01668         self.assertEqual(record.query, "gi|5052071|gb|AF067555.1|AF067555 Phlox stansburyi internal transcribed spacer 1, 5.8S ribosomal RNA gene, and internal transcribed spacer 2, complete sequence")
01669         self.assertEqual(record.query_letters, 623)
01670         self.assertEqual(record.database, "nr")
01671         self.assertEqual(record.num_sequences_in_database, 8994603)
01672         self.assertEqual(record.database_sequences, 8994603)
01673         #self.assertEqual(record.database_length, 3078807967)
01674         self.assertEqual(record.database_length, -1216159329) #NCBI bug!
01675         self.assertEqual(len(record.descriptions), 10)
01676         self.assertEqual(len(record.alignments), 10)
01677         self.assertEqual(len(record.alignments[0].hsps), 2)
01678         self.assertEqual(len(record.alignments[9].hsps), 1)
01679 
01680         record = records.next()
01681         self.assertEqual(record.application, "BLASTX")
01682         self.assertEqual(record.version, '2.2.22+')
01683         self.assertEqual(record.date, "")
01684         self.assertEqual(record.query, "gi|3176602|gb|U78617.1|LOU78617 Lathyrus odoratus phytochrome A (PHYA) gene, partial cds")
01685         self.assertEqual(record.query_letters, 309)
01686         self.assertEqual(record.database, "nr")
01687         self.assertEqual(record.num_sequences_in_database, 8994603)
01688         self.assertEqual(record.database_sequences, 8994603)
01689         #self.assertEqual(record.database_length, 3078807967)
01690         self.assertEqual(record.database_length, -1216159329) #NCBI bug!
01691         self.assertEqual(len(record.descriptions), 10)
01692         self.assertEqual(len(record.alignments), 10)
01693         self.assertEqual(len(record.alignments[0].hsps), 1)
01694         self.assertEqual(len(record.alignments[9].hsps), 1)
01695 
01696         record = records.next()
01697         self.assertEqual(record.application, "BLASTX")
01698         self.assertEqual(record.version, '2.2.22+')
01699         self.assertEqual(record.date, "")
01700         self.assertEqual(record.query, "gi|5817701|gb|AF142731.1|AF142731 Wisteria frutescens maturase-like protein (matK) gene, complete cds; chloroplast gene for chloroplast product")
01701         self.assertEqual(record.query_letters, 2551)
01702         self.assertEqual(record.database, "nr")
01703         self.assertEqual(record.num_sequences_in_database, 8994603)
01704         self.assertEqual(record.database_sequences, 8994603)
01705         #self.assertEqual(record.database_length, 3078807967)
01706         self.assertEqual(record.database_length, -1216159329) #NCBI bug!
01707         self.assertEqual(len(record.descriptions), 10)
01708         self.assertEqual(len(record.alignments), 10)
01709         self.assertEqual(len(record.alignments[0].hsps), 1)
01710         self.assertEqual(len(record.alignments[9].hsps), 1)
01711 
01712         self.assertRaises(StopIteration, records.next)
01713         handle.close()
01714 
01715     def test_xbt010(self):
01716         "Parsing BLASTP 2.2.22+, multiple queries against NR (xbt010)"
01717         #This is from blastp NOT blastall
01718 
01719         filename = 'xbt010.xml'
01720         datafile = os.path.join("Blast", filename)
01721 
01722         handle = open(datafile)
01723         records = NCBIXML.parse(handle)
01724 
01725         record = records.next()
01726         self.assertEqual(record.application, "BLASTP")
01727         self.assertEqual(record.version, '2.2.22+')
01728         self.assertEqual(record.date, "")
01729         self.assertEqual(record.query, "gi|3298468|dbj|BAA31520.1| SAMIPF")
01730         self.assertEqual(record.query_letters, 107)
01731         self.assertEqual(record.database, "nr")
01732         self.assertEqual(record.num_sequences_in_database, 8994603)
01733         self.assertEqual(record.database_sequences, 8994603)
01734         #self.assertEqual(record.database_length, 3078807967)
01735         self.assertEqual(record.database_length, -1216159329) #NCBI bug!
01736         self.assertEqual(len(record.descriptions), 10)
01737         self.assertEqual(len(record.alignments), 10)
01738         self.assertEqual(len(record.alignments[0].hsps), 1)
01739 
01740         record = records.next()
01741         self.assertEqual(record.query, "gi|2781234|pdb|1JLY|B Chain B, Crystal Structure Of Amaranthus Caudatus Agglutinin")
01742         self.assertEqual(record.query_letters, 304)
01743 
01744         record = records.next()
01745         self.assertEqual(record.query, "gi|4959044|gb|AAD34209.1|AF069992_1 LIM domain interacting RING finger protein")
01746         self.assertEqual(record.query_letters, 600)
01747 
01748         record = records.next()
01749         self.assertEqual(record.query, "gi|671626|emb|CAA85685.1| rubisco large subunit")
01750         self.assertEqual(record.query_letters, 473)
01751 
01752         self.assertRaises(StopIteration, records.next)
01753         handle.close()
01754 
01755     def test_xbt011(self):
01756         "Parsing PSI-BLASTP 2.2.18, single query which converges in 3 iterations (xbt011)"
01757         #This is from old pgpblast command line tool, NOT new psiblast
01758         #NOTE - The parser currently returns three BLAST record objects.
01759         #The old text parser would return a single PSI BLAST record object with three rounds.
01760         #This may change... although it may require a PSI BLAST specific XML parser.
01761 
01762         filename = 'xbt011.xml'
01763         datafile = os.path.join("Blast", filename)
01764 
01765         handle = open(datafile)
01766         records = NCBIXML.parse(handle)
01767 
01768         record = records.next()
01769         self.assertEqual(record.application, "BLASTP")
01770         self.assertEqual(record.version, '2.2.18')
01771         self.assertEqual(record.date, "Mar-02-2008")
01772         self.assertEqual(record.query, "tr|Q3V4Q3|Q3V4Q3_9VIRU")
01773         self.assertEqual(record.query_letters, 131)
01774         self.assertEqual(record.database, "/opt/BlastDBs/nr")
01775         self.assertEqual(record.num_sequences_in_database, 2563094)
01776         self.assertEqual(record.database_sequences, 2563094)
01777         self.assertEqual(record.database_length, 864488805)
01778         self.assertEqual(len(record.descriptions), 11)
01779         self.assertEqual(len(record.alignments), 11)
01780         self.assertEqual(len(record.alignments[0].hsps), 1)
01781         hsp = record.alignments[0].hsps[0]
01782         self.assertEqual(hsp.align_length, 131)
01783         self.assertEqual(hsp.identities, 131)
01784         self.assertEqual(hsp.positives, 131)
01785         self.assertEqual(hsp.query, "MAKYEPKKGDYAGGAVKILDMFENGQLGYPEVTLKLAGEEANARRAGDERTKEAIHAIVKMISDAMKPYRNKGSGFQSQPIPGEVIAQVTSNPEYQQAKAFLASPATQVRNIEREEVLSKGAKKLAQAMAS")
01786         self.assertEqual(hsp.sbjct, "MAKYEPKKGDYAGGAVKILDMFENGQLGYPEVTLKLAGEEANARRAGDERTKEAIHAIVKMISDAMKPYRNKGSGFQSQPIPGEVIAQVTSNPEYQQAKAFLASPATQVRNIEREEVLSKGAKKLAQAMAS")
01787         self.assertEqual(hsp.match, "MAKYEPKKGDYAGGAVKILDMFENGQLGYPEVTLKLAGEEANARRAGDERTKEAIHAIVKMISDAMKPYRNKGSGFQSQPIPGEVIAQVTSNPEYQQAKAFLASPATQVRNIEREEVLSKGAKKLAQAMAS")
01788         self.assertEqual(hsp.score, 680)
01789         self.assertEqual(hsp.expect, 4.72196e-70)
01790         self.assertEqual(hsp.query_start, 1)
01791         self.assertEqual(hsp.query_end, 131)
01792         self.assertEqual(hsp.sbjct_start, 1)
01793         self.assertEqual(hsp.sbjct_end, 131)
01794         self.assertEqual(len(record.alignments[1].hsps), 1)
01795         hsp = record.alignments[1].hsps[0]
01796         self.assertEqual(hsp.align_length, 77)
01797         self.assertEqual(hsp.identities, 36)
01798         self.assertEqual(hsp.positives, 49)
01799         self.assertEqual(hsp.query, "MAKYEPKKGDYAGGAVKILDMFENGQLGYPEVTLKLAGEEANARRAGDERTKEAIHAIVKMISDAMKPYRNKGSGFQ")
01800         self.assertEqual(hsp.sbjct, "MAREEPYKGDYVGGVAKILQGYFANYYGFPNVSLRLAGEEANLSKTGHANAKAIVHEMIKVIKEASKPLR-RGKGFK")
01801         self.assertEqual(hsp.match, "MA+ EP KGDY GG  KIL  +     G+P V+L+LAGEEAN  + G    K  +H ++K+I +A KP R +G GF+")
01802         self.assertEqual(hsp.score, 181)
01803         self.assertEqual(hsp.expect, 3.03476e-12)
01804         self.assertEqual(hsp.query_start, 1)
01805         self.assertEqual(hsp.query_end, 77)
01806         self.assertEqual(hsp.sbjct_start, 1)
01807         self.assertEqual(hsp.sbjct_end, 76)
01808 
01809         record = records.next()
01810         self.assertEqual(record.application, "BLASTP")
01811         self.assertEqual(record.version, '2.2.18')
01812         self.assertEqual(record.date, "Mar-02-2008")
01813         self.assertEqual(record.query, "tr|Q3V4Q3|Q3V4Q3_9VIRU")
01814         self.assertEqual(record.query_letters, 131)
01815         self.assertEqual(record.database, "/opt/BlastDBs/nr")
01816         self.assertEqual(record.num_sequences_in_database, 2563094)
01817         self.assertEqual(record.database_sequences, 2563094)
01818         self.assertEqual(record.database_length, 864488805)
01819         self.assertEqual(len(record.descriptions), 19)
01820         self.assertEqual(len(record.alignments), 19)
01821         self.assertEqual(len(record.alignments[0].hsps), 1)
01822         hsp = record.alignments[0].hsps[0]
01823         self.assertEqual(hsp.align_length, 131)
01824         self.assertEqual(hsp.identities, 131)
01825         self.assertEqual(hsp.positives, 131)
01826         self.assertEqual(hsp.query, "MAKYEPKKGDYAGGAVKILDMFENGQLGYPEVTLKLAGEEANARRAGDERTKEAIHAIVKMISDAMKPYRNKGSGFQSQPIPGEVIAQVTSNPEYQQAKAFLASPATQVRNIEREEVLSKGAKKLAQAMAS")
01827         self.assertEqual(hsp.sbjct, "MAKYEPKKGDYAGGAVKILDMFENGQLGYPEVTLKLAGEEANARRAGDERTKEAIHAIVKMISDAMKPYRNKGSGFQSQPIPGEVIAQVTSNPEYQQAKAFLASPATQVRNIEREEVLSKGAKKLAQAMAS")
01828         self.assertEqual(hsp.match, "MAKYEPKKGDYAGGAVKILDMFENGQLGYPEVTLKLAGEEANARRAGDERTKEAIHAIVKMISDAMKPYRNKGSGFQSQPIPGEVIAQVTSNPEYQQAKAFLASPATQVRNIEREEVLSKGAKKLAQAMAS")
01829         self.assertEqual(hsp.score, 590)
01830         self.assertEqual(hsp.expect, 1.28615e-59)
01831         self.assertEqual(hsp.query_start, 1)
01832         self.assertEqual(hsp.query_end, 131)
01833         self.assertEqual(hsp.sbjct_start, 1)
01834         self.assertEqual(hsp.sbjct_end, 131)
01835 
01836         record = records.next()
01837         self.assertEqual(record.application, "BLASTP")
01838         self.assertEqual(record.version, '2.2.18')
01839         self.assertEqual(record.date, "Mar-02-2008")
01840         self.assertEqual(record.query, "tr|Q3V4Q3|Q3V4Q3_9VIRU")
01841         self.assertEqual(record.query_letters, 131)
01842         self.assertEqual(record.database, "/opt/BlastDBs/nr")
01843         self.assertEqual(record.num_sequences_in_database, 2563094)
01844         self.assertEqual(record.database_sequences, 2563094)
01845         self.assertEqual(record.database_length, 864488805)
01846         self.assertEqual(len(record.descriptions), 9)
01847         self.assertEqual(len(record.alignments), 9)
01848         self.assertEqual(len(record.alignments[0].hsps), 1)
01849         hsp = record.alignments[0].hsps[0]
01850         self.assertEqual(hsp.align_length, 131)
01851         self.assertEqual(hsp.identities, 131)
01852         self.assertEqual(hsp.positives, 131)
01853         self.assertEqual(hsp.query, "MAKYEPKKGDYAGGAVKILDMFENGQLGYPEVTLKLAGEEANARRAGDERTKEAIHAIVKMISDAMKPYRNKGSGFQSQPIPGEVIAQVTSNPEYQQAKAFLASPATQVRNIEREEVLSKGAKKLAQAMAS")
01854         self.assertEqual(hsp.sbjct, "MAKYEPKKGDYAGGAVKILDMFENGQLGYPEVTLKLAGEEANARRAGDERTKEAIHAIVKMISDAMKPYRNKGSGFQSQPIPGEVIAQVTSNPEYQQAKAFLASPATQVRNIEREEVLSKGAKKLAQAMAS")
01855         self.assertEqual(hsp.match, "MAKYEPKKGDYAGGAVKILDMFENGQLGYPEVTLKLAGEEANARRAGDERTKEAIHAIVKMISDAMKPYRNKGSGFQSQPIPGEVIAQVTSNPEYQQAKAFLASPATQVRNIEREEVLSKGAKKLAQAMAS")
01856         self.assertEqual(hsp.score, 535)
01857         self.assertEqual(hsp.expect, 3.43623e-53)
01858         self.assertEqual(hsp.query_start, 1)
01859         self.assertEqual(hsp.query_end, 131)
01860         self.assertEqual(hsp.sbjct_start, 1)
01861         self.assertEqual(hsp.sbjct_end, 131)
01862 
01863         #TODO - Can we detect the convergence status:
01864         #<Iteration_message>CONVERGED</Iteration_message>
01865         self.assertRaises(StopIteration, records.next)
01866         handle.close()
01867 
01868 
01869 if __name__ == "__main__":
01870     runner = unittest.TextTestRunner(verbosity = 2)
01871     unittest.main(testRunner=runner)