-
Notifications
You must be signed in to change notification settings - Fork 3
4. Installation
Note: We are working on a Conda build for Patchwork. In the future, the user will be able to install the programming by running
conda install -c bioconda patchwork
. These instructions describe how to do the installation manually, which is the only installation method at the time of writing.
The sequence aligner DIAMOND is required to run Patchwork. We recommend using Anaconda for installing this program. After installing Anaconda, install DIAMOND by entering:
conda install -c bioconda diamond
Patchwork is written in the programming language Julia and requires that
you have julia
installed to run. The instructions for installing Julia
are available from their website but the program
can also be obtained using Conda:
conda install -c conda-forge julia
The Julia packages that the program depends on are typically handled by Julia itself. If this is not the case, please notify us by opening an issue. Before doing so, however, please check to see if the issue already exists.
In the meantime, you can try installing the missing package yourself.
Type julia
followed by Enter to open up a Julia REPL.
It should look something like this:
_
_ _ _(_)_ | Documentation: https://docs.julialang.org
(_) | (_) (_) |
_ _ _| |_ __ _ | Type "?" for help, "]?" for Pkg help.
| | | | | | |/ _` | |
| | |_| | | | (_| | | Version 1.6.2 (2021-07-14)
_/ |\__'_|_|_|\__'_| | Official https://julialang.org/ release
|__/ |
julia>
Type ]
to enter the Pkg mode (see this
page for a description of
the various modes in the Julia REPL). Once in the Pkg mode, type
add NAME
to add the package of your choice. For example, if Patchwork
was complaining that ArgParse
is missing, then type add ArgParse
.
You can use tab completion in this mode to make sure that your spelling
is correct.
Move into the directory where you want to install Patchwork and type this into your terminal:
$ git clone https://github.com/fethalen/patchwork
Go into the newly created directory by typing cd patchwork
, then follow
the instructions below to compile the program.
Note: At the moment of writing, the compiled binary is approximately 1 GB in size. Please ensure that you have enough space left on your device. This is because Julia and all the dependencies are installed alongside the program itself.
Please make sure to follow the instructions above for downloading the source code and moving into the source code's base directory. Once there, type the following to compile Patchwork:
$ julia src/compile.jl . src/precompiled.jl OUTPUT_DIR
Where OUTPUT_DIR
is the path to the output directory where you wish to
install Patchwork. The compilation process takes around 10 minutes, so
please be patient.
The program's binary will be installed to OUTPUT_DIR/bin/patchwork
.
You may want to create a symbolic link between this file to a file that
is in your path, so that you may use Patchwork from anywhere:
$ ln -s OUTPUT_DIR/bin/patchwork /usr/local/bin