Class Reval

java.lang.Object
  |
  +--RevalBase
        |
        +--Reval

public class Reval
extends RevalBase

Class Reval is used to evaluate R scripts with data supplied from MAExplorer via the MJAReval API. Each R analysis is defined by a R LayOut (RLO). Each RLO is saved in an internal RLO database managed by the MJAReval class (see addRLO() method for details on the RLO).

This is an instantiation of the RevalBase class where the Client is MAExplorer. When we refer to the Client in this class we mean MAExplorer. If the code were used with another cliet, then this instantiation must be (heavily) modified.

R is an extensible language and envirnment for statistical computing and graphics. R is Open Source (GNU public license) and is available for download at www.r-project.org.

NOTE: This class's methods contain a command interpreter, and support methods and data structures to enable you to execute R program .R scripts using client (MAExplorer) data. The Client-R library used by R is RLORlibr and for MAExplorer is called "MAERlibr".

It is intended to be used when writing MAEPlugins that need to access the R program to execute .R scripts with MAExplorer data. This may generate reports and plots (PDF, JPG, PNG, Postscript, SVG). Some of these reports may be used to pass the R results back into the MAExplorer state (Gene Sets, Filter gene sets, Normalization gene sets, Condition Lists, OCL, etc.).

This class evaluates R scripts with data supplied from the client via the MJAReval API. Each R analysis is defined by a R LayOut (RLO). Each RLO is saved in an internal RLO database managed by the MJAReval class. (see class variable definitions and addRLO() method for details on the RLO). The RLOs specify the evaluation environment for the .R script when evaluated by R. The R program is then run as a separate process using a System.exec()

The client-R interface library "MAERlibr" (the instance of RLORlibr) is kept in the Client {installation directory}/lib/RLORlibr/ and contains the standard R library format subdirectories including R/ (separate files) and R-ex/ (single file). When an RLO script is evaluated, we copy the .R script with a "tmp-" prefix to the project Temp/ and prepend the following 2 lines: setwd("...Temp/") library(RLORlibr,lib.loc="{installation directory}/lib") which are required for the .R script to access the data generated by the client program and to access the library.

When executed, an R script is allowed to generate multiple output files that may include the following formats: text, tab-delimited text, PDF and JPG. There may be also multiple data input files requested by the R script. These are generated by mjaReval class methods as specified by the RLO database entry. Note: during R execution, all files are read and written from the {project}/Temp directory, the R current working directory. They may be copied to or from this directory from or to other directories as required.

 1. data is exported from the client to tab-delimited data input files 
   {Project}/Temp/. These will then be read by R when your script is 
   evaluated.
 2. The output of R is saved to any number of files into {project}/Temp
    and then moved to {Project}/Report/ where they may then be displayed or 
    read by the client if required.
 3. The .R scripts are shared with all instances of the client
    and are kept in {Client installation}/R/
 4. The .rlo files are shared by all instances of the client and are kept
    in {Client installation}/RLO/ directory.
 5. The startup script is generated by an mjaReval method and placed in
    the {project}/Temp directory where it will be used by a System.exec() 
    call.
This work was produced by Peter Lemkin of the National Cancer Institute, an agency of the United States Government. As a work of the United States Government there is no associated copyright. It is offered as open source software under the Mozilla Public License (version 1.1) subject to the limitations noted in the accompanying LEGAL file. This notice must be included with the code. The MAExplorer Mozilla and Legal files are available on http://maexplorer.sourceforge.net/.

Version:
$Date: 2003/07/07 21:40:40 $ $Revision: 1.66 $
Author:
P. Lemkin (NCI), G. Thornwall (SAIC), NCI-Frederick, Frederick, MD
See Also:
MAExplorer Home, RevalBase, RLO

Field Summary
private  boolean[] activeGeneList
          list [0:maxGenes-1] booleans for genes passing data Filter
(package private) static MAExplorer mae
          Global link
private static int maxGenes
          current active genes lists for generating export data
private static int[] midList
          current active genes lists for generating export data
(package private) static MaeJavaAPI mja
          MaeJavaAPI classes
(package private)  MJAcluster mjaCluster
           
