Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Change the post-run analysis instructions

...

  1. Add doNotRun='true' to the run section of your BEAST XML file.
  2. Start an interactive session with enough memory to start the BEAST job: qrsh -pe mthread 8 
  3. In the interactive session, load the BEAST module and start the execution of your XML file. In the -threads option, specify the number of SNAPP steps you specific in your XML (in the example it is 48)
      

    Code Block
    languagebash
    module load bio/beast
    beast -threads 48 your_file.xml


  4. This creates 48 step directories and a run<number>.sh script for each one. You can submit a separate job for each of the bash scripts. A sample job file (beast_step_run.job) and a bash script to submit the jobs are below.

    Code Block
    languagebash
    titlebeast_step_run.job
    # /bin/sh
    # ----------------Parameters---------------------- #
    #$ -S /bin/sh
    #$ -q lThM.q
    #$ -l mres=16G,h_data=16G,h_vmem=16G,himem
    #$ -cwd
    #$ -j y
    #$ -N beast_step_run
    #$ -o beast_step_run.log
    #
    # ----------------Modules------------------------- #
    module load bioinformatics/beast
    #
    # ----------------Your Commands------------------- #
    #
    echo + `date` job $JOB_NAME started in $QUEUE with jobID=$JOB_ID on $HOSTNAME
    echo + NSLOTS = $NSLOTS
    
    #
    if [ -z $1 ]; then
      echo "Give the run number as an argument: e.g. qsub beast_step_run.job 0"
      exit 1
    fi
    
    source ./run${1}.sh
    #
    echo = `date` job $JOB_NAME done


    Code Block
    languagebash
    titlesubmit.sou
    for x in $(seq 0 47); do
      qsub -o run${x}.log beast_step_run.job ${x}
    done

    (warning) Change the seq command to match the range of steps. Shown here is for 48 steps which are numbered run0.sh  to run47.sh 

  5. Submit the steps as separate cluster jobs with: source submit.sou
  6. When all the jobs are complete, run the PathSampleAnalyser to get the final output. In the below example, the output is redirected to the file pathsampler.out . You should of course adjust the arguments (like alpha  and burnInPercentage to suite your analysis. 

    Code Block
    languagebash
    titlePathSampleAnalyser
    qrsh -pe mthread 8
    module load bio/beast
    javaapplauncher beast.inference.PathSampleAnalyser -nrOfSteps 48 -alpha 0.3 path_run1 25-rootdir /path/to/your/runs -burnInPercentage 25 >pathsampler.out 2>&1

    You can see all the PathSampleAnalyser  arguments with: applauncher PathSampleAnalyser -help