Class PythonExecutorBase
java.lang.Object
org.broadinstitute.hellbender.utils.runtime.ScriptExecutor
org.broadinstitute.hellbender.utils.python.PythonExecutorBase
- Direct Known Subclasses:
PythonScriptExecutor
,StreamingPythonScriptExecutor
Base class for services for executing Python Scripts.
- All tools that use PythonScriptExecutor must have a Java-based front-end, with standard GATK (Barclay-based) arguments.
- Minimize the amount of code written in Python -- as much of each tool's work as possible should be done in Java. In particular, reading/writing final inputs and outputs should happen in Java. This is important to ensure the goal of universal GCS support, consistent Google authentication handling, etc.
- The names of any files that are created by Python code should be passed in to the python code from Java.
- All dependencies (Python and native) of Python libraries used should be clearly documented, and included in the default GATK docker image.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enum
Enum of possible executables that can be launched by this executor. -
Field Summary
FieldsFields inherited from class org.broadinstitute.hellbender.utils.runtime.ScriptExecutor
externalScriptExecutableName, ignoreExceptions
-
Constructor Summary
ConstructorsConstructorDescriptionPythonExecutorBase
(boolean ensureExecutableExists) PythonExecutorBase
(PythonExecutorBase.PythonExecutableName pythonExecutableName, boolean ensureExecutableExists) -
Method Summary
Modifier and TypeMethodDescriptionabstract String
Return a (not necessarily executable) string representing the current command line for this executor for error reporting purposes.getScriptException
(String message) Return an exception specific to this executor type, to be thrown on error conditions.Methods inherited from class org.broadinstitute.hellbender.utils.runtime.ScriptExecutor
executableMissing, executeCuratedArgs, executeCuratedArgsAndGetOutput, externalExecutableExists, getExceptionMessageFromScriptError, setIgnoreExceptions
-
Field Details
-
PYTHON_EXTENSION
- See Also:
-
-
Constructor Details
-
PythonExecutorBase
public PythonExecutorBase(boolean ensureExecutableExists) - Parameters:
ensureExecutableExists
- throw if the python executable cannot be located
-
PythonExecutorBase
public PythonExecutorBase(PythonExecutorBase.PythonExecutableName pythonExecutableName, boolean ensureExecutableExists) - Parameters:
pythonExecutableName
- name of the python executable to startensureExecutableExists
- throw if the python executable cannot be found
-
-
Method Details
-
getScriptException
Return an exception specific to this executor type, to be thrown on error conditions.- Specified by:
getScriptException
in classScriptExecutor
- Parameters:
message
-- Returns:
- a {#ScriptExecutorException}-derived exception object
-
getApproximateCommandLine
Return a (not necessarily executable) string representing the current command line for this executor for error reporting purposes.- Specified by:
getApproximateCommandLine
in classScriptExecutor
- Returns:
- Command line string.
-