def test_run(self): with tempfile.NamedTemporaryFile(prefix="anoise") as fp: args = ["clean", "CAGGGAGCTGGAAAGATTYGC", fp.name, "--input", self.raw_path] try: dispatch.main(args) self.assertLinesEqual(self.fa_path, fp.name + ".fa") finally: for f in glob.iglob(fp.name + ".*"): os.remove(f)
def test_run(self): with tempfile.NamedTemporaryFile(prefix='anoise') as fp: args = [ 'clean', 'CAGGGAGCTGGAAAGATTYGC', fp.name, '--input', self.raw_path ] try: dispatch.main(args) self.assertLinesEqual(self.fa_path, fp.name + '.fa') finally: for f in glob.iglob(fp.name + '.*'): os.remove(f)
def test_run_pyronoise(self): sff_path = os.path.abspath(self.sff_path) sff_name = os.path.basename(sff_path) args = ['pyronoise', sff_name, '--mpi-args', '-np 2', '--stub', 'test'] with tempdir(prefix='pyronoise-') as td: with cd(td): self.assertEqual(td, os.getcwd()) shutil.copy(sff_path, sff_name) dispatch.main(args) self.assertEqual(td, os.getcwd()) try: self.assertLinesEqual(self.expected_path, 'test-pnoise_cd.fa') self.assertLinesEqual(self.mapping_path, 'test-pnoise.mapping') finally: for f in ('test-pnoise_cd.fa', 'test-pnoise.mapping'): if os.path.exists(f): os.remove(f)
#!/usr/bin/env python if __name__ == '__main__': from anoisetools.scripts.dispatch import main main()