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 RSConnection
rConnection
static String
REXECUTOR_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 void
closeConnection()
Close the connection.protected void
executeRScript(File rScriptFile, boolean sweave, String sweaveOuput, File 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.protected void
putFile(DataFile inputFile, String inputFilename)
Put a file for the analysis.protected void
removeFile(String filename)
Remove a file of the analysis.void
writerFile(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:RExecutor
Get the name of the RExecutor.- Returns:
- the name of the RExecutor
-
getOutputFiles
public void getOutputFiles() throws IOException
Description copied from interface:RExecutor
Get the output files of the analysis- Specified by:
getOutputFiles
in interfaceRExecutor
- Overrides:
getOutputFiles
in classAbstractRExecutor
- Throws:
IOException
- if an error occurs while getting the output files
-
openConnection
public void openConnection() throws IOException
Description copied from interface:RExecutor
Open the connection.- Specified by:
openConnection
in interfaceRExecutor
- Overrides:
openConnection
in classAbstractRExecutor
- Throws:
IOException
- if an error occurs while opening the connection
-
closeConnection
public void closeConnection() throws IOException
Description copied from interface:RExecutor
Close the connection.- Specified by:
closeConnection
in interfaceRExecutor
- Overrides:
closeConnection
in classAbstractRExecutor
- Throws:
IOException
- if an error occurs while closing the connection
-
removeFile
protected void removeFile(String filename) throws IOException
Description copied from class:AbstractRExecutor
Remove a file of the analysis.- Specified by:
removeFile
in 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:AbstractRExecutor
Put a file for the analysis.- Specified by:
putFile
in 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:RExecutor
Write 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:AbstractRExecutor
Execute a R script.- Specified by:
executeRScript
in 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
-
-