Class RserveRExecutor
- java.lang.Object
-
- fr.ens.biologie.genomique.eoulsan.util.r.AbstractRExecutor
-
- fr.ens.biologie.genomique.eoulsan.util.r.RserveRExecutor
-
- All Implemented Interfaces:
RExecutor
public class RserveRExecutor extends AbstractRExecutor
This class define a RServe RExecutor.- Since:
- 2.0
- Author:
- Laurent Jourdren
-
-
Field Summary
Fields Modifier and Type Field Description protected RSConnectionrConnectionstatic StringREXECUTOR_NAME
-
Constructor Summary
Constructors Constructor Description RserveRExecutor(File outputDirectory, File temporaryDirectory, String serverName)Public constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidcloseConnection()Close the connection.protected voidexecuteRScript(File rScriptFile, boolean sweave, String sweaveOuput, File 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.protected voidputFile(DataFile inputFile, String inputFilename)Put a file for the analysis.protected voidremoveFile(String filename)Remove a file of the analysis.voidwriterFile(String content, String outputFilename)Write a file.-
Methods inherited from class fr.ens.biologie.genomique.eoulsan.util.r.AbstractRExecutor
executeRScript, getOutputDirectory, getTemporaryDirectory, putInputFile, putInputFile, removeInputFiles
-
-
-
-
Field Detail
-
REXECUTOR_NAME
public static final String REXECUTOR_NAME
- See Also:
- Constant Field Values
-
rConnection
protected RSConnection rConnection
-
-
Constructor Detail
-
RserveRExecutor
public RserveRExecutor(File outputDirectory, File temporaryDirectory, String serverName) throws IOException
Public constructor.- Parameters:
outputDirectory- the output directorytemporaryDirectory- the temporary directoryserverName- Rserve server name- Throws:
IOException- if an error occurs
-
-
Method Detail
-
getName
public String getName()
Description copied from interface:RExecutorGet the name of the RExecutor.- Returns:
- the name of the RExecutor
-
getOutputFiles
public void getOutputFiles() throws IOExceptionDescription copied from interface:RExecutorGet the output files of the analysis- Specified by:
getOutputFilesin interfaceRExecutor- Overrides:
getOutputFilesin classAbstractRExecutor- Throws:
IOException- if an error occurs while getting the output files
-
openConnection
public void openConnection() throws IOExceptionDescription copied from interface:RExecutorOpen the connection.- Specified by:
openConnectionin interfaceRExecutor- Overrides:
openConnectionin classAbstractRExecutor- Throws:
IOException- if an error occurs while opening the connection
-
closeConnection
public void closeConnection() throws IOExceptionDescription copied from interface:RExecutorClose the connection.- Specified by:
closeConnectionin interfaceRExecutor- Overrides:
closeConnectionin classAbstractRExecutor- Throws:
IOException- if an error occurs while closing the connection
-
removeFile
protected void removeFile(String filename) throws IOException
Description copied from class:AbstractRExecutorRemove a file of the analysis.- Specified by:
removeFilein classAbstractRExecutor- Parameters:
filename- the filename of the file to remove- Throws:
IOException- if the removing of the file fails
-
putFile
protected void putFile(DataFile inputFile, String inputFilename) throws IOException
Description copied from class:AbstractRExecutorPut a file for the analysis.- Specified by:
putFilein classAbstractRExecutor- Parameters:
inputFile- the input fileinputFilename- the output filename- Throws:
IOException- if an error occurs while putting the file
-
writerFile
public void writerFile(String content, String outputFilename) throws IOException
Description copied from interface:RExecutorWrite a file.- Parameters:
content- the content of the fileoutputFilename- the output filename- Throws:
IOException- if an exception occurs while writing a file
-
executeRScript
protected void executeRScript(File rScriptFile, boolean sweave, String sweaveOuput, File workflowOutputDir, String... scriptArguments) throws IOException
Description copied from class:AbstractRExecutorExecute a R script.- Specified by:
executeRScriptin classAbstractRExecutor- Parameters:
rScriptFile- The R script filesweave- execute the R using SweavesweaveOuput- sweave output filescriptArguments- script arguments- Throws:
IOException- if an error occurs while executing the script
-
-