From aecb1d66a0623c0f85f7ddc7bc956e0de14b3259 Mon Sep 17 00:00:00 2001 From: tkiryuti <46792196+tkiryuti@users.noreply.github.com> Date: Wed, 20 Nov 2019 16:49:58 -0500 Subject: [PATCH] Updated psi-cd-hit-local.pl Updated "psi-cd-hit-local.pl" from release V4.8.1 (from Feb 28, 2019). Line 1198: "qsub" requires a "-v" flag to pass "$j" to the qsub job Line 1200: the error message also displays the captured qsub id Line 1351: causes the "$remote_sh_script" to now have "para=${para:-$1}", so if $para is empty or undefined, then $1 is used Line 1454: "qstat" now has "-x" for XML output. It no longer has an "-xml" option. --- psi-cd-hit/psi-cd-hit-local.pl | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/psi-cd-hit/psi-cd-hit-local.pl b/psi-cd-hit/psi-cd-hit-local.pl index 461057f..3133ff7 100755 --- a/psi-cd-hit/psi-cd-hit-local.pl +++ b/psi-cd-hit/psi-cd-hit-local.pl @@ -1,4 +1,4 @@ -#!/usr/bin/env perl +#!/usr/bin/perl -w ################################################################################ ######### PSI-cd-hit written by Weizhong Li at http://cd-hit.org ################################################################################ @@ -1195,9 +1195,9 @@ sub run_batch_blast3_multi { if ($exec_mode eq "qsub") { for ($j=0; $j<$num_qsub; $j++) { my $t = "psi-cd-hit-$j"; - my $cmd = `qsub -N $t $remote_sh_script $j`; #### pass $j to qsub command + my $cmd = `qsub -N $t $remote_sh_script -v para=$j`; #### pass $j to qsub command my $qsub_id = 0; - if ($cmd =~ /(\d+)/) { $qsub_id = $1;} else {die "can not submit qsub job and return a id\n";} + if ($cmd =~ /(\d+)/) { $qsub_id = $1;} else {die "can not submit qsub job and return a id: $cmd\n";} print LOG "qsub querying $j, PID $qsub_id\n"; $qsub_ids{$qsub_id} = 1; } @@ -1348,7 +1348,7 @@ sub write_remote_sh_script { print RESH < $remote_perl_script") || die; print REPERL <