[med-svn] [roary] 01/04: Imported Upstream version 3.6.3+dfsg

Sascha Steinbiss satta at debian.org
Sat Jul 2 12:13:54 UTC 2016


This is an automated email from the git hooks/post-receive script.

satta pushed a commit to branch master
in repository roary.

commit 136040feda75017c0171af3d63ada9a2a784cb77
Author: Sascha Steinbiss <satta at debian.org>
Date:   Fri Jul 1 14:39:20 2016 +0000

    Imported Upstream version 3.6.3+dfsg
---
 dist.ini                                               |  2 +-
 lib/Bio/Roary.pm                                       |  2 +-
 lib/Bio/Roary/CommandLine/RoaryPostAnalysis.pm         |  2 +-
 lib/Bio/Roary/External/GeneAlignmentFromNucleotides.pm | 12 ++----------
 lib/Bio/Roary/JobRunner/Parallel.pm                    | 12 +++++++++---
 5 files changed, 14 insertions(+), 16 deletions(-)

diff --git a/dist.ini b/dist.ini
index 18fd998..4e4c931 100644
--- a/dist.ini
+++ b/dist.ini
@@ -1,5 +1,5 @@
 name    = Bio-Roary
-version = 3.6.2
+version = 3.6.3
 author  = Andrew J. Page <ap13 at sanger.ac.uk>
 license = GPL_3
 copyright_holder = Wellcome Trust Sanger Institute
diff --git a/lib/Bio/Roary.pm b/lib/Bio/Roary.pm
index d8b5fa3..13a80d0 100644
--- a/lib/Bio/Roary.pm
+++ b/lib/Bio/Roary.pm
@@ -115,7 +115,7 @@ sub run {
     unlink($output_blast_results_filename) unless($self->dont_delete_files == 1);
     
     my $post_analysis = Bio::Roary::External::PostAnalysis->new(
-        job_runner                  => $self->job_runner,
+        job_runner                  => 'Local',
         cpus                        => $self->cpus,
         fasta_files                 => $self->fasta_files,
         input_files                 => $self->input_files,
diff --git a/lib/Bio/Roary/CommandLine/RoaryPostAnalysis.pm b/lib/Bio/Roary/CommandLine/RoaryPostAnalysis.pm
index 5206382..f6a59d0 100644
--- a/lib/Bio/Roary/CommandLine/RoaryPostAnalysis.pm
+++ b/lib/Bio/Roary/CommandLine/RoaryPostAnalysis.pm
@@ -146,7 +146,7 @@ sub run {
       }
       else
       {
-          $job_runner_to_use = 'Local';
+          $job_runner_to_use = 'Parallel';
       }
       
       my $output_gene_files = $self->_find_input_files;
diff --git a/lib/Bio/Roary/External/GeneAlignmentFromNucleotides.pm b/lib/Bio/Roary/External/GeneAlignmentFromNucleotides.pm
index cc90548..122628a 100644
--- a/lib/Bio/Roary/External/GeneAlignmentFromNucleotides.pm
+++ b/lib/Bio/Roary/External/GeneAlignmentFromNucleotides.pm
@@ -31,7 +31,7 @@ has 'mafft'                       => ( is => 'ro', isa => 'Bool',     default =>
 has 'dont_delete_files'           => ( is => 'rw', isa => 'Bool',     default  => 0 );
 has 'num_input_files'             => ( is => 'ro', isa => 'Int',      required => 1);
 
-# Overload Role
+# Overload Role`
 has 'memory_in_mb' => ( is => 'rw', isa => 'Int', lazy     => 1, builder => '_build_memory_in_mb' );
 has '_min_memory_in_mb'      => ( is => 'ro', isa => 'Int', default => 1500 );
 has '_max_memory_in_mb'      => ( is => 'ro', isa => 'Int', default => 60000 );
@@ -43,15 +43,7 @@ has '_dependancy_memory_in_mb'  => ( is => 'ro', isa => 'Int', default => 15000
 sub _build__files_per_chunk
 {
     my ($self) = @_;
-    if($self->num_input_files > 1000)
-    {
-               return 5;
-    }
-    elsif($self->num_input_files > 500)
-    {
-               return 7;
-    }
-    return 10;
+    return 1;
 }
 
 sub _build_memory_in_mb {
diff --git a/lib/Bio/Roary/JobRunner/Parallel.pm b/lib/Bio/Roary/JobRunner/Parallel.pm
index 0660384..f7f6bcc 100644
--- a/lib/Bio/Roary/JobRunner/Parallel.pm
+++ b/lib/Bio/Roary/JobRunner/Parallel.pm
@@ -18,6 +18,8 @@ package Bio::Roary::JobRunner::Parallel;
 use Moose;
 use File::Temp qw/ tempfile /;
 use Log::Log4perl qw(:easy);
+use File::Slurper 'write_text';
+use File::Temp qw/ tempfile /;
 
 has 'commands_to_run' => ( is => 'ro', isa => 'ArrayRef', required => 1 );
 has 'cpus'            => ( is => 'ro', isa => 'Int',      default => 1 );
@@ -28,13 +30,17 @@ has 'memory_in_mb'    => ( is => 'rw', isa => 'Int',  default => '200' );
 sub run {
     my ($self) = @_;
 	
+	  my($fh, $temp_command_filename) = tempfile();
+	  write_text($temp_command_filename, join("\n", @{ $self->commands_to_run }) );
+		
     for my $command_to_run(@{ $self->commands_to_run })
     {
        $self->logger->info($command_to_run);
     }
-	open(my $fh,"|-","parallel --gnu -j ".$self->cpus) || die "GNU Parallel failed";
-	print $fh join("\n", @{ $self->commands_to_run });
-	close $fh;
+		my $parallel_command  = "parallel --gnu -j ".$self->cpus." < ".$temp_command_filename ;
+		$self->logger->info($parallel_command );
+		
+		system($parallel_command);
     1;
 }
 

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-med/roary.git



More information about the debian-med-commit mailing list