3 # BioPerl module for Bio::Tools::Run::BlastPlus
5 # Please direct questions and support issues to <bioperl-l@bioperl.org>
7 # Cared for by Mark A. Jensen <maj -at- fortinbras -dot- us>
9 # Copyright Mark A. Jensen
11 # You may distribute this module under the same terms as perl itself
13 # POD documentation - main docs before the code
17 Bio::Tools::Run::BlastPlus - A wrapper for NCBI's blast+ suite
21 Give standard usage here
25 Blast+ is NCBI's successor to the C<blastall> family of programs.
31 User feedback is an integral part of the evolution of this and other
32 Bioperl modules. Send your comments and suggestions preferably to
33 the Bioperl mailing list. Your participation is much appreciated.
35 bioperl-l@bioperl.org - General discussion
36 http://bioperl.org/wiki/Mailing_lists - About the mailing lists
40 Please direct usage questions or support issues to the mailing list:
42 L<bioperl-l@bioperl.org>
44 rather than to the module maintainer directly. Many experienced and
45 reponsive experts will be able look at the problem and quickly
46 address it. Please include a thorough description of the problem
47 with code and data examples if at all possible.
51 Report bugs to the Bioperl bug tracking system to help us keep track
52 of the bugs and their resolution. Bug reports can be submitted via
55 http://redmine.open-bio.org/projects/bioperl/
57 =head1 AUTHOR - Mark A. Jensen
59 Email maj -at- fortinbras -dot- us
61 Describe contact details here
65 Additional contributors names and emails here
69 The rest of the documentation details each of the object methods.
70 Internal methods are usually preceded with a _
74 # Let the code begin...
77 package Bio
::Tools
::Run
::BlastPlus
;
83 use Bio
::Tools
::Run
::BlastPlus
::Config
;
84 use Bio
::Tools
::Run
::WrapperBase
;
85 use Bio
::Tools
::Run
::WrapperBase
::CommandExts
;
87 use base
qw(Bio::Tools::Run::WrapperBase Bio::Root::Root);
92 Usage : my $obj = new Bio::Tools::Run::BlastPlus();
93 Function: Builds a new Bio::Tools::Run::BlastPlus object
94 Returns : an instance of Bio::Tools::Run::BlastPlus
100 my ($class,@args) = @_;
101 $program_dir ||= $ENV{BLASTPLUSDIR
};
102 my $self = $class->SUPER::new
(@args);
106 =head2 program_version()
108 Title : program_version
109 Usage : $version = $bedtools_fac->program_version()
110 Function: Returns the program version (if available)
111 Returns : string representing location and version of the program
112 Note : this works around the WrapperBase::version() method conflicting with
113 the -version parameter for SABlast (good argument for not having
114 getter/setters for these)
118 =head2 package_version()
120 Title : package_version
121 Usage : $version = $bedtools_fac->version()
122 Function: Returns the BLAST+ package version (if available)
123 Returns : string representing BLAST+ package version (may differ from version())
127 sub program_version
{
129 if (!defined $self->{program_version
}) {
132 $self->{program_version
} || '';
135 sub package_version
{
137 if (!defined $self->{package_version
}) {
140 $self->{package_version
} || '';
145 my ($in, $out, $err);
147 # Get program executable
148 my $exe = $self->executable;
149 my @ipc_args = ( $exe, '-version');
152 IPC
::Run
::run
(\
@ipc_args, \
$in, \
$out, \
$err) or
153 die ("There was a problem running $exe : $!");
156 if ($out =~ /blastdbcmd\:\s+(\S+)\nPackage\:\s+([^,]+)/xms) {
157 @
{$self}{qw(program_version package_version)} = ($1, $2);
159 $self->throw("Unknown version output: $out");