Exemplo n.º 1
0
    def testProtHint(self):
        os.chdir(testDir + "/test_ProtHint")

        subprocess.call("../../bin/prothint.py genome.fasta proteins.fasta --geneMarkGtf genemark.gtf \
                        --workdir output --cleanup", shell=True)

        self.assertEqual(common.compareFiles("output/prothint.gff", "test_output/prothint.gff"), 0)
        self.assertEqual(common.compareFiles("output/evidence.gff", "test_output/evidence.gff"), 0)

        shutil.rmtree("output")
Exemplo n.º 2
0
    def testProcessOutput(self):
        prothint.workDir = testDir + "/test_processSpalnOutput"
        os.chdir(prothint.workDir)

        shutil.copyfile("Spaln/spaln.gff", "Spaln/spaln_orig.gff")
        prothint.processSpalnOutput("diamond/diamond.out")
        shutil.move("Spaln/spaln_orig.gff", "Spaln/spaln.gff")

        self.assertEqual(
            common.compareFiles("prothint.gff", "test_prothint.gff"), 0)
        self.assertEqual(
            common.compareFiles("evidence.gff", "test_evidence.gff"), 0)
        self.assertEqual(
            common.compareFiles("prothint_augustus.gff",
                                "test_prothint_augustus.gff"), 0)

        os.remove("prothint.gff")
        os.remove("evidence.gff")
        os.remove("prothint_augustus.gff")
Exemplo n.º 3
0
    def testIterNoSeedChange(self):
        # Test case in which the seed genes do not change, only their IDs change
        os.chdir(testDir + "/test_iter")
        subprocess.call(
            "../../bin/prothint.py genome.fasta proteins.fasta --geneSeeds genemarkPrevIDChange.gtf \
                        --prevGeneSeeds genemarkPrev.gtf --prevSpalnGff prevSpaln.gff --workdir output",
            shell=True)

        self.assertEqual(
            common.compareFiles("output/prothint_augustus.gff",
                                "test_output/prothint_augustus.gff"), 0)
        shutil.rmtree("output")
Exemplo n.º 4
0
    def testIter(self):
        os.chdir(testDir + "/test_iter")

        subprocess.call(
            "../../bin/prothint.py genome.fasta proteins.fasta --geneSeeds genemark.gtf \
                        --prevGeneSeeds genemarkPrev.gtf --prevSpalnGff prevSpaln.gff --workdir output",
            shell=True)

        self.assertEqual(
            common.compareFiles("output/prothint.gff",
                                "test_output/prothint.gff"), 0)
        self.assertEqual(
            common.compareFiles("output/evidence.gff",
                                "test_output/evidence.gff"), 0)
        self.assertEqual(
            common.compareFiles("output/diamond/diamond.out",
                                "test_output/diamond/diamond.out"), 0)
        self.assertEqual(
            common.compareFiles("output/uniqueSeeds.gtf",
                                "test_output/uniqueSeeds.gtf"), 0)
        self.assertEqual(
            common.compareFiles("output/prevHints.gff",
                                "test_output/prevHints.gff"), 0)
        shutil.rmtree("output")