Bio::EnsEMBL::Hive::RunnableDB
SystemCmd
Toolbar
Summary
Bio::EnsEMBL::Hive::RunnableDB::SystemCmd
Package variables
No package variables defined.
Included modules
Inherit
Synopsis
my $db = Bio::EnsEMBL::DBAdaptor->new($locator);
my $runDB = Bio::EnsEMBL::Hive::RunnableDB::SystemCmd->new (
-db => $db,
-input_id => $input_id
-analysis => $analysis );
$runDB->fetch_input(); #reads from DB
$runDB->run();
$runDB->output();
$runDB->write_output(); #writes to DB
Description
This object is a very simple module. It takes the input_id
and runs it as a system command.
Methods
fetch_input | No description | Code |
run | No description | Code |
write_output | No description | Code |
Methods description
None available.
Methods code
sub fetch_input
{ my $self = shift;
print("input_id\n ", $self->input_id,"\n");
$self->{'cmd'} = $self->input_id;
if($self->input_id =~ /^{/) {
my $input_hash = eval($self->input_id);
if($input_hash) {
$self->{'cmd'} = $input_hash->{'cmd'} if($input_hash->{'cmd'});
if($input_hash->{'did'}) {
$self->{'cmd'} = $self->db->get_AnalysisDataAdaptor->fetch_by_dbID($input_hash->{'did'});
}
}
}
print("cmd\n ", $self->{'cmd'},"\n");
return 1; } |
sub run
{
my $self = shift;
system($self->{'cmd'}) == 0 or die "system ".$self->{'cmd'}." failed: $?";
return 1; } |
sub write_output
{ my $self = shift;
return 1;
}
1; } |
General documentation
The rest of the documentation details each of the object methods.
Internal methods are usually preceded with a _