Skip to content

Instantly share code, notes, and snippets.

@fo40225
Last active May 25, 2022 12:14
Show Gist options
  • Save fo40225/0d6d52d56cc730b878747144ba01b33b to your computer and use it in GitHub Desktop.
Save fo40225/0d6d52d56cc730b878747144ba01b33b to your computer and use it in GitHub Desktop.
run CNVnator
# https://root.cern/install/dependencies/
sudo apt install -y libxpm-dev libxft-dev libxext-dev python-dev
git clone https://github.com/root-project/root.git -b v6-18-04
mkdir root_build root_install && cd root_build
cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=../root_install ../root
cmake --build . --config Release -v -- install -j$(nproc)
source ../root_install/bin/thisroot.sh
wget https://bitbucket.org/MDukhan/yeppp/downloads/yeppp-1.0.0.tar.bz2
tar axvf yeppp-1.0.0.tar.bz2
git clone https://github.com/abyzovlab/CNVnator.git -b v0.4.1
cd CNVnator
ln -s /path/samtools-1.9-src samtools
sudo apt install libreadline-dev
# wget https://ftp.gnu.org/gnu/readline/readline-5.2.tar.gz
# tar axvf readline-5.2.tar.gz
# cd readline-5.2/
# ./configure --with-curses
## vim shlib/Makefile SHLIB_LIBS = -lcurses
# make -j $(nproc)
# sudo make install
# sudo ldconfig
# edit Makefile, match samtools deps. (remove -lcurl -lcrypto)
# remove -D_GLIBCXX_USE_CXX11_ABI=0
make HTSDIR=/path/htslib-1.9 YEPPPLIBDIR=/path/yeppp-1.0.0/binaries/linux/x86_64 YEPPPINCLUDEDIR=/path/yeppp-1.0.0/library/headers -j $(nproc)
export LD_LIBRARY_PATH=/path/yeppp-1.0.0/binaries/linux/x86_64:$LD_LIBRARY_PATH
cnvnator -root sample.root -tree sample.sorted.dedup.recal.bam
cnvnator -root sample.root -his 1000 -d /path/FastaByChr
cnvnator -root sample.root -stat 1000
export OMP_NUM_THREADS=$(nproc)
cnvnator -root sample.root -partition 1000
unset OMP_NUM_THREADS
cnvnator -root sample.root -call 1000 > sample.txt
cnvnator2VCF.pl -prefix sample -reference hg38 sample.txt /path/FastaByChr > sample.vcf
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment