Example #1
0
 def test_forward_strand_fragend(self):
     ''' Test identification of downstream fragends on + strand. '''
     self.assertEqual(
         fragendPair.downstream([self.read1], self.fragDict),
         [('chr1',10,'+',8)]
     )
     self.assertEqual(
         fragendPair.downstream([self.read2], self.fragDict),
         [('chr1',24,'+',21)]
     )
     self.assertEqual(
         fragendPair.downstream([self.read3], self.fragDict),
         [('chr3',32,'+',8)]
     )
     self.assertEqual(
         fragendPair.downstream([self.read4], self.fragDict),
         [None]
     )
     self.assertEqual(
         fragendPair.downstream([self.read5], self.fragDict),
         [None]
     )
Example #2
0
 def test_reverse_strand_fragend(self):
     ''' Test identification of downstream fragends on - strand. '''
     self.assertEqual(
         fragendPair.downstream([self.read6], self.fragDict),
         [('chr2',20,'-',8)]
     )
     self.assertEqual(
         fragendPair.downstream([self.read7], self.fragDict),
         [('chr2',16,'-',11)]
     )
     self.assertEqual(
         fragendPair.downstream([self.read8], self.fragDict),
         [('chr3',3,'-',8)]
     )
     self.assertEqual(
         fragendPair.downstream([self.read9], self.fragDict),
         [None]
     )
     self.assertEqual(
         fragendPair.downstream([self.read10], self.fragDict),
         [None]
     )
Example #3
0
 def test_errors_fragend(self):
     ''' Test error reporting. '''
     with self.assertRaises(IOError):
         fragendPair.downstream([('chr5','10','19','+')], self.fragDict)
     with self.assertRaises(IOError):
         fragendPair.downstream([('chr1','19','10','-')], self.fragDict)