#!/bin/bash #d=`dirname $0` #ess=1 #DIR="$d/data/$1" #DIR_1="$d/data/$1/" # The C binaries (network_score, structure, k-best/...) are deployed # with THIS script in the bnw package: /sourcecodes/run.sh and # /var_lib_genenet_bnw/{network_score,structure,k-best,...}. # They are self-locating via the script's own directory, so the flow # works regardless of what /var/lib/genenet/bnw contains (an earlier # version cd'ed there and depended on activation having copied the # binaries -- on production that copy was incomplete and the run died # with "./network_score: No such file or directory"). BNW_BIN_DIR="$(cd "$(dirname "$0")/.." && pwd)/var_lib_genenet_bnw" cd /var/lib/genenet/bnw mkdir -p /var/lib/genenet/bnw/$1 maxparent=$2 k=$3 THR=$4 "$BNW_BIN_DIR/network_score" /var/lib/genenet/bnw/$1continuous_input.txt /var/lib/genenet/bnw/$1ban.txt /var/lib/genenet/bnw/$1white.txt $maxparent /var/lib/genenet/bnw/$1 "$BNW_BIN_DIR/k-best/src/data2netk_poster.sh" /var/lib/genenet/bnw/$1continuous_input.txt /var/lib/genenet/bnw/$1 $k $maxparent "$BNW_BIN_DIR/structure" /var/lib/genenet/bnw/$1continuous_input.txt /var/lib/genenet/bnw/$1/postProbEachEdge.txt /var/lib/genenet/bnw/$1structure_input_temp.txt /var/lib/genenet/bnw/$1structure_input.txt $THR rm -r /var/lib/genenet/bnw/$1 if [ $k = 1 ] then rm -r /var/lib/genenet/bnw/$1structure_input_temp.txt fi