Back to index

python-biopython  1.60
Public Member Functions | Public Attributes
test_Phd.PhdTestTwo 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 219 of file test_Phd.py.


Member Function Documentation

def test_Phd.PhdTestTwo.setUp (   self)

Definition at line 220 of file test_Phd.py.

00220 
00221     def setUp(self):
00222         self.handle = open("Phd/phd2")

Definition at line 223 of file test_Phd.py.

00223 
00224     def tearDown(self):
00225         self.handle.close()

Test phd2 using parser via SeqIO.

Definition at line 226 of file test_Phd.py.

00226 
00227     def test_check_SeqIO(self):
00228         """Test phd2 using parser via SeqIO."""
00229         records = SeqIO.parse(self.handle, "phd")
00230         #Contig 1
00231         record = records.next()
00232         self.assertEqual(record.id, "ML4924R")
00233         self.assertEqual(record.name, "ML4924R")
00234         self.assertEqual(record.description, "ML4924R")
00235         self.assertTrue(record.seq.startswith("actttggtcgcctgcaggtaccggtccgnga"))
00236         self.assertTrue(record.seq.endswith("agaagctcgttctcaacatctccgttggtgaga"))
00237         self.assertEqual(record.letter_annotations["phred_quality"][:10],
00238                          [6, 6, 6, 8, 8, 12, 18, 16, 14, 11])
00239         self.assertEqual(record[:10].format("fasta"),
00240                          ">ML4924R\nactttggtcg\n")
00241         self.assertEqual(record[:10].format("qual"),
00242                          ">ML4924R\n6 6 6 8 8 12 18 16 14 11\n")
00243         self.assertEqual(record[:10].format("fastq"),
00244                          "@ML4924R\nactttggtcg\n+\n'''))-31/,\n")
00245         self.assertEqual(record[:10].format("fastq-illumina"),
00246                          "@ML4924R\nactttggtcg\n+\nFFFHHLRPNK\n")
00247         # Make sure that no further records are found
00248         self.assertRaises(StopIteration, records.next)
        

Member Data Documentation

Definition at line 221 of file test_Phd.py.


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