# Installing Muscle and HMMER - commandline/unix
Specifics targeted towards students of BIOS 30318 - Intro to Biocomputing, Instructed by Dr. Stuart Jones @ Notre Dame for the Fall 2018 semester
This tutorial was written by Chissa Rivaldi and last updated on 11-26-2018.
Background - [Logging onto a remote computer](https://hackmd.io/-g50UwrMSCmcptDyLGibYg?both#)
Go to this website: https://www.drive5.com/muscle/downloads.htm and decide which copy of the download you want. Since we're installing on the remote machines on campus (aka you logged into another computer from your own computer by using the command `ssh`)), you should select the copy for Linux, particularly the 64-bit. Don't download this to your local computer, but instead copy the link location by right-clicking on the link.
If you haven't already, log into the remote computer. We're going to use the command `wget` to get this file to this computer.
`wget <paste link from website>`
After you press enter, you should see the file download to your computer. The output should look like this:
If you use the command `ls`, you'll see a new file in your directory that ends in in `tar.gz`. This extension means that your file is compressed (or zipped) twice, so we need a command to decompress and use it.
`tar -xvzf <file.tar>`
Check that the `.tar.gz` is gone from your file.
What is the `tar` command and what are all the flags?
You will probably not always remember which flags to use. No worries, no one does, really.
[XKCD Link ](https://xkcd.com/1168/)
Now you can use your file! Test that it works by typing:
to pull up the documentation (and get some info about how to use this new tool).
Note regarding installation:
HMMER has a few different ways to install - including our favorite*, conda. Since we're on remote computers & don't have administration access (reminder to never use `sudo` on a campus-owned remote computer, no matter what stack exchange says), we're going to install and compile it on our own. If you want to use conda, brew, or any others on your local machine, see instructions here: http://hmmer.org/documentation.html
We're going to start this one very much like the Muscle installation. Go to this website: and pick the file you want. In this case, there is only one download for all operating systems, and you just want to pick a version
<b>Why do they keep the previous versions around?</b>
When selecting a version, you generally want the latest version, but if you're trying to replicate another person's analysis or access a deprecated feature, you might want to pick an older release.
Use `wget` again to download this linke (rather, the data to which the link is accessing).
From here, we're going to decompress the file the same way we did above:
tar -xvzf <file>
The output will be extensive. Unlike Muscle, we need to do a bit more work before we can use HMMER. Use `ls` and see that a new directory has been created. If you look around in there a bit you'll find a file called INSTALL. Use `cat` or `less` to look at it and see the install instructions. We've already done the first part (you might notice the decompress commands are a little different - like most things in Linux, there are many options to do many things).
You should already be in the directory hmmer-3.2/. Now you'll want to run through the commands according to the instructions. Each of these commands take a few minutes. `make install` will not work on its own because we don't have root/admin privleges. To fix this, we need to tell HMMER where we want to install it. Generally, your directory should be set up so that you have your exectuable files in one location, `~/local/bin`
For me, if I `cd` and `pwd` when I'm in this folder, I see this
You don't *have to* put your executable files here, but generally that's where they live (executables are often binary files, and the /bin/ folder is short for binary).
So what do we do? Back up a little bit and make an adjustment to our first command, ./configure. Remember this for future installations where you might run into permission blocks.
./configure --prefix /afs/nd.edu/user33/crivaldi/local/
#in your own command, this path will vary
Then you can run the make, make check, and make install commands without any more errors (also follow the instructions to install the easel tools). To test the installation, you can try any of the new executable files (hmmbuild is one) with the `-h` flag, like we did with muscle.
We're all done! As for what to do with these programs, that's for the lecture. If you're curious about what each of these programs are doing under the hood, a good place to start is the documentation. For those of you really interested in the algorithms, they're all spelled out there. If you want to try and code some of those algorithms yourself, it's a great intro into bioinformatics. Check out some resources like [Rosalind](http://rosalind.info/problems/locations/) and the textbook Genomic Approaches in Earth and Environmental Sciences by Dick Gregory, which has some pdf copies floating around the interwebs.