1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33
|
#generate qsub file and launch it (blastall on data base)
my @jobs_id2_1;
my $priority;
my $qsuboutfile2_1 = "step2_1_$prefix\_blastall.qsub";
open (QSUB,">$prefix/$qsuboutfile2_1")or die "\nError : $qsuboutfile2_1 file could not be created: $!\n";
print QSUB qq(#!/bin/bash
#\$ -S /bin/bash
#\$ -o $qsuboutfile2_1.out
#\$ -e $qsuboutfile2_1.err
#\$ -cwd
#\$ -q workq
# command(s):
#hostname >&2
qarray blast.sh | awk '{ \$3}' > id.txt;
ligne1=`sed -n -e '1p' id.txt`
);
close QSUB;
#launch qsub job if asked
if ($submit eq "yes") {
my $dependencies = "-hold_jid ".join(",",@jobs_id1);
my $instruction = "cd $prefix/;qsub $dependencies ./$qsuboutfile2_1 | awk '{print \$3}'; ";
$jobid=qx{$instruction};
chomp $jobid;
my @cols = split(/\./,$priority);
my $id = $cols[0];
push (@jobs_id2_1,ligne);
#push (@jobs_id2_1,$jobid); |
Partager