Bio::EnsEMBL::Analysis::RunnableDB::Finished Blast
SummaryIncluded librariesPackage variablesSynopsisDescriptionGeneral documentationMethods
Toolbar
WebCvsRaw content
Summary
Bio::EnsEMBL::Analysis::RunnableDB::Finished::Blast
Package variables
No package variables defined.
Included modules
Bio::EnsEMBL::Analysis::Config::Blast
Bio::EnsEMBL::Analysis::Config::General
Bio::EnsEMBL::Analysis::Runnable::Finished::Blast
Bio::EnsEMBL::Pipeline::SeqFetcher::Finished_Pfetch
Inherit
( ( ( (
Synopsis
my $db = Bio::EnsEMBL::DBLoader->new($locator);
my $blast = Bio::EnsEMBL::Analysis::RunnableDB::Blast->new (
-db => $db,
-input_id => $input_id
-analysis => $analysis );
$blast->fetch_input();
$blast->run();
$blast->output();
$blast->write_output(); #writes to DB
Description
This object wraps Bio::EnsEMBL::Analysis::Runnable::Blast to add
functionality for reading and writing to databases.
The appropriate Bio::EnsEMBL::Analysis object must be passed for
extraction of appropriate parameters. A Bio::EnsEMBL::Pipeline::DBSQL::Obj is
required for databse access.
Methods
_createfiles
No description
Code
db_version_searchedDescriptionCode
fetch_input
No description
Code
write_output
No description
Code
Methods description
db_version_searchedcode    nextTop
    Title   :  db_version_searched
[ distinguished from Runnable::*::get_db_version() ]
Useage : $self->db_version_searched('version string')
$obj->db_version_searched()
Function: Get/Set a blast database version that was searched
The actual look up is done in Runnable::Finished::Blast
This is just a holding place for the string in this
module
Returns : String or undef
Args : String
Caller : $self::run()
Job::run_module()
Methods code
_createfilesdescriptionprevnextTop
sub _createfiles {
	my ( $self, $dirname, $filenames ) = @_;
	my $unique = {};
	$unique = { map { $_, $unique->{$_}++ } @$filenames };
	my @files = ();
	$dirname ||= '/tmp';
	$dirname =~ s!(\S+)/$!$1!;
	foreach my $file (@$filenames) {
		if ( $unique->{$file} ) {

			#name not unique add random
$file .= ".$$." . int( rand(200) ); push( @files, "$dirname/$file" ); } else { #name was unique just add it
push( @files, "$dirname/$file.$$" ); } } return @files;
}
db_version_searcheddescriptionprevnextTop
sub db_version_searched {
	my ( $self, $arg ) = @_;
	$self->{'_db_version_searched'} = $arg if $arg;
	return $self->{'_db_version_searched'};

}

1;
}
fetch_inputdescriptionprevnextTop
sub fetch_input {
	my ($self) = @_;
	my $slice =
	  $self->fetch_sequence( $self->input_id, $self->db,
		$ANALYSIS_REPEAT_MASKING, $SOFT_MASKING );
	$self->query($slice);
	my %blast  = %{ $self->BLAST_PARAMS };
	my $parser = $self->make_parser;
	my $filter;
	if ( $self->BLAST_FILTER ) {
		$filter = $self->make_filter;
	}
	my $runnable = Bio::EnsEMBL::Analysis::Runnable::Finished::Blast->new(
		-query    => $self->query,
		-program  => $self->analysis->program,
		-parser   => $parser,
		-filter   => $filter,
		-database => $self->analysis->db_file,
		-analysis => $self->analysis,
		%blast,
	);
	my $s = $self->runnable($runnable);
	return 1;
}
write_outputdescriptionprevnextTop
sub write_output {
	my ($self) = @_;
	$self->Bio::EnsEMBL::Analysis::RunnableDB::Finished::write_output();
	return 1;
}
General documentation
CONTACTTop
Modified by Sindhu K. Pillai email sp1@sanger.ac.uk
APPENDIXTop
The rest of the documentation details each of the object methods.
Internal methods are usually preceded with a _
runTop
    Title   :   write_output
Usage : $self->write_output();
Function: Writes Features , hit_descriptions to database by calling parent write_output method
Returns : none
Args : none