Mercurial > repos > alvarofaure > bitlab
diff chromeister/bin/recompute_scores.sh @ 1:3d1fbde7e0cc draft default tip
Deleted selected files
author | alvarofaure |
---|---|
date | Thu, 13 Dec 2018 03:41:58 -0500 |
parents | 7fdf47a0bae8 |
children |
line wrap: on
line diff
--- a/chromeister/bin/recompute_scores.sh Wed Dec 12 07:18:40 2018 -0500 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,64 +0,0 @@ -#!/usr/bin/env bash - -if [ $# -ne 1 ]; then - echo " ==== ERROR ... you called this script inappropriately." - echo "" - echo " usage: $0 <#threads>" - echo "" - exit -1 -fi - -BINDIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" -THREADS=$1 - - -for p in */; -do - - echo "Entering $p" - cd $p - - - - thepaths=() - n=0 - # Grab the routes - for i in *.mat ; - do - - thepaths[$n]=$i - n=`expr $n + 1` - - done - - i=0 - aux=0 - for ((i=0; i < $n ; i+=$THREADS)) - do - aux=$i - for ((j=0; j<$THREADS; j++)) - do - if [ "$aux" -lt "$n" ]; then - echo "Recomputing ${thepaths[$aux]}" - goodpath=${thepaths[$aux]%.mat} - Rscript $BINDIR/compute_score.R ${thepaths[$aux]} > ${goodpath}.scr.txt & - aux=`expr $aux + 1` - fi - done - - for job in `jobs -p` - do - #echo $job - wait $job - done - - done - - - echo "Exiting $p" - cd .. - - -done - -