Powered by Zope
Software.biostat
 
  UW
    UW SPHCM
    UW Biostat
    UW WebPine
  FHCRC
  Google
 
Directories
 
  UW Directories
  FHCRC directories
 
Help
 
  Brown Bags
  Software Help
 
Research Links
 
  Comp Projects
  Data sets
  Genomic Databases
 
References
 
  UW Library
  CIS
  CiteSeer
  JSTOR
  PubMed
  StatBib
 
Stat Software
 
  MCMC
    Hydra
    NKC
  BUGS
  ESS
  Stat CD (MS)
  Omegahat
  Orca
  S
    R
        CRAN
        JL's R code
        R-PVM bindings
    S-PLUS
  SAS
  SNAKE
    PYPVM fixes
    R-PVM bindings
  Stata
  Specialized Tools
  XLispStat
    ARC
    ViSta
 
Operating Systems
 
  Debian
    OpenMosix
    MOSIX
  Microsoft
    Stat CD
  Solaris
 
Local Transport
 
  UW <-> HMC
  Hutch Shuttle
  Metro (Bus)
    Metro Busview
 
 

Installing HYDRA

Note: These instructions are too brief. Feel free to email questions, suggestions--or better yet, an improved version.

Step 1: Download the Hydra package.

The Hydra package is provided in three forms:

Each file contains source code, javadoc documentation, example files, and two additional java packages (the JAMA Matrix package, and Merlin Hughes' DataReader package).

You will also need to download and install Visual Numerics' JNL package.

Step 2: Unpack

Move the package file you downloaded to the directory where you wish installation to occur. The un-archiving program will create a directory named "Hydra" that contains all of the Hydra files.

On Unix-like systems

  • Using GNU tar (and gzip)
    tar -xvzf filename.tgz
  • Using non-GNU tar
    gzip -c filename.tgz | tar -xvf -
  • Unpacking using the Java "jar" command
    jar -xvf filename.jar

On Microsoft Windows Systems

Use your favorite unarchiving program (WinZip, or whatever). Make sure to specify that directories should be created (this should be the default). Otherwise you will end up with a million files in one directory and things won't work.

Step 3: Download and install the Java Numerics Library (JNL) from VisualNumerics.

The JNL package and installation instructions are available from http://www.vni.com/products/wpd/jnl/.

Step 4: Add the Hydra package to your classpath

For Hydra to work, four items must be listed in the CLASSPATH environment variable.
  1. The directory where you installed Hydra
  2. the Jama jar file (included with Hydra),
  3. the DataReader jar file (included with Hydra), and
  4. the location of the VisualNumerics classes (installed in Step 3).

On Unix-like Systems

I unpacked Hydra in my home directory, so that the Hydra directory is $HOME/Hydra. I installed the JNL package in $HOME/Java/jnl, so that the JNL classes are located under $HOME/Java/jnl/JNL/Classes.

Thus my CLASSPATH variable needs to contain:

$HOME/Hydra:$HOME/Hydra//Jama-1.0.1.jar:$HYDRA_DIR/DataReader.jar:$HOME/Java/jnl/JNL/Classes

With a sh-compatible shell (sh,bash) this can be added to the CLASSPATH variable using the command:

export CLASSPATH=$CLASSPATH:$HOME/Hydra:$HOME/Hydra//Jama-1.0.1.jar:$HYDRA_DIR/DataReader.jar:$HOME/Java/jnl/JNL/Classes

With a csh-compatible shell (csh,tcsh,ksh) this can be added to the CLASSPATH variable using the command:

setenv CLASSPATH $CLASSPATH:$HOME/Hydra:$HOME/Hydra//Jama-1.0.1.jar:$HYDRA_DIR/DataReader.jar$HOME/Java/jnl/JNL/Classes

You will probably want to add the command that sets your classpath to your shell inialization file (usually one or more of $HOME/.cshrc, $HOME/.tcshrc, $HOME/.bashrc, $HOME/.profile, etc.)

On Microsft Windows Systems

I installed Hydra in C:\Pfizer\My Stuff\Hydra. I installed the VisualNumerics classes in C:\Pfizer\My Stuff\jnl,  so the path to the class files is C:\Pfizer\My Stuff\jnl\Jnl\Classes

Thus, my CLASSPATH variable needs to contain:

C:\Pfizer\My Stuff\Hydra;C:\Pfizer\My Stuff\Hydra\Jama-1.0.1.jar;C:\Pfizer\My Stuff\Hydra\DataReader.jar;C:\Pfizer\My Stuff\jnl\Jnl\Classes

At the MSDOS prompt, or in a batch file, this can be accomplished using the command

SET CLASSPATH=C:\Pfizer\My Stuff\Hydra;C:\Pfizer\My Stuff\Hydra\Jama-1.0.1.jar;C:\Pfizer\My Stuff\Hydra\DataReader.jar;C:\Pfizer\My Stuff\jnl\Jnl\Classes

For information on other methods for setting your class path permenantly see http://java.sun.com/j2se/1.3/docs/tooldocs/win32/classpath.html.

Step 5: Run the example programs

I've include several example programs in the directory org/omegahat/Simulations/MCMC/NKC/Examples. These are

  • Binomial_BetaBinomialExample,
  • Binomial_BetaBinomial_Example,
  • Binomial_BetaBinomial_Example_II,
  • Binomial_BetaBinomial_Example_III,
  • Binomial_BetaBinomial_Example_NKC,
  • Binomial_BetaBinomial_Example_NKC_BiMode
(There are other examples sprinkled around, go spelunking.)

I've created batch/script files for both Unix-like systems and Windows systems that will set the CLASSPATH variable and then run each of these examples. Before using either script, you will need to edit it to use the correct paths.

  • For Unix-like systems the shell script is
    RunExamples.sh.
  • For Microsoft Windows Systems, the shell script is
    RUN.BAT.

Step 6: Read the documentation

  1. A technical report showing describing the features of Hydra and giving a brief tutorial using an example problem is provided in the file UsingHydra.pdf.
  2. Javadoc documentation is HTML format stored in the doc directory.
  3. There is additional documentation on the individual classes stored in the source *.jweb files.

Step 7: Start Experimenting

Once you have the examples working, you can start modifying them (they live under Hydra/org.omegahat/Simulations/MCMC/NKC/Examples) to change how they work.

To do this, first copy one of the files, say Binomial_BetaBinomial_Example.java to a new name, say, BBE.java, edit the file so that the class name matches the file name. Now you should be able to compile it by typing

javac BBE.java
at the shell or MSDOS prompt (in the Hydra/org/omegahat/Simulation/MCMC/NKC/Examplesdirectory).

You should be able to run this new class by typing

java Hydra/org.omegahat/Simulation/MCMC/NKC/Examples/BBE

Step 8: Give Feedback

I hope that you find Hydra useful, if so please send examples of how you are using it, what features you would like to see, and any problems or bugs you run into. Example data and programs will be particulary helpful.

-Greg Warnesgreg@warnes.net
 
Comments and Feedback