Esempio n. 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)
Esempio n. 2
0
    def test_simple(self):

        specification = "-l h_vmem=16G -pe smp 8"

        with drmaa.Session() as session:

            jobManager = JobManagerDRMAA(getPath("tests/output/manager"), getPath("tests/output/manager/log"), session, None)

            self.assertEquals(jobManager.countSpecification, None)
            jobManager.setCountSpecification(specification)
            self.assertEquals(jobManager.countSpecification, specification)
Esempio n. 3
0
    def test_simple(self):

        specification = "-l h_vmem=16G -pe smp 8"

        with drmaa.Session() as session:

            jobManager = JobManagerDRMAA(getPath("tests/output/manager"),
                                         getPath("tests/output/manager/log"),
                                         session, None)

            self.assertEquals(jobManager.countSpecification, None)
            jobManager.setCountSpecification(specification)
            self.assertEquals(jobManager.countSpecification, specification)
Esempio n. 4
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)