(package private)  MJAcondition mjaCondition
           
(package private)  MJAfilter mjaFilter
           
(package private)  MJAgeneList mjaGeneList
           
(package private)  MJAgeometry mjaGeometry
           
(package private)  MJAplot mjaPlot
           
(package private)  MJAproperty mjaProperty
           
(package private)  MJAreport mjaReport
           
(package private)  MJAsampleList mjaSampleList
           
(package private)  MJAsampleList mjaSL
           
(package private)  MJAstate mjaState
           
(package private)  MJAutil mjaUtil
           
private static int nCondsInOCL
          current active genes lists for generating export data
private static int nFiltered
          current active genes lists for generating export data
private static int nGenes
          current active genes lists for generating export data
private  boolean useBkgrdFlag
          status of (a.processBits & lookupProcessBitsDBvalue("Use-background-data"))!=0)
private  boolean useF1F2dataFlag
          status of (a.processBits & lookupProcessBitsDBvalue("Use-F1-F2-channels"))!=0)
private  boolean useFilterFlag
          status of (a.processBits & lookupProcessBitsDBvalue("Use-filter"))
private  boolean useHPsetsFlag
           
private  boolean useMeanHPeListDataFlag
           
private  boolean useRawDataFlag
          status of (a.processBits & lookupProcessBitsDBvalue("Use-raw-data"))
private  boolean verticallyStackedFlag
          status of (a.processBits & lookupProcessBitsDBvalue("Use-vert-stacked-data"))!=0)
 
Fields inherited from class RevalBase
analyses, clientName, clientRlibrBasePath, curAnalysis, dbugFlag, DEFAULT_R_OUTPUT_FILE, fileSeparator, fullRoutputFilePath, fullRscriptInputPath, fullRunRfilePath, inputRscriptFileName, isWindowsFlag, javaHome, MAX_ANALYSES, maxRLO, nAnalyses, NO_R_INSTALLED, nOfileTypes, nProcessBits, nR2ClientActions, nRdataTypes, osName, parseDelimChar, parseName, parseValue, promptDir, promptExt, promptFile, quoteRunPathFlag, r2ClientActionMenu, r2ClientActionName, r2ClientActionVal, r2ClientPrefix, RbasePath, RbinBasePath, rDataTypeMenu, rDataTypeName, rDataTypeVal, REB_DBUG, reportBasePath, reportFileName, rlo, RLO_VERSION, RLObasePath, rloReportLoggingFile, RLORlibr, rOfileTypeMenu, rOfileTypeName, rOfileTypeStdOut, rOfileTypeVal, rPB_useVanillaBit, rProcessBitMenu, rProcessBitName, rProcessBitVal, rReport, RscriptBasePath, rStdout, RuserBasePath, specificCreateInputFileProblem, SPlusBasePath, SPlusBinBasePath, startupRscriptFileName, tempBasePath, timeStampReportDir, userDir, useRLOloggingFlag, useSPlusFlag
 
Constructor Summary
(package private) Reval(MaeJavaAPI mja, int maxAnalyses)
          Reval() - constructor for initial database allocation
 
Method Summary
(package private)  boolean copyFile(java.lang.String srcName, java.lang.String dstName, java.lang.String optUpdateMsg, int optEstInputFileLth)
          copyFile() - binary copy of one file or URL toa local file
(package private)  boolean createInputDataFiles(java.lang.String inputFilesBasePath)
          createInputDataFiles() - create any input data files required for current analysis.
private  SimpleTable cvtFloatArrayData2Table(RLO a, SimpleTable st, float[][] xData, float[][] yData, float[][] xBkgrd, float[][] yBkgrd, int nX, int nY, int nFiltered, boolean[] activeGeneList, java.lang.String[] fieldNames, java.lang.String[] classNames)
          cvtFloatArrayData2Table() - convert xData,yData nX,nY expression data for nGenes active genes to SimpleTable.
private  SimpleTable cvtStringArrayData2Table(RLO a, SimpleTable st, java.lang.String[][] sData, int nRows, int nCols, java.lang.String[] fieldNames)
          cvtStringArrayData2Table() - convert sData, nS, nRows to SimpleTable.
(package private)  boolean deleteLocalFile(java.lang.String fileName)
          deleteLocalFile() - delete local file.
private  boolean genCurAnnotationDataFile(RLO a, SimpleTable st)
          genCurAnnotationDataFile() - generate exported input data file for current gene annotation data.
private  boolean genCurHPdataFile(RLO a, SimpleTable st)
          genCurHPdataFile() - generate exported input data file for current HP.
private  boolean genCurHPsetDataFile(RLO a, SimpleTable st, int inputType)
          genCurHPsetDataFile() - generate exported input data file for current HP set data (including: HP-X set, HP-Y set, HP-E list, current condition list).
private  boolean genCurHPXYdataFile(RLO a, SimpleTable st, boolean useHPsetsFlag)
          genCurHPXYdataFile() - generate exported input data file for current HP-X and HP-Y or mean (HP-X set and mean HP-Y set).
private  boolean genCurHPXYsetsDataFile(RLO a, SimpleTable st)
          genCurHPXYsetsDataFile() - generate exported input data file for current HP-X and HP-Y sets data.
private  boolean genCurOCLdataFile(RLO a, SimpleTable st)
          genCurOCLdataFile() - generate exported input data file for current Ordered Condition List data.
private  boolean genCurStateThresholdsFile(RLO a, SimpleTable st)
          genCurStateThresholdsFile() - generate exported input data file for current state thresholds data.
private  boolean genCurStateValuesFile(RLO a, SimpleTable st)
          genCurStateValuesFile() - generate exported input data file for current state flags and names values data.
(package private)  java.lang.String popupDialog(java.lang.String promptMsg, java.lang.String defaultAnswer)
          popupDialog() prompt with message and return response.
(package private)  java.lang.String readTextFromFile(java.lang.String textFileName, java.lang.String loadingMsg)
          readTextFromFile() - read text from text file.
(package private)  boolean setRoutput2ClientObjects()
          setRoutput2ClientObjects() - copy data for any R2Mae Action entries in the RLO.
 void setupNameTypeDB()
          setupNameTypeDB() - setup the RLO (name,type) input, output, action, processBits database
(package private)  void setWaitCursor(boolean flag)
          setWaitCursor() - turn wait cursor on and off
(package private)  void showMsg(java.lang.String msg)
          showMsg() - display message in client GUI
(package private)  java.lang.String toString(int rloID, java.lang.String optGenRbitsStr)
          toString() - create string representing the R LayOut (RLO) of the instance.
private  boolean writeRdataTableFile(SimpleTable st, java.lang.String fileName)
          writeRdataTableFile() - write the MAE table data as R input file
(package private)  boolean writeTextToFile(java.lang.String textFileName, java.lang.String textReport)
          writeTextToFile() - save text string as text file.
 
Methods inherited from class RevalBase
accept, addRLO, clearRLOdb, copyTempOutputFilesToReportDir, createRunRscript, createTempRscript, cvRLO2string, cvs2i, cvtBackslash2Fwdslash, cvtEnvPaths2Properties, cvtInputType2Str, cvtOutType2Str, cvtR2ClientType2Str, execRscript, getAllProcessBits, getCurDateStr, getCurrentRLO, getInputDataFileNames, getInputDataTypes, getListofRLOmenuNames, getListofRLOscriptNames, getNbrAnalyses, getNextStrNameValFromLine, getOfileTypeDBmenus, getOfileTypeDBnames, getOfileTypeDBtypes, getOutputDataFileNames, getOutputDataTypes, getProcessBitsDBmenus, getProcessBitsDBnames, getProcessBitsDBvalues, getR2ClientActionDBmenus, getR2ClientActionDBnames, getR2ClientActionDBtypes, getRdataTypeDBmenus, getRdataTypeDBnames, getRdataTypeDBtypes, getRLOidByRscriptName, getSetR2ClientFileNames, getSetR2ClientObjNames, getSetR2ClientObjTypes, getStrValFromLine, lookupOfileTypeDBmenu, lookupOfileTypeDBmenu, lookupOfileTypeDBvalue, lookupProcessBitsDBmenu, lookupProcessBitsDBvalue, lookupR2ClientActionDBMenu, lookupR2ClientActionDBMenu, lookupR2ClientActionDBtype, lookupR2ClientActionDBvalue, lookupRdataTypeDBmenu, lookupRdataTypeDBmenu, lookupRdataTypeDBvalue, newRLO, promptFileName, readPermanentRLOdatabase, readRLOfile, rmvRLO, rmvRtnChars, runRscriptWithR, setAllProcessBits, setCurrentRLO, setDbugFlag, setInputFilesData, setOfileTypeDB, setOutputFilesData, setProcessBitsDB, setR2ClientActionDB, setR2ClientFilesData, setRdataTypeDB, setRLO, setRLOreportLoggingFlag, setupAllBasePaths, setupRbinPath, simpleLookupRprogramPath, simpleLookupSPLUSprogramPath, sortArray, toString, writePermanentRLOdatabase, writeRLOfile
 
