def Run(self, mali,
            tree=None,
            dump=0,
            test=False,
            options={}):

        self.mTempdir = tempfile.mkdtemp()
        self.mFilenameInput = "input"
        self.mFilenameOutput = "output"

        if test:
            print "# temporary directory is %s" % self.mTempdir

        mali.writeToFile(open(self.mTempdir + "/" + self.mFilenameInput, "w"),
                         format="fasta")

        statement = " ".join((self.mExecutable,
                              "-in %s" % self.mFilenameInput,
                              "-out %s" % self.mFilenameOutput))

        s = subprocess.Popen(statement,
                             shell=True,
                             stdout=subprocess.PIPE,
                             stderr=subprocess.PIPE,
                             cwd=self.mTempdir,
                             close_fds=True)

        (out, err) = s.communicate()

        if s.returncode != 0:
            raise UsageError, "Error in running %s \n%s\n%s\nTemporary directory in %s" % (
                self.mExecutable, err, out, self.mTempdir)

        if dump:
            print (self.mExecutable, out) % "# stdout output of %s:\n%s\n######################################"

        result = Mali.Mali()

        result.readFromFile(
            open("%s/%s" % (self.mTempdir, self.mFilenameOutput), "r"), format="fasta")

        if not test:
            shutil.rmtree(self.mTempdir)

        return result
dataset/ETHPy150Open CGATOxford/cgat/CGAT/WrapperMuscle.py/Muscle.Run/swapped operands of `%`