Bio-Prospect
view release on metacpan or search on metacpan
Bio/Prospect/LocalClient.pm view on Meta::CPAN
Purpose: constructor
Arguments: hash reference with following key/value pairs
options => Bio::Prospect::Options object (required)
Returns: Bio::Prospect::LocalClient
=cut
sub new(;%) {
my $self = shift->SUPER::new(@_);
$self->_setenv();
$self->_prepare_options();
$self->{'xmlCacheName'} = 'xmlCache'; # name of xml file cache
$self->{'sortCacheName'} = 'sortCache'; # name of sort file cache
return $self;
}
#-------------------------------------------------------------------------------
# thread()
#-------------------------------------------------------------------------------
Bio/Prospect/LocalClient.pm view on Meta::CPAN
throw Bio::Prospect::RuntimeError
( 'failed to execute Prospect',
"system($cmd) exited with status $s",
'check your prospect installation manually' );
}
# sanity checks on the sort output??
return $sfn;
}
sub _setenv {
if (not -d $Bio::Prospect::Init::PROSPECT_PATH ) {
throw Bio::Prospect::Exception
( "PROSPECT_PATH is not set correctly",
"PROSPECT_PATH ($Bio::Prospect::Init::PROSPECT_PATH}) is not a valid directory",
"Check your prospect installation and set PROSPECT_PATH in Bio::Prospect::Init or as an environment variable" );
} else {
$ENV{'PROSPECT_PATH'} = $Bio::Prospect::Init::PROSPECT_PATH;
}
if (not -d $Bio::Prospect::Init::PDB_PATH) {
throw Bio::Prospect::Exception
( run in 0.816 second using v1.01-cache-2.11-cpan-3989ada0592 )