#!/bin/bash

echo "Converting all timestats file to the gnuplot input format ..."

# root dir
rootdir=/home/goetz/multal

# dir containing all data
datadir=$rootdir/alcompar/alignments

# dir containting the reference data
refdir=$rootdir/alcompar/BAliBASE

# filter file for converting timestats to gnuplots
convexec=$rootdir/filter/timestats2gnuplot

# now run trough all files and do the conversion:

for prgname in TCOFFEE clustalx dialign2 hmmer msa; do
    cd $prgname
    for name in `find -type d -name "*test*"`; do
	cd $datadir/$prgname/$name
	pwd
	$convexec $refdir/$name/outputorder < timestats > timestats.gnuplot
    done;
    cd $datadir
done

echo "done."
