Thursday, June 21, 2007

Using my code with Java packages

1. After having created Java packages, copy over the entire directory structure to desired machine (e.g., source files are in /home/afgane/dBLAST/src/com/dBLAST/util).
2. In order to compile the code, in base dir (e.g., /home/afgane/dBLAST), execute
javac -d bin/ src/com/dBLAST/util/*.java
The -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).
3. In order to execute the code, first you must export directory where class files are. This can be done either by editing .bashrc file and adding a line such as the following one to it
export CLASSPATH=/home/afgane/dBLAST/bin/:$CLASSPATH
Alternatively, you can do it manually and executing that same line for each login session.
4. Finally, run the code by executing java com.dBLAST.util.DynamicBLAST_6 props.properties, for example from any directory.

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.

Porting EndNote references from ver. 7 to ver. 8

The source of the problem is that EndNote 8 and later export the data as a UTF-8 Unicode document, not as traditional ANSI text. Reference Manager, ProCite, and earlier versions of EndNote are not Unicode compatible, so they need the document to be plain ANSI text. To resolve this problem, do the following:

1. Export the EndNote 8 or later library to a plain text file (.txt) using the Refer Export format:
a. Open the library in EndNote 8 or later and make sure all references are showing.Select "Refer Export" as the output style by going to Edit->Output Styles (if Refer Export is not available, add it by clicking on Open Style Manager and selecting it for edit. Then, instead of editing it, just exit that form)
b. Select File->Export..., enter a file name, and save the file to a convenient location such as your desktop as plain .txt file.

2. Open the text file you exported from EndNote in Microsoft Word. When Word prompts you for the encoding option, select "Other Encoding" and "Unicode (UTF-8)" as the options.

3. In Word select "File > Save As" and save the document with a new name as plain text with Windows-default as the encoding option.

4. Import the Refer Export text file into the earlier version of EndNote:
a. In the older version of EndNote create a new library or open an existing one. Select File->Import. Click the "Choose File" button and select the text file you just created. Under "Import Option" select "Refer/BibIX"
b. Click the "Import" button.

More documentation available here and here.

Tuesday, June 19, 2007

Installing Mozart Oz and Cygwin on Windows XP

1. Mozart-Oz needs to be installed using typical Windows installation procedure
2. Cygwin needs to be installed using typical Windows installation (this is bare bones, so install packages such as vi and gcc - also, 'more' command does not work in cygwin so create alias in .bashrc file to use 'less' command then typing 'more'). Windows drives can be accessed from cygwin by going to /cygdrive directory.
3. Emacs needs to be installed. Install Windows version (not the cygwin package).
4. Run addpm.exe in emacs bin subdirectory from windows explorer. This will integrate/install emacs into the Windows environment.
5. Create symbolic link in /usr/bin to point to emacs (e.g., ls -s /cygdrive/c/Program\ Files/emacs/bin/emacs.exe emacs)
6. Define environment variable OZEMACS in Windows (Ctlr Panel->System->Advanced->Env. Var) to point to emacs.exe.
7. Start cygwin and type oz to get going...