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_map_reads_bad_outdir(self): message = r'Output directory does not exist. Make sure it does.' with self.assertRaisesRegex(FileNotFoundError, message): star.map_reads(self.reads, self.dir, '/unexisting/outdir')
def test_map_reads_bad_genomedir(self): message = r'Directory with genome index does not exist. Make sure it does.' with self.assertRaisesRegex(FileNotFoundError, message): star.map_reads(self.reads, '/unexisting/genomedir', self.dir)