Class AbstractRExecutor

java.lang.Object
fr.ens.biologie.genomique.eoulsan.util.r.AbstractRExecutor
All Implemented Interfaces:
RExecutor
Direct Known Subclasses:
ProcessRExecutor, RserveRExecutor

public abstract class AbstractRExecutor extends Object implements RExecutor
This class define an abstract RExecutor.
Since:
2.0
Author:
Laurent Jourdren
  • Method Details

    • openConnection

      public void openConnection() throws IOException
      Description copied from interface: RExecutor
      Open the connection.
      Specified by:
      openConnection in interface RExecutor
      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 interface RExecutor
      Throws:
      IOException - if an error occurs while closing the connection
    • getOutputFiles

      public void getOutputFiles() throws IOException
      Description copied from interface: RExecutor
      Get the output files of the analysis
      Specified by:
      getOutputFiles in interface RExecutor
      Throws:
      IOException - if an error occurs while getting the output files
    • putInputFile

      public void putInputFile(DataFile inputFile) throws IOException
      Description copied from interface: RExecutor
      Put a file for the analysis.
      Specified by:
      putInputFile in interface RExecutor
      Parameters:
      inputFile - the input file
      Throws:
      IOException - if an error occurs while putting the file
    • putInputFile

      public void putInputFile(DataFile inputFile, String outputFilename) throws IOException
      Description copied from interface: RExecutor
      Put a file.
      Specified by:
      putInputFile in interface RExecutor
      Parameters:
      inputFile - the file to put
      outputFilename - the output filename
      Throws:
      IOException - if an exception occurs while putting a file
    • removeInputFiles

      public void removeInputFiles() throws IOException
      Description copied from interface: RExecutor
      Remove input files.
      Specified by:
      removeInputFiles in interface RExecutor
      Throws:
      IOException - if an error occurs while removing the files
    • executeRScript

      public void executeRScript(String rScript, boolean sweave, String sweaveOutput, boolean saveRscript, String description, DataFile workflowOutputDir, String... scriptArguments) throws IOException
      Description copied from interface: RExecutor
      Execute a R script.
      Specified by:
      executeRScript in interface RExecutor
      Parameters:
      rScript - the source of the script to execute
      sweave - true if the script is a Sweave script
      sweaveOutput - Sweave output file
      saveRscript - true to keep the R script
      description - description of the R script
      workflowOutputDir - workflow output directory
      scriptArguments - script arguments
      Throws:
      IOException - if an error occurs while executing the script
    • executeRScript

      public void executeRScript(String code, String description, DataFile workflowOutputDir) throws IOException
      Description copied from interface: RExecutor
      Execute a R script.
      Specified by:
      executeRScript in interface RExecutor
      Parameters:
      code - code to execute
      description - description of the R script
      workflowOutputDir - workflow output directory
      Throws:
      IOException - if an error occurs while executing the script