def testOverlappingBackwards(self): """ If a primer is present twice backwards but is overlapping, only the first instance should be returned. """ seq = Seq('GTTT', IUPAC.unambiguous_dna) self.assertEqual(([], [1]), findPrimerBidi('AA', seq))
def testFoundMultiple(self): """ If a primer is found multiple times, the correct value must be returned. """ seq = Seq('ACGTACGT', IUPAC.unambiguous_dna) self.assertEqual(([0, 4], [1, 5]), findPrimerBidi('ACG', seq))
def testOverlappingForwards(self): """ If a primer is present twice forwards but is overlapping, only the first instance should be returned. """ seq = Seq('GAAA') self.assertEqual(([1], []), findPrimerBidi('AA', seq))
def testFoundEndStart(self): """ If a primer is found in both directions in a sequence (end of the forward sequence, start of the reverse complement), the correct value must be returned. """ seq = Seq('ACGT', IUPAC.unambiguous_dna) self.assertEqual(([2], [0]), findPrimerBidi('GT', seq))
def testFoundStartEnd(self): """ If a primer is found in both directions in a sequence (start of the forward sequence, end of the reverse complement), the correct value must be returned. """ seq = Seq('ACGT') self.assertEqual(([0], [2]), findPrimerBidi('AC', seq))
def testNotFound(self): """ If a primer is not found, empty lists must be returned. """ seq = Seq('ACGT', IUPAC.unambiguous_dna) self.assertEqual(([], []), findPrimerBidi('BLAH', seq))