Methods inherited from class java.lang.Object
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, registerNatives, toString, wait, wait, wait
 

Field Detail

mae

static MAExplorer mae
Global link

mja

static MaeJavaAPI mja
MaeJavaAPI classes

mjaCluster

MJAcluster mjaCluster

mjaCondition

MJAcondition mjaCondition

mjaFilter

MJAfilter mjaFilter

mjaGeneList

MJAgeneList mjaGeneList

mjaGeometry

MJAgeometry mjaGeometry

mjaPlot

MJAplot mjaPlot

mjaProperty

MJAproperty mjaProperty

mjaReport

MJAreport mjaReport

mjaSampleList

MJAsampleList mjaSampleList

mjaSL

MJAsampleList mjaSL

mjaState

MJAstate mjaState

mjaUtil

MJAutil mjaUtil

useFilterFlag

private boolean useFilterFlag
status of (a.processBits & lookupProcessBitsDBvalue("Use-filter"))

useRawDataFlag

private boolean useRawDataFlag
status of (a.processBits & lookupProcessBitsDBvalue("Use-raw-data"))

verticallyStackedFlag

private boolean verticallyStackedFlag
status of (a.processBits & lookupProcessBitsDBvalue("Use-vert-stacked-data"))!=0)

useBkgrdFlag

private boolean useBkgrdFlag
status of (a.processBits & lookupProcessBitsDBvalue("Use-background-data"))!=0)

useF1F2dataFlag

private boolean useF1F2dataFlag
status of (a.processBits & lookupProcessBitsDBvalue("Use-F1-F2-channels"))!=0)

useHPsetsFlag

private boolean useHPsetsFlag

useMeanHPeListDataFlag

private boolean useMeanHPeListDataFlag

activeGeneList

private boolean[] activeGeneList
list [0:maxGenes-1] booleans for genes passing data Filter

maxGenes

private static int maxGenes
current active genes lists for generating export data

nFiltered

private static int nFiltered
current active genes lists for generating export data

midList

private static int[] midList
current active genes lists for generating export data

nGenes

private static int nGenes
current active genes lists for generating export data

nCondsInOCL

private static int nCondsInOCL
current active genes lists for generating export data
Constructor Detail

Reval

Reval(MaeJavaAPI mja,
      int maxAnalyses)
Reval() - constructor for initial database allocation
Parameters:
mja - is instance of MaeJavaAPI
maxAnalyses - to set up the database
Method Detail

setupNameTypeDB

public void setupNameTypeDB()
setupNameTypeDB() - setup the RLO (name,type) input, output, action, processBits database

setRoutput2ClientObjects

boolean setRoutput2ClientObjects()
setRoutput2ClientObjects() - copy data for any R2Mae Action entries in the RLO. It will read R output files and convert them to MAExplorer data structures and save into the state of MAExplorer.

If the useRLOloggingFlag is set, then use RLO Report logging by creating subdirectory in {project}/Report/{RLOname}-yymmdd.hhmmss/ to store the RLO output files copied to Report/.

Overrides:
setRoutput2ClientObjects in class RevalBase
Returns:
true if performed any R to MAExplorer conversions.
See Also:
RevalBase.getSetR2ClientFileNames(), RevalBase.getSetR2ClientObjNames(), RevalBase.getSetR2ClientObjTypes()

