Back to index

python-biopython  1.60
Public Member Functions | Public Attributes
test_Compass.CompassTest Class Reference

List of all members.

Public Member Functions

def setUp
def testCompassScanAndConsume
def testCompassParser
def testCompassIteratorEasy
def testCompassIteratorHard
def testAlignmentParsingOne
def testAlignmentParsingTwo

Public Attributes

 test_files

Detailed Description

Definition at line 9 of file test_Compass.py.


Member Function Documentation

Definition at line 10 of file test_Compass.py.

00010 
00011     def setUp(self):
00012         file_dir = os.path.join("Compass")
00013         self.test_files = [
00014           os.path.join(file_dir, "comtest1"),
00015           os.path.join(file_dir, "comtest2"),
00016           os.path.join(file_dir, "comtest3")]

Definition at line 72 of file test_Compass.py.

00072 
00073     def testAlignmentParsingOne(self):
00074         handle = open(self.test_files[1])
00075         records = Compass.parse(handle)
00076 
00077         com_record = records.next()
00078         self.assertEqual(178, com_record.query_start)
00079         self.assertEqual("KKDLEEIAD", com_record.query_aln)
00080         self.assertEqual(9, com_record.hit_start)
00081         self.assertEqual("QAAVQAVTA", com_record.hit_aln)
00082         self.assertEqual("++ ++++++", com_record.positives)
00083         
00084         com_record = records.next()
00085         com_record = records.next()
00086         self.assertEqual(371, com_record.query_start)
00087         self.assertEqual("LEEAMDRMER~~~V", com_record.query_aln)
00088         self.assertEqual(76, com_record.hit_start)
00089         self.assertEqual("LQNFIDQLDNpddL", com_record.hit_aln)
00090         self.assertEqual("+ ++++ + +   +", com_record.positives)
00091 
00092         handle.close()

Here is the call graph for this function:

Definition at line 93 of file test_Compass.py.

00093 
00094     def testAlignmentParsingTwo(self):
00095         handle = open(self.test_files[0])
00096         records = Compass.parse(handle)
00097         com_record = records.next()
00098         self.assertEqual(2, com_record.query_start)
00099         self.assertEqual(2, com_record.hit_start)
00100         self.assertEqual("LKERKL", com_record.hit_aln[-6:])
00101         handle.close()

Here is the call graph for this function:

Definition at line 46 of file test_Compass.py.

00046 
00047     def testCompassIteratorEasy(self):
00048         handle = open(self.test_files[0])
00049         records = Compass.parse(handle)
00050         com_record = records.next()
00051         self.assertEqual("60456.blo.gz.aln", com_record.query)
00052         self.assertRaises(StopIteration, records.next)
00053         handle.close()
        

Here is the call graph for this function:

Definition at line 54 of file test_Compass.py.

00054 
00055     def testCompassIteratorHard(self):
00056         handle = open(self.test_files[1])
00057         records = Compass.parse(handle)
00058 
00059         com_record = records.next()
00060         self.assertEqual("allscop//14982.blo.gz.aln", com_record.hit)
00061         self.assertEqual(float('1.01e+03'), com_record.evalue)
00062         
00063         com_record = records.next()
00064         self.assertEqual("allscop//14983.blo.gz.aln", com_record.hit)
00065         self.assertEqual(float('1.01e+03'), com_record.evalue)
00066                                       
00067         com_record = records.next()
00068         self.assertEqual("allscop//14984.blo.gz.aln", com_record.hit)
00069         self.assertEqual(float('5.75e+02'), com_record.evalue)
00070 
00071         handle.close()
                                                                                    

Here is the call graph for this function:

Definition at line 39 of file test_Compass.py.

00039 
00040     def testCompassParser(self):
00041         handle = open(self.test_files[0])
00042         com_record = Compass.read(handle)
00043         handle.close()
00044 
00045         self.assertEqual("60456.blo.gz.aln", com_record.query)

Here is the call graph for this function:

Definition at line 17 of file test_Compass.py.

00017 
00018     def testCompassScanAndConsume(self):
00019         handle = open(self.test_files[0])
00020         com_record = Compass.read(handle)
00021         handle.close()
00022 
00023         self.assertEqual("60456.blo.gz.aln", com_record.query)
00024         self.assertEqual("60456.blo.gz.aln", com_record.hit)
00025         self.assertEqual(0.5, com_record.gap_threshold)
00026 
00027         self.assertEqual(388, com_record.query_length)
00028         self.assertEqual(386, com_record.query_filtered_length)
00029         self.assertEqual(388, com_record.hit_length)
00030         self.assertEqual(386, com_record.hit_filtered_length)
00031 
00032         self.assertEqual(399, com_record.query_nseqs)
00033         self.assertEqual(12.972, com_record.query_neffseqs)
00034         self.assertEqual(399, com_record.hit_nseqs)
00035         self.assertEqual(12.972, com_record.hit_neffseqs)
00036                                                       
00037         self.assertEqual(2759, com_record.sw_score)
00038         self.assertEqual(float("0.00e+00"), com_record.evalue)

Here is the call graph for this function:


Member Data Documentation

Definition at line 12 of file test_Compass.py.


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