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
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
closeConnection()
Close the connection.void
executeRScript(String rScript, boolean sweave, String sweaveOutput, boolean saveRscript, String description, DataFile workflowOutputDir, String... scriptArguments)
Execute a R script.String
getName()
Get the name of the RExecutor.void
getOutputFiles()
Get the output files of the analysisvoid
openConnection()
Open the connection.void
putInputFile(DataFile inputFile)
Put a file for the analysis.void
putInputFile(DataFile inputFile, String outputFilename)
Put a file.void
removeInputFiles()
Remove input files.void
writerFile(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 IOException
Open the connection.- Throws:
IOException
- if an error occurs while opening the connection
-
closeConnection
void closeConnection() throws IOException
Close 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 IOException
Remove input files.- Throws:
IOException
- if an error occurs while removing the files
-
getOutputFiles
void getOutputFiles() throws IOException
Get the output files of the analysis- Throws:
IOException
- if an error occurs while getting the output files
-
-