fmaguire / WoLFPSort

WoLFPSort v0.2 source code as original server no longer available
Other
9 stars 11 forks source link

Missing source code to recompile binaries for non-linux system (e.g. mac OSX) #3

Open ldespons opened 7 years ago

ldespons commented 7 years ago

Hello fmaguire, I installed your package on my Mac OS X 10.9.5 following your installation instructions and ran this command line: runWolfPsortSummary fungi < Tools/WoLFPSort-master/bin/testQuery.fasta An error appeared: wolfPredict: cannot execute binary file. What have I to do? On the other hand, I read in the README file that there is a script runWolfPsortSummaryOnly.pl in the bin directory. But, I don't find it ; just a script runWolfPsortSummary. Is it normal? Thanks a lot for your help. Laurence

fmaguire commented 7 years ago

Don't copy the platform specific binaries to your system /bin just to the ./WoLFPSort/bin folder.

The default binaries already in there are the ones that should run on your system so you shouldn't need to do anything.

Due to using hardcoded relative links to the other parts of the program WoLFPSort will usually only work easily directly from the WoLFPSort (or the WoLFPSort/bin) folder.

If you cd into the folder you cloned from git and:

./bin/runWolfPsortSummary fungi < ./bin/testQuery.fasta

Does it work?

If you really need to run it from a separate folder then @peterjc in #1 has written a little wrapper script that could be used.

It looks like the README is wrong so I'll update that now.

ldespons commented 7 years ago

Hello fmaguire,

Thanks for your quick answer.

I think that I have already done what you ask me. But, I’ve done it again.

Before run the cp command, I looked at the directories WoLFPSort-master/bin: -rw-r--r--@ 1 laurence 505 14 5 avr 21:19 README -rwxr-xr-x@ 1 laurence 505 1519726 5 avr 21:19 WoLFPSORTpredictAndAlign drwxr-xr-x@ 4 laurence 505 136 5 avr 21:19 binByPlatform -rwxr-xr-x@ 1 laurence 505 4208 5 avr 21:19 checkFastaInput.pl drwxr-xr-x@ 3 laurence 505 102 5 avr 21:19 fastafmt drwxr-xr-x@ 3 laurence 505 102 5 avr 21:19 pod drwxr-xr-x@ 8 laurence 505 272 5 avr 21:19 psortModifiedForWolfFiles -rwxr-xr-x@ 1 laurence 505 1222779 5 avr 21:19 runAddAlignmentToHtml -rwxr-xr-x@ 1 laurence 505 17687 5 avr 21:19 runWolfPsortHtmlTables -rwxr-xr-x@ 1 laurence 505 8631 5 avr 21:19 runWolfPsortSummary -rw-r--r--@ 1 laurence 505 1804 5 avr 21:19 testQuery.fasta -rwxr-xr-x@ 1 laurence 505 1403559 5 avr 21:19 wolfPredict

and WoLFPSort-master/bin/binByPlatform/binary-i386: -rwxr-xr-x@ 1 laurence 505 1519726 5 avr 21:19 WoLFPSORTpredictAndAlign -rwxr-xr-x@ 1 laurence 505 1222779 5 avr 21:19 runAddAlignmentToHtml -rwxr-xr-x@ 1 laurence 505 1403559 5 avr 21:19 wolfPredict

