view env/lib/python3.9/site-packages/planemo/engine/toil.py @ 0:4f3585e2f14b draft default tip

"planemo upload commit 60cee0fc7c0cda8592644e1aad72851dec82c959"
author shellac
date Mon, 22 Mar 2021 18:12:50 +0000
parents
children
line wrap: on
line source

"""Module contianing the :class:`ToilEngine` implementation of :class:`Engine`."""

from planemo import cwl
from planemo.runnable import RunnableType
from .interface import BaseEngine


class ToilEngine(BaseEngine):
    """An :class:`Engine` implementation backed by Toil.

    More information on toil can be found at https://github.com/BD2KGenomics/toil.
    """

    handled_runnable_types = [RunnableType.cwl_tool, RunnableType.cwl_workflow]

    def _run(self, runnable, job_path):
        """Run CWL job using Toil."""
        path = runnable.path
        return cwl.run_toil(self._ctx, path, job_path, **self._kwds)


__all__ = (
    "ToilEngine",
)