The way threads work in Java is that there has to be a class implementing either Runnable interface of extends Thread class. Either way, run method must be overridden wihh desired functionality. From the client class, a new thread must be created (as below) where the first argument passed is an an instance of the class you want executed as a separate thread. Once this is done, the thread can be started by invoking start method.
Thread thrd = new Thread(new ClassImplementingThreadFunc(param1,param2));
Thread thrd2 = new Thread(new ClassImplementingThreadFunc(newParam1,newParam2));
thrd.start();
thrd2.start();
Showing posts with label DynamicBLAST. Show all posts
Showing posts with label DynamicBLAST. Show all posts
Wednesday, July 11, 2007
Thursday, June 21, 2007
Dynamic BLAST installation and execution requirements (v0.6)
Dynamic BLAST (v0.6)
Required libraries (these must be specified in CLASSPATH)
drmaa.jar (located in $dBLAST_LOCATION/lib)
JSAP-21.jar (located in $dBLAST_LOCATION/lib)
mysql-connector-java-5.0.7-bin.jar (located in $dBLAST_LOCATION/lib)
Required source files (package com.dBLAST.util)
DynamicBLAST_6.java
ReadProperties.java
Properties files
propsLS.properties
analysis.properties
[props.properties] (pre-configured properties file for BLAST runs)
External applications/scripts
analyze.pl
runCat.pl
runGWHOST.pl
querySplittingOnly_v2.pl
Input files
first100.fas
Compiling the application
While in base directory (e.g., /home/afgane/dBLAST), execute:
javac -d bin/ src/com/dBLAST/util/*.java
(-d option specifies where to store class files. It will create all the package subdirectories from the specified folder (e.g., by specifying bin/, it will
create bin/com/dBLAST/util/ and put all class files there))
There is also a compile.sh script that automates above process.
Invoking the application
Must first execute (if not provided in .bashrc):
export dBLAST_LOCATION=/home/afgane/dBLAST
export CLASSPATH=$dBLAST_LOCATION/bin/:$dBLAST_LOCATION/lib/JSAP-2.1.jar:$CLASSPATH
Usage: java com.dBLAST.util.DynamicBLAST_6 [(-p|--propertiesFile)] [-g|--modeGrid] [(-q|--queryFile) ] [(-d|--database) ] [-f ] [-c|--clean] [-h|--help]
[(-p|--propertiesFile)]
Propeties file provding job arguments and options. (default:
propsLS.properties)
[-g|--modeGrid]
If switch present, analysis and fragmentation are performed on GRID
resources rather than using LOCAL resource.
[(-q|--queryFile)]
Query input file to be used for the job (if another value is present in
the job properties file, value associated with this switch overrides
it).
[(-d|--database)]
Query input file to be used for the job (if another value is present in
the job properties file, value associated with this switch overrides
it).
[-f]
Defines number of fragments to be created. Once created, they are
randomly distributed to chose resources.
[-c|--clean]
Clean temporary files (most of them).
[-h|--help]
Displays this help.
Required libraries (these must be specified in CLASSPATH)
drmaa.jar (located in $dBLAST_LOCATION/lib)
JSAP-21.jar (located in $dBLAST_LOCATION/lib)
mysql-connector-java-5.0.7-bin.jar (located in $dBLAST_LOCATION/lib)
Required source files (package com.dBLAST.util)
DynamicBLAST_6.java
ReadProperties.java
Properties files
propsLS.properties
analysis.properties
[props.properties] (pre-configured properties file for BLAST runs)
External applications/scripts
analyze.pl
runCat.pl
runGWHOST.pl
querySplittingOnly_v2.pl
Input files
first100.fas
Compiling the application
While in base directory (e.g., /home/afgane/dBLAST), execute:
javac -d bin/ src/com/dBLAST/util/*.java
(-d option specifies where to store class files. It will create all the package subdirectories from the specified folder (e.g., by specifying bin/, it will
create bin/com/dBLAST/util/ and put all class files there))
There is also a compile.sh script that automates above process.
Invoking the application
Must first execute (if not provided in .bashrc):
export dBLAST_LOCATION=/home/afgane/dBLAST
export CLASSPATH=$dBLAST_LOCATION/bin/:$dBLAST_LOCATION/lib/JSAP-2.1.jar:$CLASSPATH
Usage: java com.dBLAST.util.DynamicBLAST_6 [(-p|--propertiesFile)
[(-p|--propertiesFile)
Propeties file provding job arguments and options. (default:
propsLS.properties)
[-g|--modeGrid]
If switch present, analysis and fragmentation are performed on GRID
resources rather than using LOCAL resource.
[(-q|--queryFile)
Query input file to be used for the job (if another value is present in
the job properties file, value associated with this switch overrides
it).
[(-d|--database)
Query input file to be used for the job (if another value is present in
the job properties file, value associated with this switch overrides
it).
[-f
Defines number of fragments to be created. Once created, they are
randomly distributed to chose resources.
[-c|--clean]
Clean temporary files (most of them).
[-h|--help]
Displays this help.
Subscribe to:
Posts (Atom)