I ran the cp command: cp ./WoLFPSort-master/bin/binByPlatform/binary-i386/* ./WoLFPSort-master/bin

Then, I looked at again the directory WoLFPSort-master/bin: -rw-r--r--@ 1 laurence 505 14 5 avr 21:19 README -rwxr-xr-x@ 1 laurence 505 1519726 6 avr 10:29 WoLFPSORTpredictAndAlign drwxr-xr-x@ 4 laurence 505 136 5 avr 21:19 binByPlatform -rwxr-xr-x@ 1 laurence 505 4208 5 avr 21:19 checkFastaInput.pl drwxr-xr-x@ 3 laurence 505 102 5 avr 21:19 fastafmt drwxr-xr-x@ 3 laurence 505 102 5 avr 21:19 pod drwxr-xr-x@ 8 laurence 505 272 5 avr 21:19 psortModifiedForWolfFiles -rwxr-xr-x@ 1 laurence 505 1222779 6 avr 10:29 runAddAlignmentToHtml -rwxr-xr-x@ 1 laurence 505 17687 5 avr 21:19 runWolfPsortHtmlTables -rwxr-xr-x@ 1 laurence 505 8631 5 avr 21:19 runWolfPsortSummary -rw-r--r--@ 1 laurence 505 1804 5 avr 21:19 testQuery.fasta -rwxr-xr-x@ 1 laurence 505 1403559 6 avr 10:29 wolfPredict

and I ran the following command: bin$ ./runWolfPsortSummary fungi < testQuery.fasta

I still have the same error!: sh: /Users/laurence/Tools/WoLFPSort-master/bin/wolfPredict: cannot execute binary file

What do you think about that? Best regards, Laurence

Le 5 avr. 2017 à 21:15, Finlay Maguire notifications@github.com a écrit :

./runWolfPsortSummary fungi < testQuery.fasta

peterjc commented 7 years ago

Ah - you are running on a Mac, likely 64bit intel unless it is quite an older machine.

You are trying to use the 32-bit Linux binaries. They won't work. Nor will the provided binary-sparc files.

You (or somebody) would need to compile the binaries for the Mac, but unfortunately I don't know if Paul Horton ever released the source code.

ldespons commented 7 years ago

Yes, I have a Mac OS X 10.9.5 with a processor Quad-Core Intel Xeon 64-bit. Your WoLFPSort package would be very useful to me. So, please, can you ask Paul Horton if he ever released the source code. Laurence

Le 6 avr. 2017 à 11:03, Peter Cock notifications@github.com a écrit :

Ah - you are running on a Mac, likely 64bit intel unless it is quite an older machine.

You are trying to use the 32-bit Linux binaries. They won't work. Nor will the provided binary-sparc files.

You (or somebody) would need to compile the binaries for the Mac, but unfortunately I don't know if Paul Horton ever released the source code.

fmaguire commented 7 years ago

Yeah, I was worried that was going to be the problem but thought it was a good idea to eliminate relpath issues first!

The binaries were statically linked and compiled on 32-bit Intel 80386 (on a linux 2.2.0 kernel, so 18 years old). Incredibly, they still run on the most recent kernel (4.10.7) I've tried on a x86-64-bit machine

To be honest, easiest solution might just be to spin up a linux VPS (on one of the cloud providers e.g. AWS) or VM to execute it.

If you really want to try and get it working on your mac you can try and use dtruss (mac equivalent of strace apparently) to see where it is failing to run and which i386 lib is missing:

dtruss ./runWolfPsortSummary fungi < testQuery.fasta

I've e-mailed Paul just in case he still has the sources..

ldespons commented 7 years ago

My goal is to run, on my Mac OS X server, the script runWolfPsortSummary in a command included in a home-made python script.

I think it’s very complicated for me to understand all these problems nested one in the other like « Russian dolls » because I'm not a computer scientist but a biologist who can just write python scripts to analyze biological data !

When I use dtruss ./runWolfPsortSummary fungi < testQuery.fasta, I have this message: dtrace: failed to initialize dtrace: DTrace requires additional privileges

Laurence

Le 6 avr. 2017 à 14:22, Finlay Maguire notifications@github.com a écrit :

Yeah, I was worried that was going to be the problem but thought it was a good idea to eliminate relpath issues first!

The binaries were statically linked and compiled on 32-bit Intel 80386 (on a linux 2.2.0 kernel, so 18 years old). Incredibly, they still run on the most recent kernel (4.10.7) I've tried on a x86-64-bit machine

To be honest, easiest solution might just be to spin up a linux VPS (on one of the cloud providers e.g. AWS) or VM to execute it.

If you really want to try and get it working on your mac you can try and use dtruss (mac equivalent of strace apparently) to see where it is failing to run and which i386 lib is missing:

dtruss ./runWolfPsortSummary fungi < testQuery.fasta

I've e-mailed Paul just in case he still has the sources..

fmaguire commented 7 years ago

dtruss is a diagnostic tool that tells you the details of how a program is interacting with your operating system, because of this it needs root privileges to run. So you have to either switch to a root shell or prepend sudo to the command above.

sudo dtruss ./runWolfPsortSummary fungi < testQuery.fasta

Fundamentally, the problem is that wolfPredict has been compiled to run on a specific type of hardware (i386 which is the original older 32-bit version of x86_64 - which your system will use) and as a specific type of binary (ELF format) whereas mac's use a different format (MACH). On top of this it might rely on certain libraries that OSX doesn't include by default.

So to get it to run on your system we either need to recompile it but we can't do this because we don't have the source code. The easiest solution is to just run it on a linux (generally the easy solution when it comes to running bioinformatics software in general!). The difficult way and the only option you have if you want to stick with OSX is to use the output of dtruss to debug where the issue is and modify your system to get it to run. This would likely be a non-trivial process.

I should clarify, this isn't a piece of software I've created or been involved in developing. The original website died so (with retrospective permission) I rehosted the program. It isn't really supported for non-Linux systems and, to be honest, it isn't really my responsibility to troubleshoot it. I'm happy to help but I can't really devote a lot of time to it!

ldespons commented 7 years ago

OK, thanks a lot for your explanations. I think I will use another program to predict the subcellular location of proteins ; except if Paul Horton gives you the source codes and if somebody compiles the binaries for the Mac. Keep me informed… Best regards, Laurence

Le 6 avr. 2017 à 17:16, Finlay Maguire notifications@github.com a écrit :

dtruss is a diagnostic tool that tells you the details of how a program is interacting with your operating system, because of this it needs root privileges to run. So you have to either switch to a root shell or prepend sudo to the command above.

sudo dtruss ./runWolfPsortSummary fungi < testQuery.fasta

Fundamentally, the problem is that wolfPredict has been compiled to run on a specific type of hardware (i386 which is the original older 32-bit version of x86_64 - which your system will use) and as a specific type of binary (ELF format) whereas mac's use a different format (MACH). On top of this it might rely on certain libraries that OSX doesn't include by default.

So to get it to run on your system we either need to recompile it but we can't do this because we don't have the source code. The easiest solution is to just run it on a linux (generally the easy solution when it comes to running bioinformatics software in general!). The difficult way and the only option you have if you want to stick with OSX is to use the output of dtruss to debug where the issue is and modify your system to get it to run. This would likely be a non-trivial process.

I should clarify, this isn't a piece of software I've created or been involved in developing. The original website died so (with retrospective permission) I rehosted the program. It isn't really supported for non-Linux systems and, to be honest, it isn't really my responsibility to troubleshoot it. I'm happy to help but I can't really devote a lot of time to it!

peterjc commented 7 years ago

I suggest one of you re-title this issue to something like "Missing source code to recompile binaries (e.g. for macOS)"

fmaguire commented 7 years ago

Good call Peter. Thanks for the input! If Paul gets back to me I'll be sure to add the sources to the repo.

DanBuchan commented 6 years ago

Hi, I have finally tracked down the author of WoLF PSORT (Paul Horton) and emailed him about releasing the source code for this. His respnose is as follows:


I am aware that just having binaries around for part of the WoLF PSORT code is not ideal.
Digging up the old C++ code for that and updating it to compile with newer versions of g++ is on my to do list.
I expact I will do that someday, or perhaps make a new version of the software altogether.

To be honest though, I'm kind of busy with newer projects and cannot be sure I will get to this very soon.

I apologize for the inconvenience!

-Paul

I guess this should be thread should be closed

peterjc commented 6 years ago

Hopefully Paul can find and share the old C++ code, likely someone would volunteer to update it as needed.

radusuciu commented 4 years ago

I've dockerized this here: https://github.com/radusuciu/docker-wolfpsort

run like so:

docker run --rm radusuciu/docker-wolfpsort animal MNNLSFSELCCLFCCPPCPGKIASKLAFLPPDPTYTLMCDESGSRWTLHLSERADWQYSSREKDAIECFMTRTSKGNRIACMFVRCSPNAKYTLLFSHGNAVDLGQMSSFYIGLGSRINCNIFSYDYSGYGASSGKPTEKNLYADIEAAWLALRTRYGIRPENVIIYGQSIGTVPSVDLAARYESAAVILHSPLTSGMRVAFPDTKKTYCFDAFPNIDKISKITSPVLIIHGTEDEVIDFSHGLALFERCQRPVEPLWVEGAGHNDVELYGQYLERLKQFVSQELVNL