#!/bin/bash

# Run hotspot and compute PTIH.

# This script generates an executes a number of child scripts populated by job-specific parameters defined in the file 
# runall.tokens.txt.  

# PTIH results are written to a file ending in ptih.out

scriptTokBin=/home/rthurman/proj/hotspot-ptih/ScriptTokenizer/src/script-tokenizer.py
pipeDir=/home/rthurman/proj/hotspot-ptih/pipeline-scripts
tokenFile=runall.tokens.txt
scripts="$pipeDir/run_pass1_hotspot $pipeDir/run_pass1_merge_and_thresh_clusters $pipeDir/run_pass2_hotspot $pipeDir/run_rescore_hotspot_passes $pipeDir/run_both-passes_merge_and_thresh_clusters $pipeDir/run_ptih"

$scriptTokBin \
    --clobber \
    --output-dir=`pwd` \
    $tokenFile \
    $scripts

./run_pass1_hotspot.tok
./run_pass1_merge_and_thresh_clusters.tok
./run_pass2_hotspot.tok
./run_rescore_hotspot_passes.tok
./run_both-passes_merge_and_thresh_clusters.tok
./run_ptih.tok
