To check that MATLAB is on your path:
1. Open a DOS window.
2. Type
matlab and press Enter.
If the MATLAB application starts, MATLAB is on your path.
If MATLAB is not on your path, add it:
1. Select Start>Settings>Control Panel.
2. Double-click
System.
3. Select the Advanced tab.
4. Click the
Environment Variables button.
5. Select or create the PATH variable.
6. Add the
$MATLAB_ROOT/bin directory to the path.
Open a new DOS window and check again that MATLAB is on your path.
Preferred Command Line
On platforms other than Windows, the execution of the command line differs slightly due to variations in the Java
Virtual Machines (VMs) that GenePattern is running. If you use the simple
matlab command, as described for
Windows, the Java VMs on these platforms attempt to parse and quote the command line resulting in MATLAB
generating errors in its
eval function.
On these platforms, you must use a wrapper Java class to launch MATLAB. This wrapper class also works on
Windows and does not rely on the PATH variable, which makes it the preferred method for implementing the direct
approach on any platform.
To use the wrapper Java class:
1. On the GenePattern task definition form, add the
runmatlab.jar file as a support file. To request a copy of
this file, send e-mail to
[email protected]du; alternatively, the java source code for the RunMatlab wrapper class is included here:
RunMatlab.java.
2. Write your command line as follows:
<java> -cp <libdir>runmatlab.jar RunMatlab analyzeThis <p1> <p2>
Where analyzeThis is the name of your MATLAB entry function name and <p1> and <p2> are the
arguments to the function. The
RunMatlab class ensures that the arguments are correctly written out and calls
MATLAB with the
-nosplash and -nodisplay arguments.
Compiled Approach Distribution
Creating Tasks describes how to create a GenePattern task that invokes the code that you have written. This section
provides additional information that applies when you are compiling your M-code into a standalone executable and
invoking that executable from the GenePattern task:
●
Preparing the GenePattern Server
● Writing the Launcher Script
●
Writing the Module Command Line
●
Adding Support Files
●
Distribution Licensing
Preparing the GenePattern Server
To run a standalone executable generated by the MATLAB Compiler, the GenePattern server must have the
MATLAB Component Runtime (MCR) installed. This is a collection of shared libraries, which contains the runtime
code for MATLAB, that is used by the standalone application. If the GenePattern server has MATLAB installed, you
do not need to install the MCR; it is already installed.
Full details for installing the MCR can be found in the
MATLAB Compiler documentation, in the section titled
“Deployng Components to Other Machines”. To summarize this documentation, on the GenePattern server machine,
you need to run the MCRInstaller:
11
Commenti su questo manuale