User Tools

Site Tools


structure-software

Differences

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

Link to this comparison view

Next revision
Previous revision
Last revisionBoth sides next revision
structure-software [2017/02/21 08:00] – created joguyastructure-software [2017/05/04 06:40] 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 =====
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 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
structure-software.txt · Last modified: 2022/06/13 08:37 by aorth