showMsg

void showMsg(java.lang.String msg)
showMsg() - display message in client GUI
Overrides:
showMsg in class RevalBase
Parameters:
msg - message to display

setWaitCursor

void setWaitCursor(boolean flag)
setWaitCursor() - turn wait cursor on and off
Overrides:
setWaitCursor in class RevalBase
Parameters:
flag - to turn wait cursor on or off

readTextFromFile

java.lang.String readTextFromFile(java.lang.String textFileName,
                                  java.lang.String loadingMsg)
readTextFromFile() - read text from text file.
Overrides:
readTextFromFile in class RevalBase
Parameters:
textFileName - full path name of text file
loadingMsg - to display while loading, null if no message
Returns:
text if suceed else null

writeTextToFile

boolean writeTextToFile(java.lang.String textFileName,
                        java.lang.String textReport)
writeTextToFile() - save text string as text file.
Overrides:
writeTextToFile in class RevalBase
Parameters:
textFileName - full path name of text file
textReport - text to save in file
Returns:
true if succeed.

copyFile

boolean copyFile(java.lang.String srcName,
                 java.lang.String dstName,
                 java.lang.String optUpdateMsg,
                 int optEstInputFileLth)
copyFile() - binary copy of one file or URL toa local file
Overrides:
copyFile in class RevalBase
Parameters:
srcName - is either a full path local file name or a http:// prefixed URL string of the source file.
dstName - is the full path of the local destination file name
optUpdateMsg - (opt) will display message in showMsg() and increasing ... in showMsg2(). One '.' for every 10K bytes read. This only is used when reading a URL. Set to null if not used.
optEstInputFileLth - is the estimate size of the in;ut file if known else 0. Used in progress bar.
Returns:
true if succeed.

deleteLocalFile

boolean deleteLocalFile(java.lang.String fileName)
deleteLocalFile() - delete local file.
Overrides:
deleteLocalFile in class RevalBase
Parameters:
fileName - to be deleted on the local file system.
Returns:
false if failed.

popupDialog

java.lang.String popupDialog(java.lang.String promptMsg,
                             java.lang.String defaultAnswer)
popupDialog() prompt with message and return response.
Overrides:
popupDialog in class RevalBase
Parameters:
promptMsg - is prompt message
default - if press cancel
Returns:
result

createInputDataFiles

boolean createInputDataFiles(java.lang.String inputFilesBasePath)
createInputDataFiles() - create any input data files required for current analysis. Generate input files from data obtained by calling the MAExplorer MJA API as required and saving the generated files in the inputFilesBasePath folder.
Overrides:
createInputDataFiles in class RevalBase
Parameters:
inputFilesBasePath - where to put generated files
See Also:
SimpleTable, Table, Table.makeTabDelimReport(java.lang.String), MJACondition#getCurCondition, MJACondition#getSamplesInCondList, MJACondition#getCondListLength, MJACondition#getCurOCL, MJACondition#getConditionsInOrderedCondList, MJACondition#getSamplesInCondList, MJAfilter.getNbrGenesPassingFilter(), MJAreport.writeTextToFile(java.lang.String, java.lang.String), MJAsampleList.getCurrent_HP_index(), MJAsampleList.getCurrent_HP_X_index(), MJAsampleList.getCurrent_HP_Y_index(), MJAsampleList.getF1F2dataForSample(float[], float[], int[], int, java.lang.String), MJAsampleList.getHPdataForSample(float[], int[], int, java.lang.String), MJAsampleList.getHP_XandYsetDataForSample(float[], float[], int[], java.lang.String), MJAsampleList.getSizeOf_HP_X_set(), MJAsampleList.getSizeOf_HP_Y_set(), MJAsampleList.getSizeOf_HP_E_set(), MJAsampleList.getListOfHPXsampleIndices(), MJAsampleList.getListOfHPYsampleIndices(), MJAsampleList.getListOfHPEsampleIndices(), MJAsampleList.getCurrent_HP_X_name(boolean), MJAsampleList.getCurrent_HP_Y_name(boolean), MJAsampleList.getClassXname(), MJAsampleList.getClassYname(), MJAsampleList.getHP_Xset_SampleNames(), MJAsampleList.getHP_Yset_SampleNames(), MJAsampleList.getHP_Elist_SampleNames(), MJAstate.get_useHPxySetsDataFlag(), MJAstate.get_useHP_E_ListDataFlag(), cvtFloatArrayData2Table(RLO, SimpleTable, float[][], float[][], float[][], float[][], int, int, int, boolean[], java.lang.String[], java.lang.String[]), cvtStringArrayData2Table(RLO, SimpleTable, java.lang.String[][], int, int, java.lang.String[]), RevalBase.getCurrentRLO()

genCurHPdataFile

private boolean genCurHPdataFile(RLO a,
                                 SimpleTable st)
genCurHPdataFile() - generate exported input data file for current HP. Generate input files from data obtained by calling the MAExplorer MJA API as required and saving the generated files in the inputFilesBasePath folder. This assumes all required flags are set by createInputDataFiles().
Parameters:
a - is the current RLO to use
st - is the current SimpleTable to generate
Returns:
true if succeed
See Also:
createInputDataFiles(java.lang.String)

genCurHPXYdataFile

private boolean genCurHPXYdataFile(RLO a,
                                   SimpleTable st,
                                   boolean useHPsetsFlag)
genCurHPXYdataFile() - generate exported input data file for current HP-X and HP-Y or mean (HP-X set and mean HP-Y set). Generate input files from data obtained by calling the MAExplorer MJA API as required and saving the generated files in the inputFilesBasePath folder. This assumes all required flags are set by createInputDataFiles().
Parameters:
a - is the current RLO to use
st - is the current SimpleTable to generate
useHPsetsFlag - to get means of HP-X(Y) 'sets' means if true, else get single HP-X and HP-Y samples.
Returns:
true if succeed
See Also:
createInputDataFiles(java.lang.String)

genCurHPXYsetsDataFile

private boolean genCurHPXYsetsDataFile(RLO a,
                                       SimpleTable st)
genCurHPXYsetsDataFile() - generate exported input data file for current HP-X and HP-Y sets data. Generate input files from data obtained by calling the MAExplorer MJA API as required and saving the generated files in the inputFilesBasePath folder. This assumes all required flags are set by createInputDataFiles().
Parameters:
a - is the current RLO to use
st - is the current SimpleTable to generate
Returns:
true if succeed
See Also:
createInputDataFiles(java.lang.String)

genCurHPsetDataFile

private boolean genCurHPsetDataFile(RLO a,
                                    SimpleTable st,
                                    int inputType)
genCurHPsetDataFile() - generate exported input data file for current HP set data (including: HP-X set, HP-Y set, HP-E list, current condition list). Generate input files from data obtained by calling the MAExplorer MJA API as required and saving the generated files in the inputFilesBasePath folder. This assumes all required flags are set by createInputDataFiles().
Parameters:
a - is the current RLO to use
st - is the current SimpleTable to generate
Returns:
true if succeed
See Also:
createInputDataFiles(java.lang.String)

genCurOCLdataFile

private boolean genCurOCLdataFile(RLO a,
                                  SimpleTable st)
genCurOCLdataFile() - generate exported input data file for current Ordered Condition List data. Generate input files from data obtained by calling the MAExplorer MJA API as required and saving the generated files in the inputFilesBasePath folder. This assumes all required flags are set by createInputDataFiles().
Parameters:
a - is the current RLO to use
st - is the current SimpleTable to generate
Returns:
true if succeed
See Also:
createInputDataFiles(java.lang.String)

genCurAnnotationDataFile

private boolean genCurAnnotationDataFile(RLO a,
                                         SimpleTable st)
genCurAnnotationDataFile() - generate exported input data file for current gene annotation data. Generate input files from data obtained by calling the MAExplorer MJA API as required and saving the generated files in the inputFilesBasePath folder. This assumes all required flags are set by createInputDataFiles().
Parameters:
a - is the current RLO to use
st - is the current SimpleTable to generate
Returns:
true if succeed
See Also:
createInputDataFiles(java.lang.String)

genCurStateThresholdsFile

private boolean genCurStateThresholdsFile(RLO a,
                                          SimpleTable st)
