def setup(self):
     if not os.path.exists(self.args.out_dir):
         os.mkdir(self.args.out_dir)
     for fq in self.args.fastqs:
         self.add_cmd(
             PipelineCommandWrapper("Run FastQC", "fastqc", "-o",
                                    self.args.out_dir, fq))
 def test_piplinecommandwrapper(self):
     # Make a pipeline command wrapper
     cmd = PipelineCommandWrapper("Echo text", "echo", "hello")
     # Check name and generated command
     self.assertEqual(cmd.name(), "echo_text")
     self.assertEqual(str(cmd.cmd()), "echo hello")
     # Add argument and check updated command
     cmd.add_args("there")
     self.assertEqual(str(cmd.cmd()), "echo hello there")
 def setup(self):
     self.add_cmd(
         PipelineCommandWrapper("Echo text to file", "echo",
                                self.args.s, ">>", self.args.f))
 def setup(self):
     self.fail(message="Invoked fail method", exit_code=123)
     self.add_cmd(
         PipelineCommandWrapper("Echo message", "echo",
                                "should not execute"))
 def setup(self):
     for i in xrange(self.args.n):
         self.add_cmd(
             PipelineCommandWrapper("Echo text", "echo",
                                    self.args.s))
 def setup(self):
     self.add_cmd(
         PipelineCommandWrapper("Nonexistant",
                                "./non_existant --help"))