<commit_before><commit_msg>module which contains all the generic information which might be needed for a batch_submission system : ----------------------------------------------------------------------<commit_after>package Bio::EnsEMBL::Pipeline::BatchSubmission;

BEGIN {
  require "Bio/EnsEMBL/Pipeline/pipeConf.pl";
}

use vars qw(@ISA);
use strict;

@ISA = qw(Bio::Root::RootI);

sub new{
  my ($class, @args) = @_;
  my $self = $class->SUPER::new(@args);    
  $self->{'stdout'} = undef;
  $self->{'stderr'} = undef;
  $self->{'id'} = undef;
  $self->{'parameters'} = undef;
  $self->{'pre_exec'} = undef;
  $self->{'command'} = undef;
  $self->{'queue'} = undef;
  $self->{'jobname'} = undef;
  $self->{'nodes'} = undef; #must by a space delimited line of nodes

  my($stdout, 
     $stderr, 
     $parameters, 
     $pre_exec, 
     $command, 
     $queue, 
     $jobname) = $self->_rearrange([qw(STDOUT 
				       STDERR 
				       PARAMETERS 
				       PRE_EXEC 
				       COMMAND 
				       QUEUE 
				       JOBNAME
				       NODES)],@args);

  if(defined($stdout)){
    $self->stdout($stdout);
  }
  if(defined($stderr)){
    $self->stderr($stderr);
  }
  if(defined($parameters)){
    $self->parameters($parameters);
  }
  if(defined($pre_exec)){
    $self->pre_exec($pre_exec);
  }
  if(defined($command)){
    $self->command($command);
  }
  if(defined($queue)){
    $self->queue($queue);
  }
  if(defined($jobname)){
    $self->jobname($jobname);
  }
}

##################
#accessor methods#
##################

sub stdout{
   my ($self, $arg) = @_;

   if(defined($arg)){
     $self->{'stdout'} = $arg;
   }

   return $self->{'stdout'};
}



sub stderr{
   my ($self, $arg) = @_;

   if(defined($arg)){
     $self->{'stderr'} = $arg;
   }

   return $self->{'stderr'};
}


sub id{
   my ($self, $arg) = @_;

   if(defined($arg)){
     $self->{'id'} = $arg;
   }

   return $self->{'id'};
}

sub parameters{
   my ($self, $arg) = @_;

   if(defined($arg)){
     $self->{'parameters'} = $arg;
   }

   return $self->{'parameters'};
}

sub pre_exec{
   my ($self, $arg) = @_;

   if(defined($arg)){
     $self->{'pre_exec'} = $arg;
   }

   return $self->{'pre_exec'};
}

sub command{
   my ($self, $arg) = @_;

   if(defined($arg)){
     $self->{'command'} = $arg;
   }

   return $self->{'command'};
}


sub queue{
   my ($self, $arg) = @_;

   if(defined($arg)){
     $self->{'queue'} = $arg;
   }

   return $self->{'queue'};
}

sub jobname{
   my ($self, $arg) = @_;

   if(defined($arg)){
     $self->{'jobname'} = $arg;
   }

   return $self->{'jobname'};
}

sub nodes{
   my ($self, $arg) = @_;

   if(defined($arg)){
     $self->{'nodes'} = $arg;
   }

   return $self->{'nodes'};
}


#############
#run methods#
#############

sub construct_command_line{
  my($self) = @_;

  $self->throw("this method construct command line must be implemented!\n");
}


sub open_command_line{
  my ($self)= @_;
  
  $self->throw("open_command_line isn't implemented yet\n");

}
{'fraction_non_alphanumeric': 0.2515870364183094, 'fraction_numerical': 0.0, 'mean_word_length': 2.696296296296296, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 41, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1077539', 'n_tokens_mistral': 1162, 'n_tokens_neox': 1076, 'n_words': 203}