Example #1
0
    def test_simple(self):

        with drmaa.Session() as session:

            outputDirectoryLocation = getPath("tests/output")
            logDirectoryLocation = getPath("tests/output/log")
            specification = "-l h_vmem=2G -pe smp 1"

            jobManager = JobManagerDRMAA(outputDirectoryLocation, logDirectoryLocation, session, None)
            jobManager.setCountSpecification(specification)

            inputLocation = "tests/data/manager/simple.fasta"
            outputLocation = getPath("tests/output/manager/temp.out")
            k = 7
            organization = 0

            job = jobManager.createCountJob(inputLocation, outputLocation, k, organization)

            args = [
			    CountKMers.INPUT_LONG, str(inputLocation), 
			    CountKMers.OUTPUT_LONG, str(outputLocation), 
			    CountKMers.KMER_LONG, str(k), 
			    CountKMers.ORGANIZATION_LONG, str(organization)]

            self.assertEquals(job.outputPath, ":" + os.path.join(logDirectoryLocation, "Neptune-CountKMers1.o"))
            self.assertEquals(job.errorPath, ":" + os.path.join(logDirectoryLocation, "Neptune-CountKMers1.e"))
            self.assertEquals(job.args[1:], args)
            self.assertEquals(job.nativeSpecification, specification)
Example #2
0
    def test_simple(self):

        with drmaa.Session() as session:

            outputDirectoryLocation = getPath("tests/output")
            logDirectoryLocation = getPath("tests/output/log")
            specification = "-l h_vmem=2G -pe smp 1"

            jobManager = JobManagerDRMAA(outputDirectoryLocation,
                                         logDirectoryLocation, session, None)
            jobManager.setCountSpecification(specification)

            inputLocation = "tests/data/manager/simple.fasta"
            outputLocation = getPath("tests/output/manager/temp.out")
            k = 7
            organization = 0

            job = jobManager.createCountJob(inputLocation, outputLocation, k,
                                            organization)

            args = [
                CountKMers.INPUT_LONG,
                str(inputLocation), CountKMers.OUTPUT_LONG,
                str(outputLocation), CountKMers.KMER_LONG,
                str(k), CountKMers.ORGANIZATION_LONG,
                str(organization)
            ]

            self.assertEquals(
                job.outputPath, ":" +
                os.path.join(logDirectoryLocation, "Neptune-CountKMers1.o"))
            self.assertEquals(
                job.errorPath, ":" +
                os.path.join(logDirectoryLocation, "Neptune-CountKMers1.e"))
            self.assertEquals(job.args[1:], args)
            self.assertEquals(job.nativeSpecification, specification)