Installation¶
Install nextflow¶
nf-LO is a nextflow workflow, and as such it relies on nextflow to be installed and accessible. If you need to install nextflow, follow the instructions here. You need to have Java 8 or newer installed, and then install nextflow as follow:
curl -s https://get.nextflow.io | bash
Install the dependencies¶
nf-LO uses a series of software to automate and streamline the liftOver generation process. We provide four different ways to install and run all of these dependencies:
Anaconda: this is the recommended and easiest way.
Docker: you can create a docker image locally by using the
Dockerfileandenvironment.ymlfiles in the folderSingularity: you can create a singularity sif image locally by using the
singularity.defandenvironment.ymlfiles in the folderLocal installation: we provide an
install.shscript that will take care of installing all the dependencies.
The following dependencies are needed to run every component of nf-LO:
maf-convert from last
Many .exe files from the kent toolkit:
axtChain
axtToMaf
chainAntiRepeat
chainMergeSort
chainNet
chainPreNet
chainStitchId
chainSplit
chainToAxt
faSplit
faSize
faToTwoBit
lavToPsl
liftOver
liftUp
netChainSubset
netSyntenic
twoBitInfo
Plus the optional dependencies:
All dependecies used by nf-LO are free for academic, nonprofit and personal use. For commercial use, check the licencing conditions for the different tools separately.
Anaconda¶
Almost all dependencies can be installed through anaconda. Follow the instructions here to install anaconda on your machine. This is the easiest route, since it can be run directly from the github repository:
nextflow run evotools/nf-LO -profile test,conda
The only dependencies that at this stage cannot be installed with anaconda is mafTools. This component is required to generate some of the final metrics of the alignments, and can be installed manually on your macOS or linux machine using the install_maftools.sh script.
Mamba¶
To speed up the process, you can install all of the dependencies using mamba instead.
You can take advantage of mamba in two possible ways:
Use the
--mambaoptionManually installing all the software, and then point to the environment.
To use the first, simply add the --mamba option:
nextflow run evotools/nf-LO --igenome_source danRer7 --target /PATH/TO/target.fa --mamba -profile conda
To manually install the dependencies using mamba, first install it in your anaconda environment:
conda install -c conda-forge -y mamba
Then, create the environment using mamba:
mamba env create -f environment.yml
This will create a new environment in your anaconda installation folder, that you can then pass to nextflow using the -with-conda option:
nextflow run evotools/nf-LO -profile test -with-conda `conda info --envs | 'awk $1=="nf-LO" {print $2}'`
Run with docker¶
The dependencies can be run using docker. Follow the instructions here to install docker on your system. The docker image needs to be built locally using the Dockerfile in the folder as follows:
curl -O https://raw.githubusercontent.com/evotools/nf-LO/main/Dockerfile
curl -O https://raw.githubusercontent.com/evotools/nf-LO/main/environment.yml
docker build -t nflo:latest .
Then, you can run nf-LO as follows:
nextflow run evotools/nf-LO -profile test,docker -with-docker nflo:latest
Run with singularity¶
You can run the workflow using a singularity container. Follow the instructions here to install singularity. Then, you need to build it first using the command:
curl -O https://raw.githubusercontent.com/evotools/nf-LO/main/singularity.def
curl -O https://raw.githubusercontent.com/evotools/nf-LO/main/environment.yml
singularity build nflo.sif singularity.def
Then, you can run the workflow as follows:
nextflow run evotools/nf-LO -profile test,singularity -with-singularity ${PWD}/nflo.sif
Manual installation¶
This is the case if the system doesn’t support docker, singularity or anaconda.
It is possible to download all the dependencies through the script install.sh.
The script will download all the dependencies in a local bin folder:
wget https://raw.githubusercontent.com/evotools/nf-LO/main/install.sh
chmod a+x ./install.sh
./install.sh
export PATH=$PATH:${PWD}/bin
This code will install all the dependencies in the bin folder, that will be automatically added to the path at run time.