Back to index

python-biopython  1.60
Public Member Functions
test_SeqIO_AbiIO.TestAbi Class Reference

List of all members.

Public Member Functions

def setUp
def tearDown
def test_file_type
def test_seqrecord
def test_trim

Detailed Description

Definition at line 88 of file

Member Function Documentation

Definition at line 90 of file

00091     def setUp(self):
00092         open_files(test_data)

Here is the call graph for this function:

Definition at line 93 of file

00094     def tearDown(self):
00095         close_files(test_data)

Here is the call graph for this function:

Test if filetype is ABIF.

Definition at line 96 of file

00097     def test_file_type(self):
00098         """Test if filetype is ABIF."""
00099         for trace in test_data:
00100             self.assertEqual(test_data[trace]['handle'].read(4), _as_bytes('ABIF'))

Here is the call graph for this function:

Test if the extracted seqrecords data are equal to expected values.

Definition at line 101 of file

00102     def test_seqrecord(self):
00103         """Test if the extracted seqrecords data are equal to expected values."""
00104         for trace in test_data:
00105             record =[trace]['handle'], 'abi')
00106             self.assertEqual(basename(test_data[trace]["path"][-1]).replace('.ab1',''),
00107             self.assertEqual(test_data[trace]['seq'], str(record.seq))
00108             self.assertEqual(test_data[trace]['qual'], record.letter_annotations['phred_quality'])
00109             self.assertEqual(test_data[trace]['sample'],
00110             self.assertEqual(test_data[trace]['sample_well'], record.annotations['sample_well'])
00111             self.assertEqual(test_data[trace]['machine_model'], record.annotations['machine_model'])
00112             self.assertEqual(test_data[trace]['run_start'], record.annotations['run_start'])
00113             self.assertEqual(test_data[trace]['run_finish'], record.annotations['run_finish'])

Test if trim works.

Definition at line 114 of file

00115     def test_trim(self):
00116         """Test if trim works."""
00117         for trace in test_data:
00118             record =[trace]['handle'], 'abi-trim')
00119             if trace != 'data_empty':
00120                 self.assertNotEqual(str(record.seq), test_data[trace]['seq'])
00121                 self.assertTrue(str(record.seq) in test_data[trace]['seq'])
00122             else:
00123                 self.assertEqual(str(record.seq), test_data[trace]['seq'])

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