Back to index

python-biopython  1.60
Public Member Functions | Public Attributes
test_SffIO.TestUAN Class Reference

List of all members.

Public Member Functions

def setUp
def test_time
def test_region
def test_coords

Public Attributes

 records
 test_annotations

Detailed Description

Definition at line 48 of file test_SffIO.py.


Member Function Documentation

def test_SffIO.TestUAN.setUp (   self)

Definition at line 49 of file test_SffIO.py.

00049 
00050     def setUp(self):
00051         self.records = [record for record in SeqIO.parse('Roche/E3MFGYR02_random_10_reads.sff', 'sff')]
00052         self.test_annotations = {}
00053         for line in test_data.splitlines():
00054             fields = re.split(r"\s+", line.strip())
00055             if '>' in line:
00056                 current_name = fields[0].lstrip('>')
00057                 self.test_annotations[current_name] = {}
00058             elif 'Prefix' in line:
00059                 time_list = map(int, fields[2].split('_')[1:-1])
00060                 self.test_annotations[current_name]["time"] = time_list
00061             elif 'Region' in line:
00062                 region = int(fields[-1])
00063                 self.test_annotations[current_name]["region"] = region
00064             elif 'XY' in line:
00065                 x, y = map(int, fields[-1].split('_'))
                self.test_annotations[current_name]["coords"] = (x, y)

Definition at line 72 of file test_SffIO.py.

00072 
00073     def test_coords(self):
00074         for record in self.records:
00075             self.assertEqual(record.annotations["coords"], self.test_annotations[record.name]["coords"])

Definition at line 69 of file test_SffIO.py.

00069 
00070     def test_region(self):
00071         for record in self.records:
            self.assertEqual(record.annotations["region"], self.test_annotations[record.name]["region"])

Definition at line 66 of file test_SffIO.py.

00066 
00067     def test_time(self):
00068         for record in self.records:
            self.assertEqual(record.annotations["time"], self.test_annotations[record.name]["time"])

Member Data Documentation

Definition at line 50 of file test_SffIO.py.

Definition at line 51 of file test_SffIO.py.


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