Esempio n. 1
0
 def testBarcodeFile(self):
     del ERRORS[:]
     del OUTPUT[:]
     cysbar._writeError = _captureError
     cysbar._writeOutput = _captureOutput
     positions = [5]
     barcodes = []
     rc = cysbar.barcode("../data/test/seq1.fa", positions, barcodes, "../data/test/barcodes2.txt", residueSeparator)
     self.assertEqual(rc, 0)
     self.assertEqual(len(OUTPUT), 2)
     self.assertEqual(OUTPUT[0], ">seq1__BC__Q__BC__")
     self.assertEqual(OUTPUT[1], "RDESabc123SHKFKGTIR---XSNRDCESQSHKFKGTCIR---XSNCASVCXS-E-GF--NGGHCRG--RRCYCTAK-")
Esempio n. 2
0
 def testBarcodeParams(self):
     del ERRORS[:]
     del OUTPUT[:]
     cysbar._writeError = _captureError
     cysbar._writeOutput = _captureOutput
     positions = [5]
     barcodes = BUILT_IN_BARCODES[:1]
     rc = cysbar.barcode("../data/test/seq1.fa", positions, barcodes, None, residueSeparator)
     self.assertEqual(rc, 0)
     self.assertEqual(len(OUTPUT), 2)
     self.assertEqual(OUTPUT[0], ">seq1__BC__Q__BC__")
     self.assertEqual(OUTPUT[1], "RDESwwyhwyyhmmSHKFKGTIR---XSNRDCESQSHKFKGTCIR---XSNCASVCXS-E-GF--NGGHCRG--RRCYCTAK-")