Bio::EnsEMBL::Analysis::RunnableDB Exonerate2Array
SummaryIncluded librariesPackage variablesSynopsisDescriptionGeneral documentationMethods
Toolbar
WebCvsRaw content
Summary
Bio::EnsEMBL::Pipeline::RunnableDB::Exonerate2Array
Package variables
No package variables defined.
Included modules
Bio::EnsEMBL::Analysis::Config::General
Bio::EnsEMBL::Analysis::Runnable::ExonerateArray
Bio::EnsEMBL::Analysis::RunnableDB
Inherit
Bio::EnsEMBL::Analysis::RunnableDB
Synopsis
    my $obj = Bio::EnsEMBL::Pipeline::RunnableDB::Exonerate2Array->new(
-dbobj => $db,
-input_id => $id,
-analysis => $analysis
);
$obj->fetch_input();
$obj->run();
my @newfeatures = $obj->output(); $obj->write_output();
Description
Methods
fetch_inputDescriptionCode
write_outputDescriptionCode
Methods description
fetch_inputcode    nextTop
  Arg [1]   : Bio::EnsEMBL::Analysis::RunnableDB::Exonerate2Array
Function : fetch data out of fasta files and create runnable
Returntype: 1
Exceptions: none
Example :
write_outputcodeprevnextTop
    Title   :   write_output
Usage : $self->write_output()
Function: Writes contents of $self->output into $self->dbobj
Returns : 1
Args : None
Methods code
fetch_inputdescriptionprevnextTop
sub fetch_input {
  my( $self) = @_;
  print STDERR "Fetching input\n ";
  
  my $input_id = $self->input_id;
  my $analysis = $self->analysis;
  my $program = $analysis->program_file;
  my $query_type = 'dna';
  my $target_type = 'dna';
  my $query_file = $ANALYSIS_INPUT_DIR.$input_id;
  my $target_dir =$ANALYSIS_TARGET_DIR;
  
  my $options = "--showalignment no --bestn 100 --dnahspthreshold 116 --fsmmemory 256 --dnawordlen 25 --dnawordthreshold 11 --querytype $query_type --targettype $target_type  --target $target_dir --query " ;

  #$target_dir .= "22.fa"; ##only for testing
###Runnable::ExonerateArray take a array of query_seq_obj, so it's need to be generated here###
my @query_seqs; my $in = Bio::SeqIO->newFh( -FILE => $query_file, -FORMAT => 'Fasta', ); while (my $seq = <$in>) { push (@query_seqs, $seq); } # prepare runnable
throw("Can't run Exonerate without both query and target sequences") unless (defined($query_file) && defined($target_dir)); info("exonerate is '$program', target_dir is $target_dir, query_file is $ query_file\n"); #my $target_file = $target_dir . "*";###exonerate-0.8.2 can use both file and dir
my $runnable = new Bio::EnsEMBL::Analysis::Runnable::ExonerateArray( '-db' => $self->db, '-query_seqs' =>\@ query_seqs, '-program' => $program, '-options' => $options, '-analysis' => $self->analysis, ); $self->runnable($runnable);
}
write_outputdescriptionprevnextTop
sub write_output {
  my($self) = @_;
  
  my @misc_features = @{$self->output()}; 
  
  my $mfa = $self->db->get_MiscFeatureAdaptor();
  $mfa->store( @misc_features );
  
  return 1;
}

1;
}
General documentation
CONTACTTop
Describe contact details here
APPENDIXTop
The rest of the documentation details each of the object methods.
Internal methods are usually preceded with a _