def main_align(args, stdout, stderr) : if args.outDir is None : args.outDir = "." for fastaFile in args.input : pyalign.ungapFastaFile(fastaFile, fastaFile + ".ungap.tmp") pyalign.runMafft(fastaFile + ".ungap.tmp", fastaFile + ".tmp", args.nthreads) out = os.path.join(args.outDir, os.path.basename(fastaFile)) os.rename(fastaFile + ".tmp", out) os.remove(fastaFile + ".ungap.tmp")
def test_run_000(self) : mod.runMafft("inputToto", "outputToto", 4) result = self.command expected = "mafft --thread 4 inputToto | awk '{if (substr($0,1,1)==\">\"){if (p){printf \"\\n\";} print $0} else printf(\"%s\",$0);p++;} END {print \"\\n\"}' > outputToto" self.assertEqual(result, expected)