Interface RExecutor
- All Known Implementing Classes:
AbstractRExecutor,DockerRExecutor,ProcessRExecutor,RserveRExecutor
public interface RExecutor
This interface define how to prepare, launch and retrieve data of a R analysis.
- Since:
- 2.0
- Author:
- Laurent Jourdren
-
Method Summary
Modifier and TypeMethodDescriptionvoidClose the connection.voidexecuteRScript(String rScript, boolean sweave, String sweaveOutput, boolean saveRscript, String description, DataFile workflowOutputDir, String... scriptArguments) Execute a R script.voidexecuteRScript(String code, String description, DataFile workflowOutputDir) Execute a R script.getName()Get the name of the RExecutor.voidGet the output files of the analysisvoidOpen the connection.voidputInputFile(DataFile inputFile) Put a file for the analysis.voidputInputFile(DataFile inputFile, String outputFilename) Put a file.voidRemove input files.voidWrite a file.
-
Method Details
-
getName
String getName()Get the name of the RExecutor.- Returns:
- the name of the RExecutor
-
openConnection
Open the connection.- Throws:
IOException- if an error occurs while opening the connection
-
closeConnection
Close the connection.- Throws:
IOException- if an error occurs while closing the connection
-
putInputFile
Put a file for the analysis.- Parameters:
inputFile- the input file- Throws:
IOException- if an error occurs while putting the file
-
putInputFile
Put a file.- Parameters:
inputFile- the file to putoutputFilename- the output filename- Throws:
IOException- if an exception occurs while putting a file
-
writeFile
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
-
executeRScript
Execute a R script.- Parameters:
code- code to executedescription- description of the R scriptworkflowOutputDir- workflow output directory- Throws:
IOException- if an error occurs while executing the script
-
removeInputFiles
Remove input files.- Throws:
IOException- if an error occurs while removing the files
-
getOutputFiles
Get the output files of the analysis- Throws:
IOException- if an error occurs while getting the output files
-