Biowulf at the NIH
RSS Feed
Eigensoft on Biowulf

The EIGENSOFT package combines functionality from population genetics methods (Patterson et al. 2006) and EIGENSTRAT stratification correction me thod (Price et al. 2006). The EIGENSTRAT method uses principal components analysis to explicitly model ancestry differences between cases and controls along continuous axe s of variation; the resulting correction is specific to a candidate marker’s variation in frequency across ancestral populations, minimizing spurious associations while maximizing power to detect true associations. The EIGENSOFT package has a built-in plotting script and supports multiple file formats and quantitative phenotypes.

Eigensoft was developed at Harvard Genetics Department and the Broad Institute.

Eigensoft can be run interactively on Helix. See http://helix.nih.gov/Applications/eigensoft.html

It can also be run on Biowulf cluster. To run many jobs simultaneously, use 'swarm' utility. User can also run long jobs interactively on nodes.

 

The environment variable(s) need to be set properly first. The easiest way to do this is by using the modules commands as in the example below.

[user@biowulf]$ module avail eigensoft
----------------------------- /usr/local/Modules/3.2.9/modulefiles --------------------------
eigensoft/2.0          eigensoft/3.0          eigensoft/4.2(defaul

[user@biowulf]$ module load eigensoft

[user@biowulf]$ module list
Currently Loaded Modulefiles:
1) eigensoft/4.2 [user@biowulf]$ module unload eigensoft [user@biowulf]$ module load eigensoft/3.0 [user@biowulf]$ module list Currently Loaded Modulefiles: 1) eigensoft/3.0 [user@biowulf]$ module show eigensoft ------------------------------------------------------------------- /usr/local/Modules/3.2.9/modulefiles/eigensoft/4.2: module-whatis Sets up eigensoft 4.2 prepend-path PATH /usr/local/apps/eigensoft/4.2/bin -------------------------------------------------------------------

 

Submitting a swarm of Eigensoft jobs

The swarm program is a convenient way to submit large numbers of jobs all at once instead of manually submitting them one by one.

There are sample files under /usr/local/eigensoft/EIGENSTRAT/. User can copy them into the directory just created.

1. First create different directories for each eigensoft run. Put all the required input files under the created directories

2. For each directory, create a script file (named script1 in this example) which contains the one command per line as below. :

-------------------------/data/$USER/eigensoft/cmdfile -------------------------
cd /data/$USER/eigensoft/run1; smartpca.perl -i example.geno \ 
-a example.snp -b example.ind -k 5 -o example.pca -p example.plot \
-e example.eval -l example.log -m maxiter -t topk -s sigma; eigenstrat \
-i example.geno -j example.pheno -p example.pca -l 1 -o example.chisq; \
gc.perl example.chisq example.chisq.out
cd /data/$USER/eigensoft/run2; smartpca.perl -i example.geno \
-a example.snp -b example.ind -k 5 -o example.pca -p example.plot \
-e example.eval -l example.log -m maxiter -t topk -s sigma; eigenstrat \
-i example.geno -j example.pheno -p example.pca -l 1 -o example.chisq; \
gc.perl example.chisq example.chisq.out
[....]
------------------------------------------------------------------------------

3. Submit the swarm job.

There are one flag of swarm that's required '-f'

-f: the swarm command file name above (required)
--module: setup eigensoft environmental variable for each swarm job

By default, each line of the commands above will be executed on '1' processor core of a node and uses 1GB of memory. If this is not what you want, you will need to specify '-g' flag when you submit the job on biowulf.

Say if each line of the commands above also will need to use 2gb of memory instead of the default 1gb of memory, make sure swarm understands this by including '-g 2' flag:

biowulf> $ swarm --module eigensoft -g 2 -f cmdfile

For more information regarding running swarm, see swarm.html

 

Submit a single Eigensoft batch job

1. Create a script along the following lines:

---------- /data/$USER/eigensoft/script --------------
#!/bin/bash
#PBS -N EigensoftJobName
#PBS -m be
#PBS -k oe

module load eigensoft
cd /data/$USER/YourDirectory
smartpca.perl -i example.geno -a example.snp -b example.ind \
-k 5 -o example.pca -p example.plot -e example.eval \
-l example.log -m maxiter -t topk -s sigma; eigenstrat \
-i example.geno -j example.pheno -p example.pca -l 1 \
-o example.chisq; gc.perl example.chisq example.chisq.out
----------------- end of script ----------------------

2. Submit the script using the 'qsub' command, e.g.

qsub -l nodes=1 /data/$USER/eigensoft/script

 

Running an interactive job

User may need to run jobs interactively sometimes. Such jobs should not be run on the Biowulf login node. Instead allocate an interactive node as described below, and run the interactive job there.

[user@biowulf] $ qsub -I -l nodes=1
qsub: waiting for job 2236960.biobos to start
qsub: job 2236960.biobos ready

[user@pxxxx]$ cd /data/$USER/YourDirectory [user@pxxxx]$ module load eigensoft [user@pxxxx]$ smartpca.perl -i example.geno -a example.snp -b example.ind \ -k 5 -o example.pca -p example.plot -e example.eval \ -l example.log -m maxiter -t topk -s sigma; eigenstrat \ -i example.geno -j example.pheno -p example.pca -l 1 \ -o example.chisq; gc.perl example.chisq example.chisq.out [user@pxxxx]$ ........... [user@pxxxx] exit qsub: job 2236960.biobos completed [user@biowulf]$

User may add property of node in the qsub command to request specific interactive node. For example, if you need a node with 24gb of memory to run job interactively, do this:

[user@biowulf]$ qsub -I -l nodes=1:g24:c16

 

Documentation

http://helix.nih.gov/Applications/README.eigensoft
http://helix.nih.gov/Applications/README.eigenstrat
http://helix.nih.gov/Applications/README.popgen
http://helix.nih.gov/Applications/README.convertf