simroux / VirSorter

Source code of the VirSorter tool, also available as an App on CyVerse/iVirus (https://de.iplantcollaborative.org/de/)
GNU General Public License v2.0
104 stars 30 forks source link

mga is not detected on OSX #36

Closed simone-pignotti closed 5 years ago

simone-pignotti commented 5 years ago

Hi,

Thanks for developing and maintaining this efficient pipeline. I am testing the program on a mac, and I have found an issue with the MetaGeneAnnotator command.

I guess you are not supporting OSX, but I found out that a very little modification seems to do the job (I managed to run the entire pipeline and it produces the desired output).

In these two locations you use which mga_linux_ia64 to detect the mga program, end exit with an error if that doesn't exist: https://github.com/simroux/VirSorter/blob/c9b8943466cdd9914fc0eddf7be40d3caa2bb92f/Scripts/Step_first_add_custom_phage_sequence.pl#L42 https://github.com/simroux/VirSorter/blob/c9b8943466cdd9914fc0eddf7be40d3caa2bb92f/Scripts/Step_1_contigs_cleaning_and_gene_prediction.pl#L25 Since the name of the executable is mga_osx on OSX platforms, those commands won't work.

I would suggest to change the README to point to the conda package for MetaGeneAnnotator, which provides the mga command, then call which mga in the two scripts above. For the manual installation, you could change the ln command to create a mga symlink instead of mga_linux_ia64.

I hope you will find this comment useful, and thanks again for your work.

Simone

simroux commented 5 years ago

Thanks for reporting this ! We need to keep the "mga_linux_ia64" for compatibility with older docker containers, but I added the possibility to also look for "mga" executables (i.e. which would have been installed through conda). When installing mga through conda, VirSorter should now work straight out of the box and not require any modification, but let me know if this is not the case.

simone-pignotti commented 5 years ago

Hi Simon,

That works as well, I just tested it on OSX with bioconda's mga. Thanks a lot for the quick fix!

Simone