def test_build_index(self): # No annotation return_code1 = star.build_index(self.genome, self.index_dir, overhang=100, overhang_min=8, threads=1) # With annotation return_code2 = star.build_index(self.genome, self.index_dir, annotation=self.annotation, overhang=100, overhang_min=8, threads=1) self.assertEqual(return_code1, 0) self.assertEqual(return_code2, 0)
def test_map_reads(self): # First: make index: # Give logfile_path to some /tmp location to not pollute woking directory star.build_index(self.genome, self.index_dir) # No annotation return_code1 = star.map_reads(self.reads, self.index_dir, self.dir) # With annotation: return_code2 = star.map_reads(self.reads, self.index_dir, self.dir, annotation=self.annotation, multimax=10, mismatches=2, threads=1) self.assertEqual(return_code1, 0) self.assertEqual(return_code2, 0)
def test_build_index_bad_outdir(self): message = r'Output directory does not exist. Make sure it does.' with self.assertRaisesRegex(FileNotFoundError, message): star.build_index(self.genome, '/unexisting/outdir')