Unable to launch Muscle package from pdbaln() function.

Issue #206 resolved
Former user created an issue

Following the tutorial on Normal Mode Analysis 1, I want to align pdb structures using the pdbaln function:

pdbs.all <- pdbaln(files, fit=TRUE)

Error in seqaln(s, id = files, ...) : Launching external program failed
  make sure 'muscle' is in your search path
#Library paths:
> .libPaths()
[1] "/Users/Jamie/R_packages/muscle/R"                              
[2] "/Library/Frameworks/R.framework/Versions/3.1/Resources/library"

I initially installed muscle in the default directory, then tried installing it locally with the same result. Could anyone please advise me on how to resolve this issue?

n.b. R 3.1.1, bio3d 2.1 Cheers, Jamie


Jamie Macpherson PhD Student, King's College London

Comments (14)

  1. Lars Skjærven

    Hi Jamie, You can try to explicitly supply the path to the muscle exectuable (see help(seqaln) for details):

    pdbaln(files, exefile="/usr/local/bin/muscle")
    

    (assuming muscle is installed under "/usr/local/bin/muscle")

    To avoid providing the path every time you should include "/usr/local/bin" (or your equivalent) to your search path. e.g. add the following line to your .bashrc file:

    export PATH=/usr/local/bin:$PATH
    
  2. Jamie Mac

    Hi Lars,

    Thanks for your quick response. I have tried defining the path to the muscle execution file:

    pdbs.all <- pdbaln(files, exefiles="/Library/Frameworks/R.frameworks/Versions/3.1/Resources/library/muscle/R/muscle")

    Unfortunately I still get the same error: Error in seqaln(s, id = files, ...) : Launching external program failed make sure 'muscle' is in your search path

    Am I defining the wrong executable file? Is there are way around this?

    Thanks, Jamie

  3. Lars Skjærven

    Could you try upgrading to version 2.2 of Bio3d? It's on CRAN, so

    install.packages("bio3d")
    

    would upgrade your bio3d installation.

  4. Jamie Mac

    Yes I am using Bio3d 2.2 and sorry I meant exe file (typo). Do I perhaps have to define the executable file within searchpaths() ?

  5. Lars Skjærven

    what happens if you do:

    > system("/usr/local/bin/muscle -version")
    MUSCLE v3.8.31 by Robert C. Edgar
    
  6. Jamie Mac

    system("/home2/jamesm/R/x86_64-redhat-linux-gnu-library/3.1/muscle/R/muscle -version") /home2/jamesm/R/x86_64-redhat-linux-gnu-library/3.1/muscle/R/muscle: line 19: syntax error near unexpected token {' /home2/jamesm/R/x86_64-redhat-linux-gnu-library/3.1/muscle/R/muscle: line 19:local({'

  7. Lars Skjærven

    Great. seems to be working. So why is there a syntax error two replies up? That's where you should focus. Which permissions are given to muscle? did you check that it runs from terminal?

  8. Barry Grant

    Hi Jamie, Looks like muscle is possibly not setup properly on your mac, can you reproduce what I see in my mac terminal:

    barry$ which muscle
    /Users/barry/bin/muscle
    
    barry$ muscle
    MUSCLE v3.8.31 by Robert C. Edgar
    ...<cut>...
    

    To get this I renamed the muscle excitable to be just 'muscle' and moved it to be in my local ~/bin/ directory that is in my PATH environment variable, which in my case is define in a file called ~/.profile (although ~/.bashrc as Lars mentions above is also good). Here is the relevant line in my ~/.profile file.

    export PATH=/usr/local/mysql/bin:~/bin:$PATH
    
  9. Jamie Mac

    Thank you both for your help. I made the silly mistake of trying to source the muscle R package binary instead of the standalone muscle program binary. After following your instructions it now works fine.

    Thanks again for your help, Jamie

  10. Log in to comment