Installation

Using Docker

It is possible to build a Docker image that contains vpsearch as well as all of its dependencies. This is useful, for example, when integrating vpsearch into a workflow manager, like Snakemake, CWL, or WDL.

To build the image, run the following command from the root of this repository:

docker build . -t vpsearch-image

Once the image has been built, vpsearch can then be run from within a container. Assuming you have a FASTA file of target sequences in the file database.fasta in the current directory, run the following to build a vpsearch index:

docker run -it -v $PWD:/data -t vpsearch-image vpsearch build /data/database.fasta

To query the index for a given FASTA file query.fasta of query sequences, run:

docker run -it -v $PWD:/data -t vpsearch-image vpsearch query /data/database.db /data/query.fasta

From source (development environment)

For platforms where no binary wheel is available, or in order to contribute to the codebase, it is necessary to install the package from source. To do so, you will need a C and C++ compiler with support for the AVX2 and AVX512 instruction sets (on Linux, version 4.9.2 and up of the gcc/g++ compiler will do, while on macOS any recent version of clang is sufficient).

Using pip, the package can be installed in development mode in your Python environment in the normal way:

python -m pip install -e .

To verify that everything works as expected, you can run the unit test suite via:

python -m unittest discover -v vpsearch