#!/bin/bash

echo "Converting all scores files 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/scores2gnuplot

# 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 < scores
    done;

    cd $datadir
done

echo "done."
