Interface RExecutor
-
- All Known Implementing Classes:
AbstractRExecutor,DockerRExecutor,ProcessRExecutor,RserveRExecutor
public interface RExecutorThis interface define how to prepare, launch and retrieve data of a R analysis.- Since:
- 2.0
- Author:
- Laurent Jourdren
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidcloseConnection()Close the connection.voidexecuteRScript(String rScript, boolean sweave, String sweaveOutput, boolean saveRscript, String description, DataFile workflowOutputDir, String... scriptArguments)Execute a R script.StringgetName()Get the name of the RExecutor.voidgetOutputFiles()Get the output files of the analysisvoidopenConnection()Open the connection.voidputInputFile(DataFile inputFile)Put a file for the analysis.voidputInputFile(DataFile inputFile, String outputFilename)Put a file.voidremoveInputFiles()Remove input files.voidwriterFile(String content, String outputFilename)Write a file.
-
-
-
Method Detail
-
getName
String getName()
Get the name of the RExecutor.- Returns:
- the name of the RExecutor
-
openConnection
void openConnection() throws IOExceptionOpen the connection.- Throws:
IOException- if an error occurs while opening the connection
-
closeConnection
void closeConnection() throws IOExceptionClose the connection.- Throws:
IOException- if an error occurs while closing the connection
-
putInputFile
void putInputFile(DataFile inputFile) throws IOException
Put a file for the analysis.- Parameters:
inputFile- the input file- Throws:
IOException- if an error occurs while putting the file
-
putInputFile
void putInputFile(DataFile inputFile, String outputFilename) throws IOException
Put a file.- Parameters:
inputFile- the file to putoutputFilename- the output filename- Throws:
IOException- if an exception occurs while putting a file
-
writerFile
void writerFile(String content, String outputFilename) throws IOException
Write a file.- Parameters:
content- the content of the fileoutputFilename- the output filename- Throws:
IOException- if an exception occurs while writing a file
-
executeRScript
void executeRScript(String rScript, boolean sweave, String sweaveOutput, boolean saveRscript, String description, DataFile workflowOutputDir, String... scriptArguments) throws IOException
Execute a R script.- Parameters:
rScript- the source of the script to executesweave- true if the script is a Sweave scriptsweaveOutput- Sweave output filesaveRscript- true to keep the R scriptdescription- description of the R scriptworkflowOutputDir- workflow output directoryscriptArguments- script arguments- Throws:
IOException- if an error occurs while executing the script
-
removeInputFiles
void removeInputFiles() throws IOExceptionRemove input files.- Throws:
IOException- if an error occurs while removing the files
-
getOutputFiles
void getOutputFiles() throws IOExceptionGet the output files of the analysis- Throws:
IOException- if an error occurs while getting the output files
-
-