Skip to content

Installation

Martin Vickers edited this page Mar 15, 2017 · 14 revisions

Static Binary Quick start

This is the easiest way to use ALFSC if you are starting out and your system is compatible with this. All you need to so is download the latest release and copy this either into your working directory for you to use.

  • Download the the latest release using wget
  • Use tar xvfz to uncompress and extract the binary
  • Run the program

e.g.

martin@desktop:~$ wget https://github.com/martinjvickers/alfsc/releases/download/testing_0.0.6/alfsc_testing_0.0.6.tar.gz
--2017-03-15 09:47:38--  https://github.com/martinjvickers/alfsc/releases/download/testing_0.0.6/alfsc_testing_0.0.6.tar.gz
Resolving github.com (github.com)... 192.30.253.113, 192.30.253.112
Connecting to github.com (github.com)|192.30.253.113|:443... connected.
...
HTTP request sent, awaiting response... 200 OK
Length: 1151139 (1.1M) [application/octet-stream]
Saving to: ‘alfsc_testing_0.0.6.tar.gz’

100%[======================================>] 1,151,139   1.15MB/s   in 1.0s   

2017-03-15 09:47:41 (1.15 MB/s) - ‘alfsc_testing_0.0.6.tar.gz’ saved [1151139/1151139]

martin@desktop:~$ tar xvfz alfsc_testing_0.0.6.tar.gz 
alfsc
martin@desktop:~$ ./alfsc 
alfsc - Alignment-free sequence comparison.
===========================================
    alfsc -q query.fasta -r reference.fasta -o results.txt [OPTIONS]
    alfsc -p mydata.fasta -o results.txt [OPTIONS]
    Try 'alfsc --help' for more information.

VERSION
    Last update: March 2017
    alfsc version: 0.0.5
    SeqAn version: 2.2.1

Making ALFSC accessible in your local environment

When you download ALFSC you can run it in the directory where you downloaded it from by simply typing ./alfsc. Note that the ./ is needed. However this has disadvantages as you either have to put all the data you wish to process into that directory or refer to the location of ALFSC in full.

This can be resolved by adding the alfsc binary file into a location that your Linux operating system searches for when typing in a command. There are several ways to do this.

Personal home directory install

This is probably the preferred way of installing the ALFSC binary if you are on a multi-user machine without admin rights or do not wish to install system wide. There are three simple steps;

  • Create a local bin directory in your home directory
  • Move/Copy the alfsc binary to the bin directory
  • Ensure your Linux environment is search for your local bin directory. (If not, add it to your environment)

e.g.

martin@desktop:~$ mkdir ~/bin
martin@desktop:~$ mv alfsc ~/bin

At this point, if you can simply type alfsc and see the following;

martin@desktop:~$ alfsc
alfsc - Alignment-free sequence comparison.
===========================================
    alfsc -q query.fasta -r reference.fasta -o results.txt [OPTIONS]
    alfsc -p mydata.fasta -o results.txt [OPTIONS]
    Try 'alfsc --help' for more information.

VERSION
    Last update: March 2017
    alfsc version: 0.0.5
    SeqAn version: 2.2.1

all is ready. However if that doesn't work you will need to add the ~/bin directory to your library path. To check your library path, type the following;

martin@desktop:~$ echo $PATH
/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin

To temporarily add your newly created local home binary directory you can use the export command like so;

martin@desktop:~$ export PATH=~/bin:$PATH
martin@desktop:~$ echo $PATH
/home/martin/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin

Notice how /home/martin/bin is now at the front of the list. The ~/ automatically filled in the complete path to your home directory. This will not be permanent though. To do this you can add the export PATH=~/bin:$PATH line to the bottom of your .bashrc file in your home directory.

Using your favourite command line text editor e.g. nano, vi, emacs etc., open the ~/.bashrc file and add export PATH=~/bin:$PATH to the bottom.

With admin rights on a local machine

You can move or copy alfsc into your /usr/local/bin directory.

martin@desktop:~$ tar xvfz alfsc_testing_0.0.6.tar.gz 
alfsc
martin@desktop:~$ alfsc
alfsc: command not found
martin@desktop:~$ sudo mv alfsc /usr/local/bin/
[sudo] password for martin: 
martin@desktop:~$ alfsc
alfsc - Alignment-free sequence comparison.
===========================================
    alfsc -q query.fasta -r reference.fasta -o results.txt [OPTIONS]
    alfsc -p mydata.fasta -o results.txt [OPTIONS]
    Try 'alfsc --help' for more information.

VERSION
    Last update: March 2017
    alfsc version: 0.0.5
    SeqAn version: 2.2.1

Install from Source

TODO

Clone this wiki locally