bioperl / bioperl-live-redmine

Legacy tickets migrated from the OBF Redmine issue tracker: http://redmine.open-bio.org
0 stars 0 forks source link

Bio::Tools::Run::StandAloneBlastPlus --remote database with '/' separator #129

Open cjfields opened 8 years ago

cjfields commented 8 years ago

Author Name: J Nelson (J Nelson) Original Redmine Issue: 3322, https://redmine.open-bio.org/issues/3322 Original Date: 2012-02-02 Original Assignee: Bioperl Guts


The -remote parameter to Bio::Tools::Run::StandAloneBlastPlus->new() is throwing an error if --db_name contains a forward slash. The error text is: “Path specified by DB_DIR+DB_NAME ('$d') does not exist

Example:

my $db = Bio::Tools::Run::StandAloneBlastPlus->new(
    -db_name => 'Microbial/100226',
    -remote => 1
);

throws

------------- EXCEPTION: Bio::Root::Exception -------------
MSG: Path specified by DB_DIR+DB_NAME ('Microbial') does not exist
STACK: Bio::Root::Root::throw /usr/local/share/perl/5.10.1/Bio/Root/Root.pm:472
STACK: Bio::Tools::Run::StandAloneBlastPlus::new /usr/local/share/perl/5.10.1/Bio/Tools/Run/StandAloneBlastPlus.pm:552
STACK: testStandAloneBlastPlus_remote.pl:4
-----------------------------------------------------------

Some of the databases available do contain the forward slash in their name, as seen here: http://www.ncbi.nlm.nih.gov/staff/tao/URLAPI/remote\_blastdblist.html\#7.2 so it would be nice if StandAloneBlastPlus supported them.

I’ve attached a simple patch that I believe fixes the problem, as well as a sample script that demonstrates the error.

cjfields commented 8 years ago

Original Redmine Comment Author Name: J Nelson Original Date: 2012-02-02T16:40:24Z


Update: The patch I originally submitted did not work on Win32 machines, due to File::Spec->catfile() turning the ‘/’ into a ‘\’ before sending the web request. This attached patch corrects that.