Skip to content
Snippets Groups Projects
Commit cc72cc72 authored by tjc's avatar tjc
Browse files

zip blastx results

git-svn-id: svn+ssh://svn.internal.sanger.ac.uk/repos/svn/pathsoft/artemis/trunk@13760 ee4ac58c-ac51-4696-9907-e4b3aa274f04
parent 52c84a2e
No related branches found
No related tags found
No related merge requests found
......@@ -6,7 +6,17 @@
# to customise this script see the function called run_one_prog below
RCS_HEADER="$Header: //tmp/pathsoft/artemis/etc/run_blastx.sanger,v 1.2 2005-07-11 15:06:21 tjc Exp $"
RCS_HEADER="$Header: /cvsroot/pathsoft/artemis/etc/run_blastx.sanger,v 1.2 2005/07/11 15:06:21 tjc Exp $"
cleanUp()
{
echo $1
cat $1 | while thisLine=`line`
do
rm -f $thisLine
done
rm -f $1
}
PROG=`echo $RCS_HEADER | sed 's/.*run_\(.*\),v.*/\1/'`
......@@ -27,18 +37,21 @@ else
fi
fi
if [ $DATABASE = "psu/Kineto_aa" ]; then
BLASTDB=/lustre/pathogen/blast; export BLASTDB
fi
# expand any ~ or environment variables
EXPANDED_DATABASE=`echo "echo $DATABASE" | /bin/csh -f`
echo $BLASTDB
### change this function to suit your site:
run_one_prog () {
INPUT_FILE=$1
OUTPUT_FILE=$2
DATABASE=$3
DIRNAME=$4
### change these lines:
EXEC=blastall
......@@ -66,44 +79,43 @@ run_one_prog () {
rsh babel "cd $WDIR; lsrun -v blastwrap.pl $EXEC -d $DATABASE -i $INPUT_FILE -p blastx \
$EXTRA_ARGS >! $OUTPUT_FILE"
else
bsub -q longblastq -o $OUTPUT_FILE -e ${PROG}_errors.new -I flexi_blast.pl -x $DATABASE $INPUT_FILE $EXTRA_ARGS
# lsrun -v blastwrap.pl $EXEC -d $DATABASE -i $INPUT_FILE -p blastx \
# $EXTRA_ARGS 2>&1 > $OUTPUT_FILE |
# tee ${PROG}_errors.new 1>&2
bsub -q long -o $OUTPUT_FILE -e ${PROG}_errors.new -I flexi_blast.pl -x $DATABASE $INPUT_FILE $EXTRA_ARGS
fi
# lsrun -v blastwrap.pl $EXEC -d $DATABASE -i $INPUT_FILE -p blastx \
# $EXTRA_ARGS 2>&1 > $OUTPUT_FILE |
# tee ${PROG}_errors.new 1>&2
#### end of changes
# Artemis can read compressed files
gzip -9 $OUTPUT_FILE &
if [ -s ${PROG}_errors.new ]
then
( echo ERROR running $PROG: ; echo;
echo ===================================================
cat ${PROG}_errors.new ) >> $OUTPUT_FILE
cat ${PROG}_errors.new >> ${PROG}_errors
fi
while [ ! -f $OUTPUT_FILE ]; do sleep 2; done
gzip -9 $OUTPUT_FILE
zip -j ${DIRNAME}blastx.zip ${OUTPUT_FILE}.gz
rm -f ${OUTPUT_FILE}.gz
# if [ -s ${PROG}_errors.new ]
# then
# ( echo ERROR running $PROG: ; echo;
# echo ===================================================
# cat ${PROG}_errors.new ) >> $OUTPUT_FILE
# cat ${PROG}_errors.new >> ${PROG}_errors
# fi
}
(echo "#!/bin/sh -"; echo "kill $$") > $PROG.kill
chmod a+x $PROG.kill
DIR=`dirname $PWD/$1`
if [ x$ONEFILE = x ]
then
for i in `cat $1`
do
run_one_prog $i $i.out $EXPANDED_DATABASE
run_one_prog $i $i.out $echo $EXPANDED_DATABASE "$DIR/"
done
else
run_one_prog $1 $2 $EXPANDED_DATABASE
run_one_prog $1 $2 $EXPANDED_DATABASE "$DIR/"
fi
cleanUp $1
exit 0
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment