示例#1
0
 def test_RunGenovo_run(self):
     infile_var = "tIn.fasta"
     outfile_var = "tOut.fasta"
     genovo = RunGenovo(infile=infile_var, outfile=outfile_var,
                        pdir=self.data_dir, no_iter=10, thresh=100,
                        check_exist=True)
     is_exist, _ = genovo.check_outfiles_with_filetag_exist(self.data_dir + infile_var)
     self.assertFalse(is_exist)
     genovo.run()
     is_exist, _ = genovo.check_outfiles_with_filetag_exist(self.data_dir + infile_var)
     self.assertTrue(is_exist)
     self.assertTrue(genovo.is_file_exist(self.data_dir + "tOut.fasta", True))
     os.remove(self.data_dir + outfile_var)
示例#2
0
    def test_RunGenovo_check_assemble_result_exist(self):
        """
        check if ./assemble finished running, should produce 3 output files
        only pass if all 3 exist
        """
        infile_var = "assemble.fasta"
        genovo = RunGenovo(infile=infile_var, pdir=self.data_dir, no_iter=10,
                           thresh=250, check_exist=False)
        is_exist, _ = genovo.check_outfiles_with_filetag_exist(self.data_dir + infile_var)
        self.assertFalse(is_exist)
        genovo.run()
        is_exist, _ = genovo.check_outfiles_with_filetag_exist(self.data_dir + infile_var)
        self.assertTrue(is_exist)
        os.remove(self.data_dir + "assemble.genovo")

        # negative test, outfiles are not suppose to exist
        infile_var = "fileNotExist.fasta"
        genovo = RunGenovo(infile=infile_var, pdir=self.data_dir, wdir=self.working_dir, no_iter=10,
                           thresh=250, check_exist=False)
        is_exist, _ = genovo.check_outfiles_with_filetag_exist(self.data_dir + "fileNotExist_out")
        self.assertFalse(is_exist)