Commit bbf3f599 authored by Andreas Tille's avatar Andreas Tille

Update upstream source from tag 'upstream/1.7.3'

Update to upstream version '1.7.3'
with Debian dir 9069fda3ac5233b9d6dc74a72386ee3d4cbf4e7b
parents cf6bb849 4309a491
#!/usr/bin/perl -w
#!/usr/bin/perl
# This is a Module::Build script for BioPerl-Run installation.
# See http://search.cpan.org/~kwilliams/Module-Build/lib/Module/Build.pm
......@@ -32,7 +32,7 @@ my $build = Module::Build->subclass(
)
)->new(
dist_name => 'BioPerl-Run',
dist_version => '1.007002',
dist_version => '1.007003',
module_name => 'Bio::Run',
dist_author => 'BioPerl Team <bioperl-l@bioperl.org>',
dist_abstract => 'BioPerl-Run - wrapper toolkit',
......@@ -50,13 +50,14 @@ my $build = Module::Build->subclass(
'Bio::Root::Root' => 0,
},
recommends => {
'Bio::Cluster::SequenceFamily' => 0, # Bio::Tools::Run::TribeMCL
'Algorithm::Diff' => 0, # generating consensus protein family descriptions: Bio::Tools::Run::TribeMCL
'IPC::Run' => 0, # Glimmer and Genemark application wrappers: Bio::Tools::Run::Glimmer Bio::Tools::Run::Genemark
'IO::String' => 0, # generating Bio::Tree::Tree from strings: Bio::Tools::Run::Phylo::Phylip::Consense
'XML::Twig' => 0, # processing XML data: Bio::Tools::Run::EMBOSSacd
'File::Sort' => 0, # BEDTools
'Config::Any' => 0, # MCS, Match
'Bio::FeatureIO' => 0, # MCS, Match, Phastcons, Gumby
'Bio::FeatureIO' => 0, # MCS, Match, Phastcons
#'SOAP::Lite' => 0.716, # A bug that affects SoapEU-unit.t tests was fixed in this version (many levels deep object throws error)
},
get_options => {
......@@ -119,4 +120,3 @@ else {
# Create the build script and exit
$build->create_build_script;
Revision history for bioperl-run modules
Summary of important user-visible changes for BioPerl-Run
---------------------------------------------------------
1.7.3
* The following modules have been moved to the BioPerl
distribution so that new BioPerl Run tools can be developed
without being dependent on the whole BioPerl-Run distribution:
Bio::Tools::Run::Analysis
Bio::Tools::Run::AnalysisFactory
Bio::Tools::Run::Phylo::PhyloBase
Bio::Tools::Run::WrapperBase
Bio::Tools::Run::WrapperBase::CommandExts
* The following modules have been removed from BioPerl-Run to be
part of separate distributions and have independent development:
Bio::Tools::Phylo::Gumby
Bio::Tools::Run::AssemblerBase
Bio::Tools::Run::BWA
Bio::Tools::Run::BWA::Config
Bio::Tools::Run::Bowtie
Bio::Tools::Run::Bowtie::Config
Bio::Tools::Run::Cap3
Bio::Tools::Run::Maq
Bio::Tools::Run::Maq::Config
Bio::Tools::Run::Meme
Bio::Tools::Run::Minimo
Bio::Tools::Run::Newbler
Bio::Tools::Run::Phrap
Bio::Tools::Run::Phylo::Gumby
Bio::Tools::Run::TigrAssembler
* New program previously part of the BioPerl distribution:
bp_blast2tree
* All Bio::Installer modules and the bioperl_application_installer
script have been removed. These were unsafe and out of date.
Use a package manager of your choice to install external
programs.
1.7.2
......
# BioPerl module for Bio::Installer::EMBOSS
#
# Please direct questions and support issues to <bioperl-l@bioperl.org>
#
# Cared for by Albert Vilella
#
# Copyright Albert Vilella
#
# You may distribute this module under the same terms as perl itself
# POD documentation - main docs before the code
=head1 NAME
Bio::Installer::EMBOSS - DESCRIPTION of Object
=head1 SYNOPSIS
Give standard usage here
=head1 DESCRIPTION
Describe the object here
=head1 FEEDBACK
=head2 Mailing Lists
User feedback is an integral part of the evolution of this and other
Bioperl modules. Send your comments and suggestions preferably to
the Bioperl mailing list. Your participation is much appreciated.
bioperl-l@bioperl.org - General discussion
http://bioperl.org/wiki/Mailing_lists - About the mailing lists
=head2 Support
Please direct usage questions or support issues to the mailing list:
I<bioperl-l@bioperl.org>
rather than to the module maintainer directly. Many experienced and
reponsive experts will be able look at the problem and quickly
address it. Please include a thorough description of the problem
with code and data examples if at all possible.
=head2 Reporting Bugs
Report bugs to the Bioperl bug tracking system to help us keep track
of the bugs and their resolution. Bug reports can be submitted via
the web:
http://redmine.open-bio.org/projects/bioperl/
=head1 AUTHOR - Albert Vilella
Email avilella-AT-gmail-DOT-com
Describe contact details here
=head1 CONTRIBUTORS
Additional contributors names and emails here
=head1 APPENDIX
The rest of the documentation details each of the object methods.
Internal methods are usually preceded with a _
=cut
# Let the code begin...
package Bio::Installer::EMBOSS;
use vars qw(@ISA %DEFAULTS);
use strict;
# Object preamble - inherits from Bio::Root::Root
use Bio::Root::Root;
use Bio::Installer::Generic;
@ISA = qw(Bio::Installer::Generic );
BEGIN {
%DEFAULTS =
( 'ORIGIN_DOWNLOAD_DIR' => 'ftp://ftp.uk.embnet.org/pub/EMBOSS/',
'DESTINATION_DOWNLOAD_DIR' => '/tmp',
'DESTINATION_INSTALL_DIR' => "/usr/local",
'PACKAGE_NAME' => 'EMBOSS-latest.tar.gz',
'DIRECTORY_NAME' => 'EMBOSS-2.9.0'
);
}
#FIXME: regexp directory_name so that is not hardcoded
=head2 get_default
Title : get_default
Usage :
Function:
Example :
Returns :
Args :
=cut
sub get_default {
my $self = shift;
my $param = shift;
return $DEFAULTS{$param};
}
=head2 install
Title : install
Usage : $installer->install();
Function:
Example :
Returns :
Args :
=cut
sub install{
my ($self,@args) = @_;
$self->_decompress;
$self->_execute_typical_nix_install;
$self->_remember_env_is_in_path;
}
=head2 _execute_typical_nix_install
Title : _execute_typical_nix_install
Usage :
Function:
Example :
Returns :
Args :
=cut
sub _execute_typical_nix_install{
my ($self,@args) = @_;
my $call;
#FIXME: regexp directory_name so that is not hardcoded, after EMBOSS-latest is downloaded
my $destination = $self->destination_install_dir . "/" . $self->directory_name;
print "\n\nTypical linux install -- configure -- make -- make install (this might take a while)\n\n";sleep 1;
if (($^O =~ /dec_osf|linux|unix|bsd|solaris|darwin/i)) {
chdir $destination or die "Cant cd to $destination $!\n";
print "\n\nCalling configure (this might take a while)\n\n";sleep 1;
$call = "./configure --prefix=$destination";
system("$call") == 0 or $self->throw("Error when trying to run configure");
print "\n\nCalling make (this might take a while)\n\n";sleep 1;
$call = "make";
system("$call") == 0 or $self->throw("Error when trying to run make");
print "\n\nCalling make install (this might take a while)\n\n";sleep 1;
if (-w "$destination") {
$call = "make install";
} else {
print "\n\n You may need administrative password to install\n"
."this program so that bioperl can see it in the binary PATH\n";
$call = "su -c \"make install\"";
}
system("$call") == 0 or $self->throw("Error when trying to run make install");
} else {
$self->throw("_execute_typical_nix not yet implemented in this platform");
}
}
=head2 _remember_env_is_in_path
Title : _remember_env_is_in_path
Usage :
Function:
Example :
Returns :
Args :
=cut
sub _remember_env_is_in_path{
my ($self,@args) = @_;
my $dir;
$dir = $self->destination_install_dir;
unless ($dir =~ m|/usr/local|) {
print STDERR <<END;
You may need to make $dir visible for \$PATH to help bioperl find the
program. This can be done with a symbolic link (as root):
ln -s $dir/bin /usr/local/bin
END
;
}
}
1;
# BioPerl module for Bio::Installer::Generic
#
# Please direct questions and support issues to <bioperl-l@bioperl.org>
#
# Cared for by Albert Vilella
#
# Copyright Albert Vilella
#
# You may distribute this module under the same terms as perl itself
# POD documentation - main docs before the code
=head1 NAME
Bio::Installer::Generic - DESCRIPTION of Object
=head1 SYNOPSIS
Give standard usage here
=head1 DESCRIPTION
Describe the object here
=head1 FEEDBACK
=head2 Mailing Lists
User feedback is an integral part of the evolution of this and other
Bioperl modules. Send your comments and suggestions preferably to
the Bioperl mailing list. Your participation is much appreciated.
bioperl-l@bioperl.org - General discussion
http://bioperl.org/wiki/Mailing_lists - About the mailing lists
=head2 Support
Please direct usage questions or support issues to the mailing list:
I<bioperl-l@bioperl.org>
rather than to the module maintainer directly. Many experienced and
reponsive experts will be able look at the problem and quickly
address it. Please include a thorough description of the problem
with code and data examples if at all possible.
=head2 Reporting Bugs
Report bugs to the Bioperl bug tracking system to help us keep track
of the bugs and their resolution. Bug reports can be submitted via
the web:
http://redmine.open-bio.org/projects/bioperl/
=head1 AUTHOR - Albert Vilella
Email avilella-AT-gmail-DOT-com
Describe contact details here
=head1 CONTRIBUTORS
Additional contributors names and emails here
=head1 APPENDIX
The rest of the documentation details each of the object methods.
Internal methods are usually preceded with a _
=cut
# Let the code begin...
package Bio::Installer::Generic;
use vars qw(@ISA);
use strict;
# Object preamble - inherits from Bio::Root::Root
use Bio::Root::Root;
# Download file
use LWP;
use HTTP::Request::Common;
@ISA = qw(Bio::Root::Root );
=head2 new
Title : new
Usage : my $obj = new Generic();
Function: Builds a new Generic object
Returns : an instance of Generic
Args : -origin_download_dir => from where is going to be downloaded
-destination_download_dir => where is going to be saved
-destination_install_dir => where is going to be installed
-package_name => name of the package to be downloaded
-directory_name => name of the directory once has been decompressed
=cut
sub new {
my($class,@args) = @_;
my $self = $class->SUPER::new(@args);
my ($origin_download_dir,
$destination_download_dir,
$destination_install_dir,
$package_name,
$directory_name) =
$self->_rearrange( [qw(ORIGIN_DOWNLOAD_DIR
DESTINATION_DOWNLOAD_DIR
DESTINATION_INSTALL_DIR
PACKAGE_NAME
DIRECTORY_NAME)],
@args);
defined $origin_download_dir && $self->origin_download_dir($origin_download_dir);
defined $destination_download_dir && $self->destination_download_dir($destination_download_dir);
defined $destination_install_dir && $self->destination_install_dir($destination_install_dir);
defined $package_name && $self->package_name($package_name);
defined $directory_name && $self->directory_name($directory_name);
return $self;
}
=head2 origin_download_dir
Title : origin_download_dir
Usage : $obj->origin_download_dir($newval)
Function:
Example :
Returns : value of origin_download_dir (a scalar)
Args : on set, new value (a scalar or undef, optional)
=cut
sub origin_download_dir{
my $self = shift;
return $self->{'origin_download_dir'} = shift if @_;
return $self->{'origin_download_dir'} || $self->get_default('ORIGIN_DOWNLOAD_DIR');
}
=head2 destination_download_dir
Title : destination_download_dir
Usage : $obj->destination_download_dir($newval)
Function:
Example :
Returns : value of destination_download_dir (a scalar)
Args : on set, new value (a scalar or undef, optional)
=cut
sub destination_download_dir{
my $self = shift;
return $self->{'destination_download_dir'} = shift if @_;
return $self->{'destination_download_dir'} || $self->get_default('DESTINATION_DOWNLOAD_DIR');
}
=head2 destination_install_dir
Title : destination_install_dir
Usage : $obj->destination_install_dir($newval)
Function:
Example :
Returns : value of destination_install_dir (a scalar)
Args : on set, new value (a scalar or undef, optional)
=cut
sub destination_install_dir{
my $self = shift;
return $self->{'destination_install_dir'} = shift if @_;
return $self->{'destination_install_dir'} || $self->get_default('DESTINATION_INSTALL_DIR');
}
=head2 package_name
Title : package_name
Usage : $obj->package_name($newval)
Function:
Example :
Returns : value of package_name (a scalar)
Args : on set, new value (a scalar or undef, optional)
=cut
sub package_name{
my $self = shift;
return $self->{'package_name'} = shift if @_;
return $self->{'package_name'} || $self->get_default('PACKAGE_NAME');
}
=head2 directory_name
Title : directory_name
Usage : $obj->directory_name($newval)
Function:
Example :
Returns : value of directory_name (a scalar)
Args : on set, new value (a scalar or undef, optional)
=cut
sub directory_name{
my $self = shift;
return $self->{'directory_name'} = shift if @_;
return $self->{'directory_name'} || $self->get_default('DIRECTORY_NAME');
}
=head2 env_name
Title : env_name
Usage :
Function:
Example :
Returns :
Args :
=cut
sub env_name{
my $self = shift;
return $self->{'env_name'} = shift if @_;
return $self->{'env_name'} || $self->get_default('ENV_NAME');
}
=head2 _remember_env
Title : _remember_env
Usage :
Function:
Example :
Returns :
Args :
=cut
sub _remember_env{
my ($self,@args) = @_;
my $dir;
$dir = $self->destination_install_dir;
$dir =~ s|/$||;
$dir .= "/" . $self->directory_name . "/" . $self->get_default('BIN_FOLDER');
my $env_name = $self->env_name;
print STDERR <<END;
You will need to enable \$$env_name to help bioperl find the
program. This can be done in (at least) two ways:
1. define an environmental variable \$$env_name:
export $env_name=$dir
or
2. include a definition of an environmental variable $env_name in
every script that will use the program in the corresponding
bioperl module.
BEGIN {\$ENV\{\'$env_name\'\}=$dir; }
END
;
}
=head2 _decompress
Title : _decompress
Usage :
Function:
Example :
Returns :
Args :
=cut
sub _decompress{
my ($self,@args) = @_;
my $call;
my $destination = $self->destination_download_dir . "/" . $self->package_name;;
my $destination_install_dir = $self->destination_install_dir;
if (($^O =~ /dec_osf|linux|unix|bsd|solaris|darwin/i)) {
$call = "tar xzvf $destination --directory=$destination_install_dir";
system("$call") == 0 or $self->throw("Error when trying to decompress package");
$call = "rm -f $destination";
system("$call") == 0 or $self->throw("Error when trying to delete compressed package");
} else {
$self->throw("_decompress not yet implemented in this platform");
}
}
=head2 download
Title : download
Usage : $installer->download();
Function:
Example :
Returns :
Args :
=cut
sub download{
my ($self,@args) = @_;
print "\n\nDownloading package...(this might take a while)\n\n";sleep 1;
my $file = $self->origin_download_dir;
$file =~ s|/$||;
$file .= "/" . $self->package_name;
my $destination = $self->destination_download_dir;
$destination =~ s|/$||;
$destination .= "/" . $self->package_name;;
my $ua = LWP::UserAgent->new;
my $response = $ua->request( GET($file), $destination );
die "Error at $file\n ", $response->status_line, "\n Aborting"
unless $response->is_success;
print "Package successfully downloaded at $destination.\n";
return $self;
}
=head2 uninstall
Title : uninstall
Usage : $installer->uninstall();
Function:
Example :
Returns :
Args :
=cut
sub uninstall{
my ($self,@args) = @_;
my $call;
my $destination = $self->destination_install_dir;
$destination =~ s|/$||;
$destination .= "/" . $self->directory_name;
print "\n\nUninstalling now: this will delete the installed program\n\n";
if (($^O =~ /dec_osf|linux|unix|bsd|solaris|darwin/i)) {
$call = "rm -rf $destination";
system("$call") == 0 or die "Error when trying to delete installed program $?\n";
} else {
$self->throw("uninstall not yet implemented in this platform");
}
return $self;
}
1;
# BioPerl module for Bio::Installer::Hyphy
#
# Please direct questions and support issues to <bioperl-l@bioperl.org>
#
# Cared for by Albert Vilella
#
# Copyright Albert Vilella
#
# You may distribute this module under the same terms as perl itself
# POD documentation - main docs before the code
=head1 NAME
Bio::Installer::Hyphy - DESCRIPTION of Object
=head1 SYNOPSIS
Give standard usage here
=head1 DESCRIPTION
Describe the object here
=head1 FEEDBACK
=head2 Mailing Lists
User feedback is an integral part of the evolution of this and other
Bioperl modules. Send your comments and suggestions preferably to
the Bioperl mailing list. Your participation is much appreciated.
bioperl-l@bioperl.org - General discussion
http://bioperl.org/MailList.shtml - About the mailing lists
=head2 Support
Please direct usage questions or support issues to the mailing list:
I<bioperl-l@bioperl.org>
rather than to the module maintainer directly. Many experienced and
reponsive experts will be able look at the problem and quickly
address it. Please include a thorough description of the problem