sanger-pathogens / Bio-Tradis

A set of tools to analyse the output from TraDIS analyses
https://sanger-pathogens.github.io/Bio-Tradis/
Other
22 stars 29 forks source link

Installing Bio-Tradis Fail #80

Closed minisciencegirl closed 6 years ago

minisciencegirl commented 6 years ago

I am using linuxbrew to install Bio-Tradis. I've ran brew doctor and brew update, followed by brew install of r, smalt, samtools and cpanm Everything went through smoothly.

However, when I ran sudo cpanm -f Bio::Tradis, I received this message: --> Working on Bio::Tradis Fetching http://www.cpan.org/authors/id/A/AJ/AJPAGE/Bio-Tradis-1.3.3.tar.gz ... OK Configuring Bio-Tradis-1.3.3 ... OK Building and testing Bio-Tradis-1.3.3 ... FAIL ! Testing Bio-Tradis-1.3.3 failed but installing it anyway.

I don't have any additional error message to troubleshoot. Thoughts on how to get Bio-Tradis to run?

lbarquist commented 6 years ago

That's a bit mysterious. Adding a -v to the cpanm command should provide more info, particularly if any tests fail, e.g.:

sudo cpanm -f -v Bio::Tradis

Can you post the output from this?

minisciencegirl commented 6 years ago

Error summary:

Looks like you failed 9 tests of 45. Failed test 'smalt in PATH' at t/requires_external.t line 8. Failed test 'tabix in PATH' at t/requires_external.t line 8. Looks like you failed 2 tests of 6. Failed 6/15 test programs. 17/218 subtests failed. make: *** [test_dynamic] Error 2 ! Testing Bio-Tradis-1.3.3 failed but installing it anyway.

Here is the complete output: install.log

lbarquist commented 6 years ago

So, to me it looks like these are path issues with smalt and samtools (tabix comes from samtools).

I'm assuming smalt and tabix are in your path with your user account? I.e. you can run 'smalt' and 'tabix' at the command line and get the help screens?

If this is the case, then I suspect this an issue with your sudo not preserving the environment and/or running the root profile -- this is the case with some Linux distributions (see here: https://unix.stackexchange.com/questions/83191/how-to-make-sudo-preserve-path). You can test if this is the case by comparing the output of:

echo 'echo $PATH' | sh

and

echo 'echo $PATH' | sudo sh

If these are different, then I think this solution from that stackoverflow thread I linked to should fix your problem, though I haven't been able to test this:

sudo env "PATH=$PATH" cpanm -f -v Bio::Tradis

Any luck with that? I'm guessing Bio::Tradis should be installed properly now anyway as these errors shouldn't affect the installation (can you run 'bacteria_tradis' from the commandline?), but it'd be comforting to have all the tests succeeding....

minisciencegirl commented 6 years ago

Thank you so much, @lbarquist!!

lbarquist commented 6 years ago

No problem! I assume it worked?

lbarquist commented 6 years ago

Great, hope it's useful to you!

@andrewjpage mind closing this issue when you've got a chance? I don't have permissions. Thanks!