Skip to content

Commit

Permalink
add vcfwave installation as option to BIN-INSTALL instructions
Browse files Browse the repository at this point in the history
  • Loading branch information
glennhickey committed Nov 18, 2024
1 parent 80a603e commit 463fa3c
Show file tree
Hide file tree
Showing 3 changed files with 46 additions and 12 deletions.
7 changes: 6 additions & 1 deletion BIN-INSTALL.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ cd cactus-bin-v2.9.2
To build a python virtualenv and activate, do the following steps. This requires Python version >= 3.7 (so Ubuntu 18.04 users should use `-p python3.8` below):
```
virtualenv -p python3 venv-cactus-v2.9.2
printf "export PATH=$(pwd)/bin:\$PATH\nexport PYTHONPATH=$(pwd)/lib:\$PYTHONPATH\n" >> venv-cactus-v2.9.2/bin/activate
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.2/bin/activate
source venv-cactus-v2.9.2/bin/activate
python3 -m pip install -U setuptools pip wheel
python3 -m pip install -U .
Expand All @@ -31,6 +31,11 @@ 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.
Expand Down
15 changes: 4 additions & 11 deletions build-tools/downloadPangenomeTools
Original file line number Diff line number Diff line change
Expand Up @@ -360,19 +360,13 @@ else
fi

# vcfwave
cd ${pangenomeBuildDir}
cd ${CWD}
# todo: it's be nice to figure out a static build. for now we skip entirely if static enabled.
if [[ $STATIC_CHECK -ne 1 ]]
then
git clone --recursive https://github.com/vcflib/vcflib.git
cd vcflib
git checkout 404b98a6a0601a8668fb039eae5196fa1ae12525
mkdir build
cd build
cmake -DZIG=OFF -DWFA_GITMODULE=ON -DCMAKE_BUILD_TYPE=Debug ..
cmake --build . -- -j ${numcpu}
mv vcfwave vcfcreatemulti vcfbreakmulti vcfuniq ${binDir}
mv ./contrib/WFA2-lib/libwfa2.so.0 ${libDir}
build-tools/downloadVCFWave
cd ${CWD}
mkdir -p ${pangenomeBuildDir}
fi

# last
Expand Down Expand Up @@ -410,7 +404,6 @@ fi
cd ${CWD}
rm -rf ${pangenomeBuildDir}


set +x
echo ""
echo "--------------------------------------------------"
Expand Down
36 changes: 36 additions & 0 deletions build-tools/downloadVCFWave
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
#!/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}

cd ${pangenomeBuildDir}
git clone --recursive https://github.com/vcflib/vcflib.git
cd vcflib
git checkout 404b98a6a0601a8668fb039eae5196fa1ae12525
mkdir build
cd build
cmake -DZIG=OFF -DWFA_GITMODULE=ON -DCMAKE_BUILD_TYPE=Debug ..
cmake --build . -- -j ${numcpu}
mv vcfwave vcfcreatemulti vcfbreakmulti vcfuniq ${binDir}
mv ./contrib/WFA2-lib/libwfa2.so.0 ${libDir}

cd ${CWD}
rm -rf ${pangenomeBuildDir}

0 comments on commit 463fa3c

Please sign in to comment.