view MOST.sh @ 0:653407a0018e draft default tip

Uploaded
author ulfschaefer
date Wed, 13 Jul 2016 06:12:58 -0400
parents
children
line wrap: on
line source

#!/bin/bash

echo $@

FWDFILE=$1
shift
REVFILE=$1
shift
OUTXML=$1
shift
OUTCSV=$1
shift
ORGANISM=$1

OUTFOLDER=$(mktemp -d --tmpdir tmpMOST_XXXXXXXXXXXXXXXXXXXX)
rm -rf $OUTFOLDER # MOST insists on creating the folder itself

CMD="MOST.py -1 $FWDFILE -2 $REVFILE -o $OUTFOLDER -st $ORGANISM"

echo $CMD
eval $CMD

STEM=$(basename $FWDFILE)
STEM="${STEM%.*}"

mv $OUTFOLDER"/"$STEM"_MLST_result.csv" $OUTCSV
mv "$OUTFOLDER/$STEM.results.xml" $OUTXML

rm -rf $OUTFOLDER