BIN-INSTALL.md
# Installation of the Cactus binary distribution
This describes the steps require to install the Cactus
pre-compile binary, static linked distribution.
## Extracting
If you have not already extract the distribution and cd into the cactus directory:
```
tar -xzf cactus-bin-v2.9.9.tar.gz
cd cactus-bin-v2.9.9
```
## GPU Patch:
When using GPU support since v2.9.4, please make sure to pass in the patched config file with `--configFile` (download the patch from the [releases](https://github.com/ComparativeGenomicsToolkit/cactus/releases) page).
## Setup
To build a python virtualenv and activate, do the following steps. This requires Python version >= 3.9 (so Ubuntu 18.04 users should use `-p python3.9` below):
```
virtualenv -p python3 venv-cactus-v2.9.9
printf "export PATH=$(pwd)/bin:\$PATH\nexport PYTHONPATH=$(pwd)/lib:\$PYTHONPATH\nexport LD_LIBRARY_PATH=$(pwd)/lib:\$LD_LIBRARY_PATH\n" >> venv-cactus-v2.9.9/bin/activate
source venv-cactus-v2.9.9/bin/activate
python3 -m pip install -U setuptools pip wheel
python3 -m pip install -U .
python3 -m pip install -U -r ./toil-requirement.txt
```
Some tools required for `hal2assemblyHub.py`, `cactus-hal2chains` and `cactus-maf2bigmaf` are not included and must be downloaded separately.
They are `wigToBigWig faToTwoBit bedToBigBed bigBedToBed axtChain pslPosTarget bedSort hgGcPercent mafToBigMaf hgLoadMafSummary hgLoadChain`. More information
can be found [here](https://hgdownload.cse.ucsc.edu/admin/exe/). Note that some may require
a license for commercial use. Static binaries are not available, but the following command
should set them up successfully on many 64 bit Linux systems:
```
cd bin && for i in wigToBigWig faToTwoBit bedToBigBed bigBedToBed axtChain pslPosTarget bedSort hgGcPercent mafToBigMaf hgLoadMafSummary hgLoadChain; do wget -q http://hgdownload.cse.ucsc.edu/admin/exe/linux.x86_64/${i}; chmod +x ${i}; done
```
`vcfwave` isn't included in the release binaries (but is in the docker image). You can can try building it and adding it to `bin/` with the following command
```
build-tools/downloadVCFWave
```
## Testing
To test Cactus, the following will run a tiny sumulated alignment.
```
cactus ./jobstore ./examples/evolverMammals.txt ./evolverMammals.hal
``
python环境:/share/work/biosoft/python/Python-v3.9.16-cactus
vcflib 安装:
#!/bin/bash
# Download vcfwave. You can run this when installing the release binaries because vcfwave
# isn't included in the release (because no static build)
set -beEu -o pipefail
# Note: this bit below should be kept consistent with downloadPangenomeTools
pangenomeBuildDir=$(realpath -m build-pangenome-tools)
binDir=$(pwd)/bin
libDir=$(pwd)/lib
# just use cactusRootPath for now
dataDir=$(pwd)/src/cactus
CWD=$(pwd)
# works on MacOS and Linux
if [ -z ${numcpu+x} ]; then
numcpu=$(getconf _NPROCESSORS_ONLN)
fi
set -x
rm -rf ${pangenomeBuildDir}
mkdir -p ${pangenomeBuildDir}
mkdir -p ${binDir}
mkdir -p ${libDir}
cd ${pangenomeBuildDir}
git clone --recursive https://github.com/vcflib/vcflib.git
cd vcflib
git checkout 5bae713c06aae9f4d8f40447684c6e10352a9f41
mkdir build
cd build
#cmake -DZIG=OFF -DWFA_GITMODULE=ON -DCMAKE_BUILD_TYPE=Debug ..
export CC=/share/work/biosoft/gcc/latest/bin/gcc
export CXX=/share/work/biosoft/gcc/latest/bin/g++
cmake -DZIG=OFF -DWFA_GITMODULE=ON -DCMAKE_BUILD_TYPE=Debug -DCMAKE_C_FLAGS="-pthread" -DCMAKE_CXX_FLAGS="-pthread" \
-DCMAKE_EXE_LINKER_FLAGS="-lpthread" -DCMAKE_C_STANDARD=99 -DCMAKE_CXX_STANDARD=17 \
-DCMAKE_CXX_COMPILER=$CXX \
-DCMAKE_C_COMPILER=$CC \
-DCMAKE_VERBOSE_MAKEFILE=ON -Dpybind11_DIR=/share/work/biosoft/cactus/cactus-bin-v2.9.9/venv-cactus-v2.9.9/lib/python3.9/site-packages/pybind11/share/cmake/pybind11/ ..
cmake --build . -- -j ${numcpu}
mv vcfwave vcfcreatemulti vcfbreakmulti vcfuniq vcffixup ${binDir}
mv ./contrib/WFA2-lib/libwfa2.so.0 ${libDir}
cd ${CWD}
rm -rf ${pangenomeBuildDir}
如果觉得我的文章对您有用,请随意打赏。你的支持将鼓励我继续创作!