AlignAid
view release on metacpan or search on metacpan
lib/AlignAid.pm view on Meta::CPAN
if ( !$PP_loaded && ($arg{queue} eq 'LSF' || $arg{queue} eq 'PBS') ) {
croak "The PP module is required for submitting jobs to LSF or PBS queues.";
}
if ( $arg{queue} ne 'single' && $arg{queue} ne 'LSF' && $arg{queue} ne 'PBS') {
croak "$arg{queue} is not a supported queue type";
}
$arg{program} = defined( $arg{program} ) ? $arg{program} : 'blastn';
$arg{chunk} = defined( $arg{chunk} ) ? $arg{chunk} : 1;
# verify all paths are absolute paths
$arg{db} = File::Spec->rel2abs( $arg{db} );
$arg{dir} = File::Spec->rel2abs( $arg{dir} );
$arg{fasta} = File::Spec->rel2abs( $arg{fasta} );
$arg{prog_name} = $arg{program};
$arg{program} = `which $arg{program}`;
chomp $arg{program};
# setup the object
my $self = {
_queue => $arg{queue},
lib/AlignAid.pm view on Meta::CPAN
pp_type => 'lsf',
command => $command,
q => 'long',
eo => $error_file,
output => $out_file,
);
# actually start job (it's been holding up til now)
$pp->start();
# verify job made it onto the queue
if ( $pp->is_in_queue(1) ) {
push @jobs, $pp;
}
else {
$ret_val = 0;
warn "job didn't get submitted!";
}
}
elsif ( $class->{_queue} eq 'PBS' ) {
lib/AlignAid.pm view on Meta::CPAN
my $pp = PP->run(
pp_type => 'lsf',
command =>
"$class->{_program} $class->{_database} $fa_file $class->{_prog_args}",
q => 'long',
e => $error_file,
o => $out_file,
);
# verify job made it onto the queue
if ( $pp->is_in_queue(1) ) {
push @jobs, $pp;
}
else {
warn "job didn't get submitted!";
$ret_val = 0;
}
}
elsif ( $class->{_queue} eq 'PBS' ) {
croak "Sorry! PBS queueing not implemented yet!\n";
( run in 0.876 second using v1.01-cache-2.11-cpan-5467b0d2c73 )