Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
cjfields opened this issue Oct 8, 2015 · 1 comment

Comments

@cjfields
Copy link
Member

cjfields commented Oct 8, 2015


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
Copy link
Member Author

cjfields commented Oct 8, 2015


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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant