def main(): args = parse_args(sys.argv[1:]) config = read_config(args) prov = provider.get_provider(args['provider_name'], args['project_dir']) p = project.Project(args, prov) p.verify_directory_structure() p.read_samples() p.validate_de_input() generate_scripts(p, config) print_instructions(p)
def test_generate_sbatch_command(): args = get_default_args() prov = provider.get_provider(args['provider_name'], args['project_dir']) proj = project.Project(args, prov) proj.samples = [1, 2, 3, 4] expected = "sbatch --array=1-4%6 run_sample.sh" assert_equal(pipeline.generate_sbatch_command(proj), expected)
def setUp(self): self.tmp_root = tempfile.mkdtemp() self.pwd = os.getcwd() args = get_default_args() args.update({ 'project_dir': self.tmp_root }) test_dir = os.path.dirname(os.path.abspath(__file__)) template_dir = "{0}/../templates".format(test_dir) self.env = Environment(loader=FileSystemLoader(template_dir)) prov = provider.get_provider(args['provider_name'], args['project_dir']) self.project = project.Project(args, prov) self.project.samples = [1, 2, 3, 4] self.config = get_default_config()
def test_get_provider_sll(): project_root = "." sll_provider = provider.get_provider("sll", project_root) assert_true(isinstance(sll_provider, sll.SllProvider)) assert_equal(sll_provider.project_root, project_root)
def test_get_provider_gcf(): project_root = "." gcf_provider = provider.get_provider("gcf", project_root) assert_true(isinstance(gcf_provider, gcf.GcfProvider)) assert_equal(gcf_provider.project_root, project_root)