diff --git a/src/pipeline/Plgd/GridLsf.pm b/src/pipeline/Plgd/GridLsf.pm index 2072b46..e50eeba 100644 --- a/src/pipeline/Plgd/GridLsf.pm +++ b/src/pipeline/Plgd/GridLsf.pm @@ -36,7 +36,7 @@ sub submitScriptLsf($$$$) { $cmd = $cmd . " -e $script.log"; # output $cmd = $cmd . " $options"; # other options $cmd = $cmd . " $script"; # script - plgdInfo("Sumbit command: $cmd"); + plgdInfo("Submit command: $cmd"); my $result = `$cmd`; my @items = split(" ", $result); diff --git a/src/pipeline/Plgd/GridPbs.pm b/src/pipeline/Plgd/GridPbs.pm index 5b55fe3..5a75d7d 100644 --- a/src/pipeline/Plgd/GridPbs.pm +++ b/src/pipeline/Plgd/GridPbs.pm @@ -61,7 +61,7 @@ sub submitScriptPbs($$$$) { $cmd = $cmd . " -o $script.log"; # output $cmd = $cmd . " $options"; # other options $cmd = $cmd . " $script"; # script - plgdInfo("Sumbit command: $cmd"); + plgdInfo("Submit command: $cmd"); my $result = `$cmd`; if (not $result eq "") { @@ -86,7 +86,7 @@ sub checkScriptPbs($$) { my @items = split(" ", $_); if (scalar @items >= 6 and $jobid =~ /$items[0]/) { $state = $items[4]; - break; + last; } } diff --git a/src/pipeline/Plgd/GridSge.pm b/src/pipeline/Plgd/GridSge.pm index bb23894..1b0cb5d 100644 --- a/src/pipeline/Plgd/GridSge.pm +++ b/src/pipeline/Plgd/GridSge.pm @@ -35,7 +35,7 @@ sub submitScriptSge($$$$) { $cmd = $cmd . " -o $script.log -j yes"; # output $cmd = $cmd . " $options"; # other options $cmd = $cmd . " $script"; # script - plgdInfo("Sumbit command: $cmd"); + plgdInfo("Submit command: $cmd"); my $result = `$cmd`; my @items = split(" ", $result); if (scalar @items >= 3) { diff --git a/src/pipeline/Plgd/GridSlurm.pm b/src/pipeline/Plgd/GridSlurm.pm index 127e2ae..7fb496c 100644 --- a/src/pipeline/Plgd/GridSlurm.pm +++ b/src/pipeline/Plgd/GridSlurm.pm @@ -37,7 +37,7 @@ sub submitScriptSlurm ($$$$) { $cmd = $cmd . " -o $script.log"; # output $cmd = $cmd . " $options"; # other options $cmd = $cmd . " $script"; # script - plgdInfo("Sumbit command: $cmd"); + plgdInfo("Submit command: $cmd"); my $result = `$cmd`; my @items = split(" ", $result); diff --git a/src/pipeline/Plgd/Project.pm b/src/pipeline/Plgd/Project.pm index 105de2e..209a9d3 100644 --- a/src/pipeline/Plgd/Project.pm +++ b/src/pipeline/Plgd/Project.pm @@ -153,7 +153,7 @@ sub runJob ($$$) { echoFile("$script.done", "0"); } elsif (scalar @{$job->jobs} > 0) { foreach my $j (@{$job->jobs}) { - runJob($env, $cfg, $j); + &runJob($env, $cfg, $j); } echoFile("$script.done", "0"); } elsif (scalar @{$job->pjobs} > 0) { diff --git a/src/pipeline/Plgd/Utils.pm b/src/pipeline/Plgd/Utils.pm index a876c5a..ee874a8 100644 --- a/src/pipeline/Plgd/Utils.pm +++ b/src/pipeline/Plgd/Utils.pm @@ -190,7 +190,7 @@ sub plgdLogLevel($) { } sub plgdDebug($) { - plgdLog("Debug", @_[0]) if $logLevel <= 0; + plgdLog("Debug", $_[0]) if $logLevel <= 0; } sub plgdInfo($) { @@ -199,11 +199,11 @@ sub plgdInfo($) { } sub plgdWarn($) { - plgdLog("Warning", @_[0]) if $logLevel <= 2; + plgdLog("Warning", $_[0]) if $logLevel <= 2; } sub plgdError($) { - plgdLog("Error", @_[0]); # + plgdLog("Error", $_[0]); # exit(1); } diff --git a/src/pipeline/necat.pl b/src/pipeline/necat.pl old mode 100644 new mode 100755 index 67ba178..1a6057e --- a/src/pipeline/necat.pl +++ b/src/pipeline/necat.pl @@ -719,7 +719,6 @@ ($$) my $u2uVolDir = "$workDir/uu_ovlps"; my $c2uVolDir = "$workDir/cu_ovlps"; - my $trimReads = "$prjDir/trimReads.fasta"; my $pmm4 = "$prjDir/3-assembly/pm.m4"; my $trimPmm4 = "$workDir/pm.m4"; my $tmpTrimReads = "$workDir/tmp_trimReads.fasta"; @@ -1507,8 +1506,8 @@ ($) %env = loadNecatEnv(\%cfg); initializeNecatProject(\%cfg); - my $prjDir = %env{"WorkPath"} . "/" .%cfg{"PROJECT"}; - my $isGz = %cfg{"COMPRESS"}; + my $prjDir = $env{"WorkPath"} . "/" .$cfg{"PROJECT"}; + my $isGz = $cfg{"COMPRESS"}; my $finalCnsReads = $isGz ? "1-consensus/cns_final.fasta.gz" : "1-consensus/cns_final.fasta"; runConsensus(\%env, \%cfg); @@ -1524,7 +1523,7 @@ ($) %env = loadNecatEnv(\%cfg); initializeNecatProject(\%cfg); - my $prjDir = %env{"WorkPath"} . "/" .%cfg{"PROJECT"}; + my $prjDir = $env{"WorkPath"} . "/" .$cfg{"PROJECT"}; runConsensus(\%env, \%cfg); @@ -1532,7 +1531,7 @@ ($) runAssemble(\%env, \%cfg); - if (%cfg{"POLISH_CONTIGS"} == 1 or %cfg{"POLISH_CONTIGS"} eq "true") { + if ($cfg{"POLISH_CONTIGS"} == 1 or $cfg{"POLISH_CONTIGS"} eq "true") { runPolishContigs(\%env, \%cfg, "plctg0", "$prjDir/4-fsa/contigs.fasta", "$prjDir/4-fsa/contig_tiles", "$prjDir/trimReads.fasta.gz", "4-fsa"); @@ -1550,7 +1549,7 @@ ($) %env = loadNecatEnv(\%cfg); initializeNecatProject(\%cfg); - my $prjDir = %env{"WorkPath"} . "/" .%cfg{"PROJECT"}; + my $prjDir = $env{"WorkPath"} . "/" .$cfg{"PROJECT"}; runConsensus(\%env, \%cfg); @@ -1561,7 +1560,7 @@ ($) runAlignContigs(\%env, \%cfg); runBridgeContigs(\%env, \%cfg); - if (%cfg{"POLISH_CONTIGS"} == 1 or %cfg{"POLISH_CONTIGS"} eq "true") { + if ($cfg{"POLISH_CONTIGS"} == 1 or $cfg{"POLISH_CONTIGS"} eq "true") { runPolishContigs(\%env, \%cfg, "plctg1", "$prjDir/6-bridge_contigs/bridged_contigs.fasta", "$prjDir/4-fsa/contig_tiles", "$prjDir/trimReads.fasta.gz", "6-bridge_contigs"); @@ -1597,8 +1596,7 @@ () sub main() { if (scalar @ARGV >= 2) { - my $cmd = @ARGV[0]; - my $cfgfname = @ARGV[1]; + my ($cmd,$cfgfname) = @ARGV; if ($cmd eq "correct") { cmdCorrect($cfgfname);