Esempio n. 1
0
    def test_RunGenovo_set_infile_outfile(self):

        infile_var = "test_infile.fasta"
        outfile_var = "test_outfile.fasta"
        genovo = RunGenovo(infile=infile_var, outfile=outfile_var,
                           pdir=self.data_dir, no_iter=3, thresh=250,
                           check_exist=False)
        expected = [self.data_dir + infile_var, "3"]
        self.assertEqual(genovo.assemble.get_all_switches(), expected)
        expected = ["250", self.data_dir + outfile_var,
                    self.data_dir + infile_var + ".dump.best"]
        self.assertEqual(genovo.finalize.get_all_switches(), expected)

        infile_var = "test_infile2.fasta"
        genovo.set_infile_name(infile_var)
        self.assertEqual(genovo.assemble.get_all_switches(), [infile_var, "3"])
        expected = ["250", self.data_dir + outfile_var,
                    infile_var + ".dump.best"]
        self.assertEqual(genovo.finalize.get_all_switches(), expected)

        outfile_var = "test_outfile2.fasta"
        genovo.set_outfile(outfile_var)
        self.assertEqual(genovo.assemble.get_all_switches(), [infile_var, "3"])
        expected = ["250", outfile_var, infile_var + ".dump.best"]
        self.assertEqual(genovo.finalize.get_all_switches(), expected)
Esempio n. 2
0
    def test_RunGenovo_simple_assemble(self):
        infile_var = "all_read.fa"
        genovo = RunGenovo(infile=infile_var, pdir=self.data_dir,
                           wdir=self.working_dir, no_iter=3, thresh=250,
                           check_exist=False)
        expected = [self.working_dir + infile_var, "3"]
        self.assertEqual(genovo.assemble.get_all_switches(), expected)

        genovo.set_assemble_number_of_iter(10)
        expected = [self.working_dir + infile_var, "10"]
        self.assertEqual(genovo.assemble.get_all_switches(), expected)

        infile_var = "test_infile.fasta"
        genovo.set_infile_name(infile_var)
        self.assertEqual(genovo.assemble.get_all_switches(), [infile_var, "10"])
Esempio n. 3
0
    def test_RunGenovo_simple_finalise(self):
        infile_var = "test_infile.fasta"
        genovo = RunGenovo(infile=infile_var, pdir=self.data_dir, no_iter=3,
                           thresh=250, check_exist=False)
        self.assertEqual(3, len(genovo.finalize._switch))
        expected = ["250", self.data_dir + "test_infile.genovo",
                    self.data_dir + infile_var + ".dump.best"]
        self.assertEqual(genovo.finalize.get_all_switches(), expected)

        genovo.set_finalize_cutoff(300)
        expected = ["300", self.data_dir + "test_infile.genovo",
                    self.data_dir + infile_var + ".dump.best"]
        self.assertEqual(genovo.finalize.get_all_switches(), expected)

        infile_var = "VICTORY!!!.fasta"
        genovo.set_infile_name(infile_var)
        expected = ["300", self.data_dir + "test_infile.genovo",
                    infile_var + ".dump.best"]
        self.assertEqual(genovo.finalize.get_all_switches(), expected)