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

submit multiple jobs at same time

git-svn-id: svn+ssh://svn.internal.sanger.ac.uk/repos/svn/pathsoft/artemis/trunk@1711 ee4ac58c-ac51-4696-9907-e4b3aa274f04
parent bb6cbe68
No related branches found
No related tags found
No related merge requests found
......@@ -6,7 +6,7 @@
# to customise this script see the function called run_one_prog below
RCS_HEADER="$Header: //tmp/pathsoft/artemis/etc/run_fasta,v 1.5 2004-07-08 15:28:02 tjc Exp $"
RCS_HEADER="$Header: //tmp/pathsoft/artemis/etc/run_fasta,v 1.6 2004-07-12 12:59:22 tjc Exp $"
PROG=`echo $RCS_HEADER | sed 's/.*run_\(.*\),v.*/\1/'`
......@@ -90,17 +90,52 @@ run_one_prog () {
fi
}
PERL_PROG='
local *BSUB;
my $file = $ARGV[0];
my $database = $ARGV[1];
my $pwd = $ARGV[2];
chomp $file;
chomp $database;
$ENV{'FASTLIBS'} = "/nfs/disk222/yeastpub/bio-soft/fasta/pubseqgbs";
open(BSUB, "| bsub -q normal -o fasta_errors -n 1 -R \"select[blast && mem > 500] rusage[r1m=1:mem=500]\" -K") or die "could not open bsub pipe : $!";
open(LIST_FILE,$file);
$EXEC="/nfs/disk222/yeastpub/bio-soft/fasta/fasta33_t";
while(my $inFile = <LIST_FILE>)
{
chomp($inFile);
if($inFile =~ m/^($pwd)(.*)/)
{
$inFile = $2;
if($inFile =~ m/^(\/)(.*)/)
{
$inFile = $2;
}
}
print BSUB "$EXEC -B -S -q -b 100 -H $inFile $database ktup 2 > $inFile\.out\n";
print BSUB "gzip -9 $inFile\.out\n";
}
close BSUB or die "Could not submit job : $!";
close LIST_FILE;
'
(echo "#!/bin/sh -"; echo "kill $$") > $PROG.kill
chmod a+x $PROG.kill
if [ x$ONEFILE = x ]
then
for i in `cat $1`
do
run_one_prog $i $i.out $EXPANDED_DATABASE
done
perl -w -e "$PERL_PROG" "$1" "$EXPANDED_DATABASE" "$PWD"
else
run_one_prog $1 $2 $EXPANDED_DATABASE
fi
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment