|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--MJAbase | +--MJAReval
MAExplorer Open Java API class to access the MJAReval R package. 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.
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 data.
In this MJAReval API, the "client" is MAExplorer, the "RLORlibr" (R library package) for MAExplorer is "MAERlibr".
It is intended to be used when writing MAEPlugins that need to access the R program to execute .R scripts with client data. This may generate reports and plots (PDF, JPG, PNG, Postscript). Some of these reports may be used to pass the R results back into the client state (Gene Sets, Filter gene sets, Normalization gene sets, Condition Lists, OCL, etc.).
This class evaluates R scripts with data supplied from client via the MJA API. Each R analysis is defined by a R LayOut (RLO). Each RLO is saved in an internal RLO database managed by the mjaReval MJA 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()
When executed, an R script is allowed to generate multiple output files that may include the following formats: text, tab-delimited text, PDF, JPG, etc. 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 DB 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 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 client if required. 3. The .R scripts are shared with all instances of client and are kept in {client installation}/R/ 4. The .rlo files are shared by all instances of 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.List of methods available to Plugin-writers
createNewRLOdatabase() - constructor for initial database allocation setUseSPLUSelseRengineFlag() - specify if use R or S-PLUS statistics engine setRdataTypeDB() - set the export-types (name,type) database. setOfileTypeDB() - set the R output file-types (name,type) database. setR2ClientActionDB() - set the R to client Actions (name,type) database. setProcessBitsDB() - set the Export/Import ProcessBits (name,type) DB. lookupRdataTypeDBmenu() - lookup export-types menu entry by name. lookupRdataTypeDBmenu() - lookup export-types menu entry by value. lookupRdataTypeDBvalue() - lookup export-types value by name. lookupOfileTypeDBmenu() - lookup R output file type menu entry by name. lookupOfileTypeDBmenu() - lookup R output file type menu entry by value. lookupOfileTypeDBvalue() - lookup R output file type value by name. lookupR2ClientActionDBMenu() - lookup R to client Action menu by name lookupR2ClientActionDBMenu() - lookup R to client Action menu by value lookupProcessBitsDBmenu() - lookup Export/Import ProcessBits menu by value lookupR2ClientActionDBvalue() - lookup R to client Action value by name getRdataTypeDBnames() - get the R input file type names getRdataTypeDBmenus() - get the R input file type menus getRdataTypeDBtypes() - get the R input file type values getOfileTypeDBnames() - get the R output file type names getOfileTypeDBmenus() - get the R output file type menus getOfileTypeDBtypes() - get the R output file type values getR2ClientActionDBnames() - get the R to client Actions DB names getR2ClientActionDBmenus() - get the R to client Actions DB menus getR2ClientActionDBtypes() - get the R to client Actions DB type values getProcessBitsDBnames() - get Export/Import ProcessBitsDB names getProcessBitsDBmenus() - get Export/Import ProcessBitsDB menu entries getProcessBitsDBvalues() - get Export/Import ProcessBitsDB bit values setRLOreportLoggingFlag() - set RLO Report logging flag for creating subdir setDbugFlag() set debugging flag to print to stdout if required getNbrAnalyses() - get the number of analyses in the RLO DB getListofRLOscriptNames() - get list of all R script names getListofRLOmenuNames() - get list of all menu names newRLO() - create new empty R LayOut (RLO) instance to the RLO database. addRLO() - add new R LayOut (RLO) instance to the database setRLO() - set R LayOut (RLO) instance to the RLO database. rmvRLO() - remove the RLO from the analyses database clearRLOdb() - clear list of R LayOuts analyses in the database getRLOidByRscriptName() - get current RLO analysis method id by RscriptName getCurrentRLOid() - get current RLO analysis id setCurrentRLO() - set current RLO analysis by id getCurrentRLOmenuName() - get current RLO analysis menu string name getCurrentRLORscriptName() - get current RLO analysis .R script file name getInputDataFileNames() - get current RLO list of input data file names getInputDataTypes() - get current RLO list of input data file types getOutputDataFileNames() - get current RLO list of output data file names getOutputDataTypes() - get current RLO list of output data file types getSetR2ClientFileNames() - get current RLO list of R2Client data file names getSetR2ClientObjNames() - get current RLO list of R2Client object names getSetR2ClientObjTypes() - get current RLO list of R2Client object types setInputFilesData() - set current RLO list of input data (fileName,dataType) setOutputFilesData() - set current RLO list of output data (fileName,dataType) setR2ClientFilesData() - set cur. RLO list of R2Client (file, obj, type) data getAllProcessBits() - get Process Bits using R_PB_xxxx bits for current RLO setAllProcessBits() - set Process Bits using R_PB_xxxx bits for current RLO isProcessBit() - test Process Bits for current RLO clearProcessBit() - clear specific Process Bit(s) for current RLO setProcessBit() - set specific Process Bit(s) for current RLO getAllGenRbits() - get GenR Bits using R_GENR_xxxx bits for current RLO setAllGenRbits() - set GenR Bits using R_GENR_xxxx bits for current RLO isGenRbit() - test GenR Bits for current RLO clearGenRbit() - clear specific GenR Bit(s) for current RLO setGenRbit() - set specific GenR Bit(s) for current RLO getRLOoutFile() - get the nth Output Data file by out file type getRLOinputFile() - get the nth Input Data file by input file type getRstartupOptions() - get R command line startup options setRstartupOptions() - set R command line startup options getRLOstring() - get prettyprint string for the current RLO setupAllBasePaths() - generate all base paths of directories simpleLookupRprogramPath() - lookup RbinBasePath by analyzing OS env vars & OS name. runRscriptWithR() - compute report string by running R script through R. getReportBasePath() - get current path of Client Report/ directory getRscriptBasePath() - get current path of client R/ directory getRLObasePath() - get current path of/RLO/ getTempBasePath() - get current path of client Temp/ directory getRLORlibrBasePath() - get current base path of client RLORlibr/ directory getStartupRscriptFileName() - get name of batch R startup script file to exec() getInputRscriptFileName() - get name of .R input script file after eval getFullRunRfilePath() - full path of batch R startup script file after eval getFullRscriptInputPath() - full path of R input script file after eval getFullRoutputFilePath() - get full path of R output file after eval getRreportStr() - get last R report after doing eval of .R script readPermanentRLOdatabase() - read RLO entries from the permanent writePermanentRLOdatabase() - write RLO entries to the permanent readRLOfile() - read RLO by .rlo file name into a new RLO (rloID). writeRLOfile() - write RLO by .rlo file name for the specified RLO (rloID).
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 client Mozilla and Legal files are available on http://maexplorer.sourceforge.net/.
Constructor Summary | |
MJAReval()
MJAReval() - constructor for client interface to the R program to access client data in a uniform interface. |
Method Summary | |
int |
addRLO(java.lang.String menuName,
java.lang.String menuStubName,
java.lang.String RscriptName,
java.lang.String[] inputDataFileNames,
int[] inputDataTypes,
int processBits,
int genRbits,
java.lang.String[] outputDataFileNames,
int[] outputDataTypes,
java.lang.String[] setR2ClientFileNames,
java.lang.String[] setR2ClientObjNames,
int[] setR2ClientObjTypes,
java.lang.String scriptSpecificRoptions)
addRLO() - add new R LayOut (RLO) instance to the RLO database. |
void |
clearGenRbit(int bit)
clearGenRbit() - clear specific GenR Bit(s) for current RLO. |
void |
clearProcessBit(int bit)
clearProcessBit() - clear specific Process Bit(s) for current RLO. |
void |
clearRLOdb()
clearRLOdb() - clear list of R LayOuts analyses in the database |
int |
getAllGenRbits()
getAllGenRbits() - get GenR Bits using R_GENR_xxxx bits for current RLO. |
int |
getAllProcessBits()
|
int |
getCurrentRLOid()
getCurrentRLOid() - get the current RLO analysis method id |
java.lang.String |
getCurrentRLOmenuName()
getCurrentRLOmenuName() - get the current RLO analysis menu string name |
java.lang.String |
getCurrentRLOmenuStubName()
getCurrentRLOmenuStubName() - get the current RLO analysis menu stub string name |
java.lang.String |
getCurrentRLORscriptName()
getCurrentRLORscriptName() - get current RLO analysis .R script file name |
java.lang.String |
getFullRoutputFilePath()
getFullRoutputFilePath() - get full path of R output file after file setup |
java.lang.String |
getFullRscriptInputPath()
getFullRscriptInputPath() - full path of R input script file after file setup |
java.lang.String |
getFullRunRfilePath()
getFullRunRfilePath() - full path of batch R startup script file after file setup |
java.lang.String[] |
getInputDataFileNames()
getInputDataFileNames() - get current RLO list of input data file names |
int[] |
getInputDataTypes()
getInputDataTypes() - get current RLO list of input data file types |
java.lang.String |
getInputRscriptFileName()
getInputRscriptFileName() - get current name of .R input script file |
java.lang.String[] |
getListofRLOmenuNames()
getListofRLOmenuNames() - get list of all menuNames |
java.lang.String[] |
getListofRLOscriptNames()
getListofRLOscriptNames() - get list of all R script names |
int |
getNbrAnalyses()
getNbrAnalyses() - get the number of analyses in the RLO DB |
java.lang.String[] |
getOfileTypeDBmenus()
getOfileTypeDBmenus() - get the R output file type menus |
java.lang.String[] |
getOfileTypeDBnames()
getOfileTypeDBnames() - get the R output file type names |
int[] |
getOfileTypeDBtypes()
getOfileTypeDBtypes() - get the R output file type values |
java.lang.String[] |
getOutputDataFileNames()
getOutputDataFileNames() - get current RLO list of output data file names. |
int[] |
getOutputDataTypes()
getOutputDataTypes() - get current RLO list of output data file types |
java.lang.String[] |
getProcessBitsDBmenus()
getProcessBitsDBmenus() - get Export/Import ProcessBits DB menus |
java.lang.String[] |
getProcessBitsDBnames()
getProcessBitsDBnames() - get Export/Import ProcessBits DB names |
int[] |
getProcessBitsDBvalues()
getProcessBitsDBvalues() - get Export/Import ProcessBits DB values |
java.lang.String[] |
getR2ClientActionDBmenus()
getR2ClientActionDBmenus() - get R to client Actions DB menus |
java.lang.String[] |
getR2ClientActionDBnames()
getR2ClientActionDBnames() - get R to client Actions DB names |
int[] |
getR2ClientActionDBtypes()
getR2ClientActionDBtypes() - get R to client Actions DB type values |
java.lang.String[] |
getRdataTypeDBmenus()
getRdataTypeDBmenus() - get the R input file type menus |
java.lang.String[] |
getRdataTypeDBnames()
getRdataTypeDBnames() - get the R input file type names |
int[] |
getRdataTypeDBtypes()
getRdataTypeDBtypes() - get the R input file type values |
java.lang.String |
getReportBasePath()
getReportBasePath() - get current path of client |
java.lang.String |
getRLObasePath()
getRLObasePath() - get current path of |
int |
getRLOidByRscriptName(java.lang.String RscriptName)
getRLOidByRscriptName() - get the current RLO analysis method id by RscriptName |
java.lang.String |
getRLOinputFile(int lookForFileType,
int nth)
getRLOinputFile() get the nth Input Data file by input file type. |
java.lang.String |
getRLOoutFile(int lookForFileType,
int nth)
getRLOoutFile() get the nth Output Data file by out file type. |
java.lang.String |
getRLORlibrBasePath()
getRLORlibrBasePath() - get current base path of client RLORibr/ directory lives in "{installation directory}/". |
java.lang.String |
getRLOstring(java.lang.String optGenRbitsStr)
getRLOstring() - get prettyprint string for the current RLO |
java.lang.String |
getRreportStr()
getRreportStr() - get R report after doing eval of .R script after file setup |
java.lang.String |
getRscriptBasePath()
getRscriptBasePath() - get current path of |
java.lang.String |
getRstartupOptions()
getRstartupOptions() - get R command line startup options |
void |
getRstartupOptions(java.lang.String str)
setRstartupOptions() - set R command line startup options |
java.lang.String[] |
getSetR2ClientFileNames()
getSetR2ClientFileNames() - get current RLO list of R2Client data file names. |
java.lang.String[] |
getSetR2ClientObjNames()
getSetR2ClientObjNames() - get current RLO list of R2Client object names |
int[] |
getSetR2ClientObjTypes()
getSetR2ClientObjTypes() - get current RLO list of R2Client object types |
java.lang.String |
getStartupRscriptFileName()
getStartupRscriptFileName() - get name of batch R startup script file to exec() by the OS after file setup |
java.lang.String |
getTempBasePath()
getTempBasePath() - get current path of client |
boolean |
isGenRbit(int bit)
isGenRbit() - test GenR Bits for current RLO. |
boolean |
isProcessBit(int bit)
isProcessBit() - test Process Bits for current RLO. |
java.lang.String |
lookupOfileTypeDBmenu(int val)
lookupOfileTypeDBmenu() - lookup R output file type menu entry by value. |
java.lang.String |
lookupOfileTypeDBmenu(java.lang.String name)
lookupOfileTypeDBmenu() - lookup R output file type menu entry by name. |
int |
lookupOfileTypeDBvalue(java.lang.String name)
lookupOfileTypeDBvalue() - lookup R output file type value by name. |
java.lang.String |
lookupProcessBitsDBmenu(int i,
int val)
lookupProcessBitsDBmenu() - lookup Export/Import ProcessBits menu by value |
int |
lookupProcessBitsDBvalue(java.lang.String name)
lookupProcessBitsDBvalue() - lookup Export/Import ProcessBits value by name |
java.lang.String |
lookupR2ClientActionDBMenu(int val)
lookupR2ClientActionDBMenu() - lookup R to client Action menu by value |
java.lang.String |
lookupR2ClientActionDBMenu(java.lang.String name)
lookupR2ClientActionDBMenu() - lookup R to client Action menu by name |
int |
lookupR2ClientActionDBvalue(java.lang.String name)
lookupR2ClientActionDBvalue() - lookup R to client Action value by name |
java.lang.String |
lookupRdataTypeDBmenu(int val)
lookupRdataTypeDBmenu() - lookup export-types menu entry by value. |
java.lang.String |
lookupRdataTypeDBmenu(java.lang.String name)
lookupRdataTypeDBmenu() - lookup export-types menu entry by name. |
int |
lookupRdataTypeDBvalue(java.lang.String name)
lookupRdataTypeDBvalue() - lookup export-types value by name. |
int |
newRLO()
newRLO() - create new empty R LayOut (RLO) instance to the RLO database |
boolean |
readPermanentRLOdatabase(boolean loadDemoRLOsFlag)
readPermanentRLOdatabase() - read RLO entries from the permanent |
int |
readRLOfile(java.lang.String rloFileName,
boolean loadDemoRLOsFlag)
readRLOfile() - read RLO by .rlo file name into a new RLO (rloID). |
boolean |
rmvRLO(int rloIdToRemove)
rmvRLO() - remove the RLO from the analyses database |
java.lang.String |
runRscriptWithR()
runRscriptWithR() - compute report string by running R script through the R program. |
void |
setAllGenRbits(int bits)
setAllGenRbits() - set GenR Bits using R_GENR_xxxx bits for current RLO. |
void |
setAllProcessBits(int bits)
setAllProcessBits() - set Process Bits bits for current RLO. |
void |
setCurrentRLO(int analysisNbr)
setCurrentRLO() - set the current RLO analysis method by id |
void |
setDbugFlag(boolean flag)
setDbugFlag() set debugging flag to print to stdout if required |
void |
setGenRbit(int bit)
setGenRbit() - set specific GenR Bit(s) for current RLO. |
boolean |
setInputFilesData(java.lang.String[] fileNames,
int[] dataTypes)
setInputFilesData() - set current RLO list of input data (fileName,dataType) |
void |
setOfileTypeDB(java.lang.String[] names,
java.lang.String[] menus,
int[] values)
setOfileTypeDB() - set R output file-types (name,menu,type) database. |
boolean |
setOutputFilesData(java.lang.String[] fileNames,
int[] dataTypes)
setOutputFilesData() - set current RLO list of output data (fileName,dataType) |
void |
setProcessBit(int bit)
setProcessBit() - set specific Process Bit(s) for current RLO. |
void |
setProcessBitsDB(java.lang.String[] names,
java.lang.String[] menus,
int[] values)
setProcessBitsDB() - set the Export/Import ProcessBits (name,menu,type) database. |
void |
setR2ClientActionDB(java.lang.String[] names,
java.lang.String[] menus,
int[] values)
setR2ClientActionDB() - set R to client Actions (name,menu,type) DB. |
boolean |
setR2ClientActionsData(java.lang.String[] fileNames,
java.lang.String[] objNames,
int[] objTypes)
setR2ClientActionsData() - set cur. |
void |
setRdataTypeDB(java.lang.String[] names,
java.lang.String[] menus,
int[] values)
setRdataTypeDB() - set the export-types (name,menu,type) database. |
boolean |
setRLO(int rloID,
java.lang.String menuName,
java.lang.String menuStubName,
java.lang.String RscriptName,
java.lang.String[] inputDataFileNames,
int[] inputDataTypes,
int processBits,
int genRbits,
java.lang.String[] outputDataFileNames,
int[] outputDataTypes,
java.lang.String[] setR2ClientFileNames,
java.lang.String[] setR2ClientObjNames,
int[] setR2ClientObjTypes,
java.lang.String scriptSpecificRoptions)
setRLO() - set R LayOut (RLO) instance to the RLO database. |
void |
setRLOreportLoggingFlag(boolean flag)
setRLOreportLoggingFlag() - set RLO Report logging flag for creating subdirectory in {project}/Report/{RLOname}-yymmdd.hhmmss/ to store the RLO output files copied to Report/ |
boolean |
setupAllBasePaths(java.lang.String clientPrjPath)
setupAllBasePaths() - generate all base paths of directories |
void |
setUseSPLUSelseRengineFlag(boolean useSplusFlag)
setUseSPLUSelseRengineFlag() - specify if use R or S-PLUS statistics engine |
boolean |
writePermanentRLOdatabase()
writePermanentRLOdatabase() - write RLO entries to the permanent |
boolean |
writeRLOfile(java.lang.String rloBasePath,
int rloID)
writeRLOfile() - write RLO by .rlo file name for the specified RLO (rloID). |
Methods inherited from class MJAbase |
cvtHashtable2SimpleTable, cvtTable2Hashtable |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public MJAReval()
Method Detail |
public final void setUseSPLUSelseRengineFlag(boolean useSplusFlag)
useSplusFlag
- will use S-PLUS if true, else defaults to Rpublic final void setRdataTypeDB(java.lang.String[] names, java.lang.String[] menus, int[] values)
names
- is list of file names output by client and read by Rmenus
- is list of menu entriesvalues
- is list of corresponding valuespublic final void setOfileTypeDB(java.lang.String[] names, java.lang.String[] menus, int[] values)
names
- is list of file names output by Rmenus
- is list of menu entriesvalues
- is list of corresponding valuespublic final void setR2ClientActionDB(java.lang.String[] names, java.lang.String[] menus, int[] values)
names
- is list of names of actionsmenus
- is list of menu entriesvalues
- is list of corresponding type valuespublic final void setProcessBitsDB(java.lang.String[] names, java.lang.String[] menus, int[] values)
names
- is list of namesmenus
- is list of menu entriesvalues
- is list of corresponding valuespublic final java.lang.String lookupRdataTypeDBmenu(java.lang.String name)
name
- is the file name to lookuppublic final java.lang.String lookupRdataTypeDBmenu(int val)
value
- is the file name to lookuppublic final int lookupRdataTypeDBvalue(java.lang.String name)
name
- is the file name to lookuppublic final java.lang.String lookupOfileTypeDBmenu(java.lang.String name)
name
- is the file name to lookuppublic final java.lang.String lookupOfileTypeDBmenu(int val)
val
- is the file name to valpublic final int lookupOfileTypeDBvalue(java.lang.String name)
name
- is the file name to lookuppublic final java.lang.String lookupR2ClientActionDBMenu(java.lang.String name)
name
- is the name of entrypublic final java.lang.String lookupR2ClientActionDBMenu(int val)
value
- is of the actionpublic final java.lang.String lookupProcessBitsDBmenu(int i, int val)
i
- is ith process bitvalue
- is of the process bitpublic final int lookupR2ClientActionDBvalue(java.lang.String name)
name
- is the name of entrypublic final int lookupProcessBitsDBvalue(java.lang.String name)
name
- is the name to lookuppublic final java.lang.String[] getRdataTypeDBnames()
public final java.lang.String[] getRdataTypeDBmenus()
public final int[] getRdataTypeDBtypes()
public final java.lang.String[] getOfileTypeDBnames()
public final java.lang.String[] getOfileTypeDBmenus()
public final int[] getOfileTypeDBtypes()
public final java.lang.String[] getR2ClientActionDBnames()
public final java.lang.String[] getR2ClientActionDBmenus()
public final int[] getR2ClientActionDBtypes()
public final java.lang.String[] getProcessBitsDBnames()
public final java.lang.String[] getProcessBitsDBmenus()
public final int[] getProcessBitsDBvalues()
public final void setRLOreportLoggingFlag(boolean flag)
public final void setDbugFlag(boolean flag)
public final int getNbrAnalyses()
public final java.lang.String[] getListofRLOscriptNames()
public final java.lang.String[] getListofRLOmenuNames()
public final int newRLO()
public final int addRLO(java.lang.String menuName, java.lang.String menuStubName, java.lang.String RscriptName, java.lang.String[] inputDataFileNames, int[] inputDataTypes, int processBits, int genRbits, java.lang.String[] outputDataFileNames, int[] outputDataTypes, java.lang.String[] setR2ClientFileNames, java.lang.String[] setR2ClientObjNames, int[] setR2ClientObjTypes, java.lang.String scriptSpecificRoptions)
E.g., the following is an example that exports various types (4) of client data, generates 4 types of output files, and sets the client state from 2 of those files.
String inFiles[]= { "R-InputFile-XY-classNames.txt", "R-InputFile-X-sample-names.txt", "R-InputFile-Y-sample-names.txt", "R-InputFile-XY-sets-expr.txt" }; int inTypes[]= { R_DATA_TYPE_XY_CLASSNAMES, R_DATA_TYPE_HP_X_SET_SAMPLENAMES, R_DATA_TYPE_HP_Y_SET_SAMPLENAMES, R_DATA_TYPE_HP_XY_SETS }; int processBits= (R_PB_USE_FILTER | R_PB_SAMPLES_HDR); int genRbits= (R_GENR_HIST | R_GENR_LOWESS | R_GENR_PLOT); String outFiles[]= { "R-Stdout.txt", "R-OutputFile.pdf", "R-GeneSet.txt", "R-ConditionList.txt", "R-LowessTbl.txt"}; int outTypes[]= { R_FILE_TYPE_STDOUT, R_FILE_TYPE_PDF, R_FILE_TYPE_TAB_DELIM_TBL, R_FILE_TYPE_TAB_DELIM_TBL, R_FILE_TYPE_TAB_DELIM_TBL}; String setR2ClientFiles[]= { "R-GeneSet.txt", "R-ConditionList.txt"}; String setR2ClientObjs[]= { "Clustered-Genes", "Similar-Samples" }; int setR2ClientType[]= { R_SET_R2Client_GENE_SET, R_SET_R2Client_CONDITION_LIST }; String scriptSpecificRoptions= "--vsize=20M"; addRLO( "Analyze HP-XY 'set' expression data", "Plugins:RLOmethods", "clientAnalyzeXYsets.R", inFiles, inTypes, processBits, genRbits, outFiles, outTypes, setR2ClientFiles, setR2ClientObjs, setR2ClientType, scriptSpecificRoptions );
menuName
- text description of the RLO entrymenuStubName
- used by client to put RLO menu entry in a
particular menu.RscriptName
- is the name of the .R fileinputDataFileNames
- opt. list of R input data file namesinputDataTypes
- corresponding list of R input data file typesprocessBits
- used during evalgenRbits
- set during edit by R script GUIoutputDataFileNames
- opt. list of R output data file namesoutputDataTypes
- corresponding list of R output data file typessetR2ClientFileNames
- opt. list of file names to set R output data
to client state objectssetR2ClientObjNames
- opt. list of client object names to
set R output data to client state objectssetR2ClientObjType
- opt. list of client object types
to set R output data to client state objectsscriptSpecificRoptions
- public final boolean setRLO(int rloID, java.lang.String menuName, java.lang.String menuStubName, java.lang.String RscriptName, java.lang.String[] inputDataFileNames, int[] inputDataTypes, int processBits, int genRbits, java.lang.String[] outputDataFileNames, int[] outputDataTypes, java.lang.String[] setR2ClientFileNames, java.lang.String[] setR2ClientObjNames, int[] setR2ClientObjTypes, java.lang.String scriptSpecificRoptions)
E.g., the following is an example that exports various types (4) of client data, generates 4 types of output files, and sets the client state from 2 of those files.
int rloID= 10; String inFiles[]= { "R-InputFile-XY-classNames.txt", "R-InputFile-X-sample-names.txt", "R-InputFile-Y-sample-names.txt", "R-InputFile-XY-sets-expr.txt" }; int inTypes[]= { R_DATA_TYPE_XY_CLASSNAMES, R_DATA_TYPE_HP_X_SET_SAMPLENAMES, R_DATA_TYPE_HP_Y_SET_SAMPLENAMES, R_DATA_TYPE_HP_XY_SETS }; int processBits= (R_PB_USE_FILTER | R_PB_SAMPLES_HDR); int genRbits= (R_GENR_HIST | R_GENR_LOWESS | R_GENR_PLOT); String outFiles[]= { "R-Stdout.txt", "R-OutputFile.pdf", "R-GeneSet.txt", "R-ConditionList.txt", "R-LowessTbl.txt"}; int outTypes[]= { R_FILE_TYPE_STDOUT, R_FILE_TYPE_PDF, R_FILE_TYPE_TAB_DELIM_TBL, R_FILE_TYPE_TAB_DELIM_TBL, R_FILE_TYPE_TAB_DELIM_TBL}; String setR2ClientFiles[]= { "R-GeneSet.txt", "R-ConditionList.txt" }; String setR2ClientObjs[]= { "Clustered-Genes", "Similar-Samples" }; int setR2ClientType[]= { R_SET_R2Client_GENE_SET, R_SET_R2Client_CONDITION_LIST }; String scriptSpecificRoptions= "--vsize=20M"; setRLO(rloID, "Analyze HP-XY 'set' expression data", "Plugins:RLOmethods", "clientAnalyzeXYsets.R", inFiles, inTypes, processBits, genRbits, outFiles, outTypes, setR2ClientFiles, setR2ClientObjs, setR2ClientType, scriptSpecificRoptions );
rloID
- is the RLO to assign new datamenuName
- text description of the RLO entrymenuStubName
- used by client to put RLO menu entry in a
particular menu.RscriptName
- is the name of the .R fileinputDataFileNames
- opt. list of R input data file namesinputDataTypes
- corresponding list of R input data file typesprocessBits
- used during evalgenRbits
- used during edit by R script GUIoutputDataFileNames
- opt. list of R output data file namesoutputDataTypes
- corresponding list of R output data file typessetR2ClientFileNames
- opt. list of file names to set R output data
to client state objectssetR2ClientObjNames
- opt. list of client object names to
set R output data to client state objectssetR2ClientObjType
- opt. list of client object types
to set R output data to client state objectsscriptSpecificRoptions
- public final boolean rmvRLO(int rloIdToRemove)
rloIdToRemove
- to removepublic final void clearRLOdb()
public final int getRLOidByRscriptName(java.lang.String RscriptName)
RscriptName
- to lookup in the databasepublic final int getCurrentRLOid()
public final void setCurrentRLO(int analysisNbr)
analysisNbr
- to set as the current analysis methodpublic final java.lang.String getCurrentRLOmenuName()
public final java.lang.String getCurrentRLOmenuStubName()
public final java.lang.String getCurrentRLORscriptName()
public final java.lang.String[] getInputDataFileNames()
public final int[] getInputDataTypes()
public final java.lang.String[] getOutputDataFileNames()
public final int[] getOutputDataTypes()
public final java.lang.String[] getSetR2ClientFileNames()
public final java.lang.String[] getSetR2ClientObjNames()
public final int[] getSetR2ClientObjTypes()
public final boolean setInputFilesData(java.lang.String[] fileNames, int[] dataTypes)
fileNames
- - list of input files namesdataTypes
- - list of input files data typespublic final boolean setOutputFilesData(java.lang.String[] fileNames, int[] dataTypes)
fileNames
- - list of input files namesdataTypes
- - list of input files data typespublic final boolean setR2ClientActionsData(java.lang.String[] fileNames, java.lang.String[] objNames, int[] objTypes)
fileNames
- - list of R2Client file namesobjNames
- - list of R2Client object namesobjTypes
- - list of R2Client object typespublic final int getAllProcessBits()
public final void setAllProcessBits(int bits)
bits
- to use in set in RLO process bits patternpublic final boolean isProcessBit(int bit)
bit
- to test in RLO process bits patternpublic final void clearProcessBit(int bit)
bit
- to clear in RLO process bits patternpublic final void setProcessBit(int bit)
bit
- to clear in RLO process bits patternpublic final int getAllGenRbits()
public final void setAllGenRbits(int bits)
bits
- to use in set in RLO GenR Bits patternpublic final boolean isGenRbit(int bit)
bit
- to test in RLO GenR Bits patternpublic final void clearGenRbit(int bit)
bit
- to clear in RLO GenR Bits patternpublic final void setGenRbit(int bit)
bit
- to clear in RLO GenR Bits patternpublic final java.lang.String getRLOoutFile(int lookForFileType, int nth)
lookForFileType
- is one of R_FILE_TYPE_xxxx valuesnth
- is the nth instance to return (counting from 1 - not 0!)public final java.lang.String getRLOinputFile(int lookForFileType, int nth)
lookForFileType
- is one of R_FILE_TYPE_xxxx valuesnth
- is the nth instance to return (counting from 1 - not 0!)public final java.lang.String getRstartupOptions()
public final void getRstartupOptions(java.lang.String str)
str
- startup option stringpublic final java.lang.String getRLOstring(java.lang.String optGenRbitsStr)
optGenRbitsStr
- optional genRbits representation computed
elsewhere.public final boolean setupAllBasePaths(java.lang.String clientPrjPath)
1. RbinBasePath is the executable bin directory for running R in, 2. reportBasePath for saving reports in {project}/Report/, 3. RscriptBasePath is the {client installation}/R/ for .R scripts, 4. tempBasePath is the {project}/Temp/ directory used for R data input, 5. clientRlibrBasePath is " /lib" dir where R project {RLORlibr}/ directory lives
clientPrjPath
- is the client project base path. If this is null,
then it uses the current client project path.#setupRbinPath
public final java.lang.String runRscriptWithR()
public final java.lang.String getReportBasePath()
public final java.lang.String getRscriptBasePath()
public final java.lang.String getRLObasePath()
public final java.lang.String getTempBasePath()
public final java.lang.String getRLORlibrBasePath()
public final java.lang.String getStartupRscriptFileName()
public final java.lang.String getInputRscriptFileName()
public final java.lang.String getFullRunRfilePath()
public final java.lang.String getFullRscriptInputPath()
public final java.lang.String getFullRoutputFilePath()
public final java.lang.String getRreportStr()
public final boolean readPermanentRLOdatabase(boolean loadDemoRLOsFlag)
loadDemoRLOsFlag
- to not read demo databasespublic final boolean writePermanentRLOdatabase()
public final int readRLOfile(java.lang.String rloFileName, boolean loadDemoRLOsFlag)
rloFileName
- full path file name for .rlo fileloadDemoRLOsFlag
- if want to force loading the Demo RLOpublic final boolean writeRLOfile(java.lang.String rloBasePath, int rloID)
rloBasePath
- is the base path of the RLO/ directoryrloID
- to save as .rlo file
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |