User Tools

Site Tools


structure-software

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
structure-software [2017/02/21 08:28] joguyastructure-software [2022/06/13 08:37] (current) aorth
Line 7: Line 7:
   * Latest version: 2.3.4   * Latest version: 2.3.4
   * Added: June, 2014   * Added: June, 2014
-  * Link: http://pritchardlab.stanford.edu/structure.html+  * Link: https://web.stanford.edu/group/pritchardlab/structure.html
  
 ===== Usage ===== ===== Usage =====
  
-See which versions of Structure are available:+See which versions are available:
 <code>$ module avail structure</code> <code>$ module avail structure</code>
  
-Load structure +Load one version into your environment and run it: 
-<code>$ module load structure/2.3.4</code>+<code>$ module load structure/2.3.4 
 +$ structure</code>
  
 ==== Sample Script ===== ==== Sample Script =====
  
-Here's a script to run structure using SLURM job scheduler whereby each structure iteration is submitted as a separate SLURM batch job:+Here's a script to run structure using the SLURM job scheduler whereby each structure iteration is submitted as a separate SLURM batch job:
  
-<code> +<code>#!/bin/env bash
-#!/bin/env bash+
  
 ## shell script to run structure in the background using SLURM job scheduler ## shell script to run structure in the background using SLURM job scheduler
Line 70: Line 70:
     readonly EXTRAPARAMS=$3     readonly EXTRAPARAMS=$3
     readonly INFILE=$4     readonly INFILE=$4
-    readonly CWD=$PWD 
 fi fi
 +
 +readonly CWD=$PWD
  
 for rep in $(seq 1 $REPS) for rep in $(seq 1 $REPS)
Line 78: Line 79:
         do         do
  echo "REP: $rep POP: $pop"  echo "REP: $rep POP: $pop"
 +    outfile="$SCRATCH_DIR/$(basename $INFILE)_K${pop}-rep${rep}"
                 sbatch <<BATCH_SCRIPT                 sbatch <<BATCH_SCRIPT
 #!/bin/env bash #!/bin/env bash
Line 83: Line 85:
 #SBATCH -J structure #SBATCH -J structure
 #SBATCH -p batch #SBATCH -p batch
-#SBATCH -w taurus+#SBATCH -w mammoth
  
 module load structure/2.3.4 module load structure/2.3.4
Line 94: Line 96:
  
 # run structure with a different random seed for each run # run structure with a different random seed for each run
-outfile="$SCRATCH_DIR/$(basename $INFILE)_K${pop}-rep${rep}" 
- 
 structure-gcc492 -m $MAINPARAMS -e $EXTRAPARAMS -K $POPULATION  -D $RANDOM -i $INFILE -o $outfile structure-gcc492 -m $MAINPARAMS -e $EXTRAPARAMS -K $POPULATION  -D $RANDOM -i $INFILE -o $outfile
  
 # copy back results to data dir. # copy back results to data dir.
-mv -v ${outfile} $CWD/+mv -v ${SCRATCH_DIR} $CWD
  
-echo "Your results are in: $CWD directory+echo "Your results are in: $CWD directory"
  
 BATCH_SCRIPT BATCH_SCRIPT
  
         done         done
-done +done</code>
-</code>+
  
 Usage: Usage:
  
-<code> +<code>./run-structure.sh 5 /home/joguya/structure/mainparams /home/joguya/structure/extraparams /home/joguya/structure/241SNPs-struct.in</code> 
-./run-structure.sh 5 /home/joguya/structure/mainparams /home/joguya/structure/extraparams /home/joguya/structure/241SNPs-struct.in                                                                         + 
-</code>+===== Installation ===== 
 +Notes from the sysadmin during installation: 
 + 
 +<code>$ cd /tmp 
 +$ wget https://web.stanford.edu/group/pritchardlab/structure_software/release_versions/v2.3.4/structure_kernel_source.tar.gz 
 +$ tar xf structure_kernel_source.tar.gz  
 +$ cd structure_kernel_src 
 +$ make 
 +$ sudo cp structure /export/apps/structure/2.3.4/bin</code>
structure-software.1487665698.txt.gz · Last modified: 2017/02/21 08:28 by joguya