-
Notifications
You must be signed in to change notification settings - Fork 2
Installation
There are several ways to install KAST, allowing flexibility for users of systems administrators to get access to the software.
If you have problems with any installation method or wish me to set up another installation method, please raise a github issue.
This is the easiest way to use KAST 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 xvfzto uncompress and extract the binary - Run the program
e.g.
mjv08@lantern:~$ wget https://github.com/martinjvickers/KAST/releases/download/1.0.0/KAST_v1.0.0.tar.gz
--2022-02-28 13:52:43-- https://github.com/martinjvickers/KAST/releases/download/1.0.0/KAST_v1.0.0.tar.gz
Resolving github.com (github.com)... 140.82.121.4
...
HTTP request sent, awaiting response... 200 OK
Length: 305060 (298K) [application/octet-stream]
Saving to: ‘KAST_v1.0.0.tar.gz’
KAST_v1.0.0.tar.gz 100%[======================================================================>] 297.91K --.-KB/s in 0.08s
2022-02-28 13:52:44 (3.79 MB/s) - ‘KAST_v1.0.0.tar.gz’ saved [305060/305060]
mjv08@lantern:~$ tar xvfz KAST_v1.0.0.tar.gz
kast
mjv08@lantern:~$ ./kast --version
kast version: 1.0.0
SeqAn version: 2.4.0
There is a maintained version of KAST on biocontainers which can be used with docker. We will assume you've already installed docker.
To pull the container, you need to specify the version tag like so;
martin@desktop:~$ docker pull biocontainers/kast:v1.0.0_cv1
You may need to do this with administator permissions/sudo, e.g.
martin@desktop:~$ sudo docker pull biocontainers/kast:v1.0.0_cv1
For a list of KAST biocontainer version tags, visit here;
https://hub.docker.com/r/biocontainers/kast/tags
The authors don't have access to a Apple devices however it is possible to install KAST using the docker image. To install docker on your Mac computer please refer to the instructions on the docker website;
https://docs.docker.com/desktop/mac/install/
If you have success compiling KAST from source using SeqAn on a Mac, we'd very much welcome a pull request with install instructions.
To use the docker run you may need your IMAGE ID value which can be obtained using docker images;
martin@desktop:~$ sudo docker images
[sudo] password for mvickers:
REPOSITORY TAG IMAGE ID CREATED SIZE
biocontainers/kast v1.0.0_cv1 5b7fb175b742 5 days ago 3.06GB
and then docker run can be used to run kast commands
martin@desktop:~$ sudo docker run 5b7fb175b742 kast --version
kast version: 1.0.0
SeqAn version: 2.4.0
An example of compiling from source using a modern version of ubuntu (16.04+) is described below.
martin@desktop:~$ sudo apt-get install git g++ build-essential cmake zlib1g-dev libbz2-dev libboost-all-dev
martin@desktop:~$ git clone https://github.com/seqan/seqan.git seqan
martin@desktop:~$ git clone https://github.com/martinjvickers/KAST.git
martin@desktop:~$ cd KAST
martin@desktop:~$ cmake ../KAST -DCMAKE_MODULE_PATH=../seqan/util/cmake -DSEQAN_INCLUDE_PATH=../seqan/include -DCMAKE_CXX_FLAGS=-std=c++14 -DCMAKE_BUILD_TYPE=Release
martin@desktop:~$ make
This creates a binary file which you can either run from it's current location, or copy to /usr/local/bin/ for global access on your machine or copied to ~/bin for local access. This is explained further in Making KAST accessible in your local environment
When you download KAST you can run it in the directory where you downloaded it from by simply typing ./kast. 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 KAST in full.
This can be resolved by adding the kast binary file into a location that your Linux operating system searches for when typing in a command. There are several ways to do this.
This is probably the preferred way of installing the KAST 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
bindirectory in your home directory - Move/Copy the
kastbinary to thebindirectory - Ensure your Linux environment is search for your local
bindirectory. (If not, add it to your environment)
e.g.
martin@desktop:~$ mkdir ~/bin
martin@desktop:~$ mv kast ~/bin
At this point, if you can simply type kast and see the following;
martin@desktop:~$ kast
KAST - Alignment-free sequence comparison.
===========================================
kast -q query.fasta -r reference.fasta -o results.txt [OPTIONS]
kast -p mydata.fasta -o results.txt [OPTIONS]
Try 'kast --help' for more information.
VERSION
Last update: Feb 2022
kast version: 1.0.0
SeqAn version: 2.4.0
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.
You can move or copy kast into your /usr/local/bin directory.
martin@desktop:~$ tar xvfz KAST_v1.0.0.tar.gz
kast
martin@desktop:~$ kast
kast: command not found
martin@desktop:~$ sudo mv kast /usr/local/bin/
[sudo] password for martin:
martin@desktop:~$ kast
kast - Alignment-free sequence comparison.
===========================================
kast -q query.fasta -r reference.fasta -o results.txt [OPTIONS]
kast -p mydata.fasta -o results.txt [OPTIONS]
Try 'kast --help' for more information.
VERSION
Last update: Feb 2022
kast version: 1.0.0
SeqAn version: 2.4.0