Back to index

python-biopython  1.60
Public Member Functions | Public Attributes
test_Phd.PhdTest454 Class Reference

List of all members.

Public Member Functions

def setUp
def tearDown
def test_check_SeqIO

Public Attributes

 handle

Detailed Description

Definition at line 249 of file test_Phd.py.


Member Function Documentation

def test_Phd.PhdTest454.setUp (   self)

Definition at line 250 of file test_Phd.py.

00250 
00251     def setUp(self):
00252         self.handle = open("Phd/phd_454")

Definition at line 253 of file test_Phd.py.

00253 
00254     def tearDown(self):
00255         self.handle.close()

Test phd_454 using parser via SeqIO.

Definition at line 256 of file test_Phd.py.

00256 
00257     def test_check_SeqIO(self):
00258         """Test phd_454 using parser via SeqIO."""
00259         records = SeqIO.parse(self.handle, "phd")
00260         #Contig 1
00261         record = records.next()
00262         self.assertEqual(record.id, "EBE03TV04IHLTF.77-243")
00263         self.assertEqual(record.name, "EBE03TV04IHLTF.77-243")
00264         self.assertEqual(record.description, "EBE03TV04IHLTF.77-243 1")
00265         self.assertEqual(str(record.seq), "ggggatgaaagggatctcggtggtaggtga")
00266         self.assertEqual(record.letter_annotations["phred_quality"][:10],
00267                          [37, 37, 37, 37, 37, 37, 37, 37, 37, 37])
00268         self.assertEqual(record.format("fasta"),
00269                          ">EBE03TV04IHLTF.77-243 1\n"
00270                          "ggggatgaaagggatctcggtggtaggtga\n")
00271         self.assertEqual(record.format("qual"),
00272                          ">EBE03TV04IHLTF.77-243 1\n"
00273                          "37 37 37 37 37 37 37 37 37 37 "
00274                          "37 37 37 26 26 26 30 33 33 33\n"
00275                          "33 33 36 36 33 33 33 36 26 22\n")
00276         self.assertEqual(record.format("fastq"),
00277                          "@EBE03TV04IHLTF.77-243 1\n"
00278                          "ggggatgaaagggatctcggtggtaggtga\n"
00279                          "+\n"
00280                          "FFFFFFFFFFFFF;;;?BBBBBEEBBBE;7\n")
00281         self.assertEqual(record[:10].format("fastq-illumina"),
00282                          "@EBE03TV04IHLTF.77-243 1\n"
00283                          "ggggatgaaa\n"
00284                          "+\n"
00285                          "eeeeeeeeee\n")
00286         # Make sure that no further records are found
00287         self.assertRaises(StopIteration, records.next)


Member Data Documentation

Definition at line 251 of file test_Phd.py.


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