|
How to run my command-line programs |
| Installing my executable programs Most of my programs are distributed as stand-alone binaries (executable files). Each program is distributed as one file, the executable. There are self-contained: they do not require configuration files, environment variables, third-party libraries or other external dependencies. They don't have setup scripts or installers because they're not needed. All you need to do is download or copy the executable (binary file) to a directory that is accessible from the computer where you want to run the code. Compiling from source
Sometimes, the source code is in a sub-directory with the version name. In this case, you need to change to that subdirectory before running make, e.g.:
After you've run make, you should find a
binary file named sometool in the source directory. Starting a command window or shell Windows with Cygwin: If you're familiar with using Unix or Linux shells, you might want to check out the Cygwin environment: it's a really good Unix emulator for Windows. Sometimes I make Cygwin versions. Otherwise, native Windows versions of my programs will run fine under Cygwin, though there can be subtle issues with file names and path names because my code won't understand Cygwin-specific stuff like mount points. As a general rule, you can use Windows paths under Cygwin, including drive letters. You can use forward- or back-slashes in the path name, though you have to be careful with back-slashes because they're significant for the shell; usually it's easier to use forward slashes. Linux or Unix: There are many different graphical interfaces and configurations for Linux and Unix, too many that I can cover them all. Look for an icon labeled something like ''Shell', Command window' or 'Terminal'. If you don't know how to get a shell prompt, you're probably going to have trouble figuring out how to use my programs -- I recommend getting a colleague to help you who is familiar with using command-line programs. Mac: Look for the Terminal command under Applications > Utilities. This will give you a shell prompt similar to Unix and Linux. If you're not familiar with using shell commands, you're probably going to have trouble figuring out how to use my programs; I recommend getting a colleague to help you who is familiar with using command-line programs. Permission denied error ls -l /usr/bin/muscle Notice the string of characters "-rwxr-xr-x". You should see three 'r's and three 'x's, these are the read and execute bits. If you don't, you'll need to use the chmod command to update the permission bits. For example, chmod a+rx /usr/bin/muscle Command not found error echo $PATH If you're using a Windows command prompt, just type the PATH command: PATH The current directory is represented by a period. To run a command from the current directory when there is no period in the path, you can use something like: ./muscle -in seqs.fa -out seqs.afa Notice the dot and slash at the beginning of the line, this says run muscle from the current directory. If you don't know how to update your path, you can always use the full path name starting from the root (/), e.g.: /usr/bin/muscle -in seqs.fa -out seqs.afa Under the Windows command prompt, use back-slashes: C:\MyPrograms\Muscle\muscle.exe -in seqs.fa
-out seqs.afa |