genCurStateThresholdsFile() - generate exported input data file for current state thresholds data. Generate input files from data obtained by calling the MAExplorer MJA API as required and saving the generated files in the inputFilesBasePath folder. This assumes all required flags are set by createInputDataFiles().
Parameters:
a - is the current RLO to use
st - is the current SimpleTable to generate
Returns:
true if succeed
See Also:
createInputDataFiles(java.lang.String)

genCurStateValuesFile

private boolean genCurStateValuesFile(RLO a,
                                      SimpleTable st)
genCurStateValuesFile() - generate exported input data file for current state flags and names values data. Generate input files from data obtained by calling the MAExplorer MJA API as required and saving the generated files in the inputFilesBasePath folder. This assumes all required flags are set by createInputDataFiles().
Parameters:
a - is the current RLO to use
st - is the current SimpleTable to generate
Returns:
true if succeed
See Also:
createInputDataFiles(java.lang.String)

writeRdataTableFile

private boolean writeRdataTableFile(SimpleTable st,
                                    java.lang.String fileName)
writeRdataTableFile() - write the MAE table data as R input file
Parameters:
st - is the Simple table to write out
sMod - is the file name modifier

cvtFloatArrayData2Table

private SimpleTable cvtFloatArrayData2Table(RLO a,
                                            SimpleTable st,
                                            float[][] xData,
                                            float[][] yData,
                                            float[][] xBkgrd,
                                            float[][] yBkgrd,
                                            int nX,
                                            int nY,
                                            int nFiltered,
                                            boolean[] activeGeneList,
                                            java.lang.String[] fieldNames,
                                            java.lang.String[] classNames)
cvtFloatArrayData2Table() - convert xData,yData nX,nY expression data for nGenes active genes to SimpleTable. This method can optionally pass down the table field names or generate field names. This maps and merges array data to a single SimpleTable. Any field names with spaces are quoted with "... ...".
Parameters:
a - is the RLO instance
st - is the SimpleTable instance to populate
xData[nX][nGenes] - is the set of X column data
yData[nY][nGenes] - is the set of Y column data if not null
xBkgrd[nX][nGenes] - is set of X column background data if not null
yBkgrd[nY][nGenes] - is set of Y column background data if not null
nX - is the number of X columns
nY - is the number of Y columns if not 0
nFiltered - is the number of rows in each column in the input data. If we are filtering, then it is the # (subset) of filtered genes contained in activeGeneList - not the maxGenes.
activeGeneList - is the [maxGenes] boolean list of active filtered genes. If this is null, then nFiltered is maxGenes
fieldNames[] - is the optional field names from xData followed by yData if nY>0. It does NOT contain "mid". However, if null, use "mid", "f1", "f2", ...
classNames - is list of class names [nX+nY] which get written out in row 2 if the list exists. It is required for vertical stacking.
Returns:
st if succeed, else null

cvtStringArrayData2Table

private SimpleTable cvtStringArrayData2Table(RLO a,
                                             SimpleTable st,
                                             java.lang.String[][] sData,
                                             int nRows,
                                             int nCols,
                                             java.lang.String[] fieldNames)
cvtStringArrayData2Table() - convert sData, nS, nRows to SimpleTable. This maps and merges array data to a single SimpleTable. Note: any entries that have spaces are quoted with "...". [TODO] resolve how we handle Table field names...
Parameters:
a - is the RLO instance
st - is the SimpleTable instance to populate
sData[nS][nRows] - is the set of column data
nRows - is the number of rows in each column
nCols - is the number of columns
fieldNames[] - is the optional field names from xData followed by yData if nY>0. If null, use "f1", "f2", ...
Returns:
st if succeed, else null

toString

java.lang.String toString(int rloID,
                          java.lang.String optGenRbitsStr)
toString() - create string representing the R LayOut (RLO) of the instance. NOTE: this extends the RevalBase.toString() with client specific process bits interpretations.
Parameters:
rloID - is the index of the RLO to convert
optGenRbitsStr - optional genRbits representation computed elsewhere. The GenR bits are only used with the client specific demos (if nay).
Returns:
string representing the RLO