MATLAB APPLICATION DEPLOYMENT - WEB EXAMPLE GUIDE Manual do Utilizador Página 17: Running a Program
GenePattern Java Library
The GenePattern Java library allows you to invoke a GenePattern task as if it were a local Java method running on
your client and to get back from the task a list of result files. A zip file containing the Java library (and Javadoc that
describes the API for accessing the server and running tasks) is available on your GenePattern server.
To download the GenePattern Java library to your computer:
1.
Start the GenePattern Web Client.
2.
Under Programming Libraries in the right column, click the
zip
link for the Java library.
3.
After downloading the zip file, unzip it into the directory where you will be doing your Java development.
Running a Program
This section explores a simple Java application that preprocesses a dataset and displays it using the
HeatMapViewer. The included code can be copied and pasted into your Java program so that you can try it out,
modify it, and create your own solutions. The full source code of the sample application is available
here
.
The first statements in the application initialize various settings, which you must do once in every application that
accesses GenePattern. You will need to customize the
italicized
GenePattern server URL and GenePattern user
name (typically, your e-mail address) with values appropriate for your GenePattern server.
import
org.genepattern.data.expr.ExpressionData;
import
org.genepattern.client.GPServer;
import
org.genepattern.webservice.JobResult;
import
org.genepattern.webservice.Parameter;
import
org.genepattern.io.IOUtil;
import
java.io.File;
public
class
MyProgram
{
public static
void
main
(String[] args)
throws
Exception
{
GPServer gpServer
=
new
GPServer
(
"
http://localhost:8080
"
,
"
your email address"
);
After initializing the required settings, the application runs the PreprocessDataset task to preprocess a dataset. This
example references the dataset using a publicly-accessible URL, but a filename would be equally valid. When you
invoke the
runAnalysis
method, the GenePattern library invokes the appropriate task on the server, passing all of
the input parameters and input files. Control returns to your application when the task completes. (To run a task
asynchronously, invoke the
runAnalysis
method in a separate thread.)
String inputDataset
=
"ftp://ftp.broad.mit.edu/pub/genepattern/all_aml/all_aml_train.res"
;
JobResult preprocess
=
gpServer.
runAnalysis
(
"PreprocessDataset"
,
new
Parameter[]
{
new
Parameter
(
"input.filename"
, inputDataset)
}
);
When the task completes, you can query the
JobResult
object for an array of filenames that are the output from
the task. You can download the result files or leave them on the server and refer to them by URL. Referring to result
files by URL is especially useful for intermediate results. In this example, the
JobResult
object named
preprocess
contains a list of filenames (of length 1, in this case), which the application displays in a heat map:
// view results in a HeatMapViewer visualizer
17
gpServer.
runVisualizer
(
"HeatMapViewer"
,
Ficheiro PDF · ·
Perguntas sobre MATLAB APPLICATION DEPLOYMENT - WEB EXAMPLE GUIDE
Ainda não há perguntas sobre este manual. Faça a primeira.
Manuais e produtos relacionados com Software MATLAB APPLICATION DEPLOYMENT - WEB EXAMPLE GUIDE
- Software MATLAB CURVE FITTING TOOLBOX - RELEASE NOTES Manual do Utilizador
(54 páginas) - Software MATLAB GAUGES BLOCKSET RELEASE NOTES Guia do Utilizador
(114 páginas) - Software MATLAB EMBEDDED IDE LINK 4 - FOR USE WITH TEXAS INSTRUMENTS CODE COMPOSER STUDIO Especificações
(126 páginas) - Software MATLAB SIMULINK 7 - GRAPHICAL USER INTERFACE Especificações
(216 páginas) - Software MATLAB REAL-TIME WORKSHOP 7 - TARGET LANGUAGE COMPILER Guia do Utilizador
(386 páginas) - Software MATLAB BUILDER EX 1 Guia do Utilizador
(164 páginas) - Software MATLAB DATABASE TOOLBOX RELEASE NOTES Manual do Utilizador
(37 páginas) - Software MATLAB VIDEO AND IMAGE PROCESSING BLOCKSET 3 Guia do Utilizador
(252 páginas) - Software MATLAB SYSTEMTEST RELEASE NOTES Guia de Instalação
(237 páginas) - Software MATLAB TARGET SUPPORT PACKAGE - RELEASE NOTES Manual do Utilizador
(54 páginas) - Software MATLAB REAL-TIME WORKSHOP 7 - TARGET LANGUAGE COMPILER Manual de Serviço
(282 páginas) - Software MATLAB PARTIAL DIFFERENTIAL EQUATION TOOLBOX 1 Manual do Utilizador
(18 páginas) - Software MATLAB IMAGE ACQUISITION TOOLBOX - RELEASE NOTES Guia do Utilizador
(574 páginas) - Software MATLAB IMAGE ACQUISITION TOOLBOX 3 Guia do Utilizador
(408 páginas) - Software MATLAB XPC TARGET RELEASE NOTES Manual do Utilizador
(51 páginas) - Software MATLAB TARGET SUPPORT PACKAGE - RELEASE NOTES Manual do Utilizador
(42 páginas) - Software MATLAB BUILDER JA 2 Guia do Utilizador
(292 páginas) - Software MATLAB SIMULINK 7 - DEVELOPING S-FUNCTIONS Guia do Utilizador
(210 páginas) - Software MATLAB SIMULINK 7 - GRAPHICAL USER INTERFACE Guia do Utilizador
(759 páginas) - Software MATLAB CONTROL SYSTEM TOOLBOX 9 Especificações
(591 páginas)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22