Bio::EnsEMBL::Analysis::Runnable::Funcgen SWEmbl
SummaryIncluded librariesPackage variablesSynopsisDescriptionGeneral documentationMethods
Toolbar
WebCvsRaw content
Summary
Bio::EnsEMBL::Analysis::Runnable::Funcgen::SWEmbl
Package variables
No package variables defined.
Included modules
Bio::EnsEMBL::Analysis::Runnable
Bio::EnsEMBL::Analysis::Runnable::Funcgen
Bio::EnsEMBL::Utils::Argument qw ( rearrange )
Bio::EnsEMBL::Utils::Exception qw ( throw warning )
Data::Dumper
Inherit
Bio::EnsEMBL::Analysis::Runnable::Funcgen
Synopsis
  my $runnable = Bio::EnsEMBL::Analysis::Runnable::Funcgen::SWEmbl->new
(
-analysis => $analysis,
-query => 'slice',
-program => 'program.pl',
);
$runnable->run;
my @features = @{$runnable->output};
Description
SWEmbl expects bed or maq mapview files as input and predicts features which
can be stored in the annotated_feature table in the eFG database
Methods
config_file
No description
Code
query
No description
Code
runDescriptionCode
run_analysisDescriptionCode
Methods description
runcode    nextTop
    Arg [1]     : Bio::EnsEMBL::Analysis::Runnable::SWEmbl
Arg [2] : filename
Description :
Returntype :
Exceptions :
Example :
run_analysiscodeprevnextTop
  Arg [1]     : Bio::EnsEMBL::Analysis::Runnable::SWEmbl
Arg [2] : string, program name
Usage :
Description :
Returns :
Exceptions :
Methods code
config_filedescriptionprevnextTop
sub config_file {
    my $self = shift;
    $self->{'config_file'} = shift if(@_);
    return $self->{'config_file'};
}

1;
}
querydescriptionprevnextTop
sub query {
  my $self = shift;
  $self->{'query'} = shift if(@_);

  throw("file ".$self->{'query'}. " doesn't exist") if (! -e $self->{'query'});

  return $self->{'query'};
}
rundescriptionprevnextTop
sub run {
    print "Bio::EnsEMBL::Analysis::Runnable::Funcgen::SWEmbl::run\n";
    my ($self, $dir) = @_;

    $self->run_analysis;


    print "Parsing results ... ";
    $self->parse_results();
    print "done!\n";
}
run_analysisdescriptionprevnextTop
sub run_analysis {
        
    my ($self, $program) = @_;
    
    if(!$program){
        $program = $self->program;
    }
    throw($program." is not executable SWEmble::run_analysis ") 
        unless($program && -x $program);

    my @fields = (0..2,5);
    $self->output_fields(\@fields);

    (my $resultsfile = $self->infile());
    $self->resultsfile($resultsfile);
    warn("RESULTS FILE: ".$resultsfile);
    
    my $command = $self->program . ' -B -z -i ' . $self->query . ' ' . 
        $self->options . ' -o ' . $resultsfile;
    
    warn("Running analysis " . $command);

    eval { system($command) };
    throw("FAILED to run $command: ", $@) if ($@);

}

#=head2 infile
#
# Arg [1] : Bio::EnsEMBL::Analysis::Runnable::SWEmble
# Arg [2] : filename (string)
# Description : will hold a given filename or if one is requested but none
# defined it will use the create_filename method to create a filename
# Returntype : string, filename
# Exceptions : none
# Example :
#
#=cut
#
#
#sub infile{
#
# my ($self, $filename) = @_;
#
# if($filename){
# $self->{'infile'} = $filename;
# }
# if(!$self->{'infile'}){
# $self->{'infile'} = $self->create_filename($self->analysis->logic_name, 'dat');
# }
#
# return $self->{'infile'};
#
#
}
General documentation
LICENCETop
This code is distributed under an Apache style licence. Please see
/info/about/code_licence.html for details.
AUTHORTop
Stefan Graf, Ensembl Functional Genomics -
CONTACTTop
Post questions to the Ensembl development list: ensembl-dev@ebi.ac.uk