PopCOGenT安装及使用

从PopCOGenT github下载PopCOGenT.yml后使用conda安装软件运行需要环境

conda config --set restore_free_channel true
conda env create -f PopCOGenT.yml
conda activate PopCOGenT
##下载mugsy并解压
export MUGSY_INSTALL=/path/to/install/mugsy
python get_alignment_and_length_bias.py --genome_dir /home/wuchangsong/Streptococcus_agalactiae/test/ --genome_ext .fasta --alignment_dir ./output --mugsy_path /opt/biosoft/PopCOGenT/mugsy_x86-64-v1r2.3/mugsy --mugsy_env /opt/biosoft/PopCOGenT/mugsy_x86-64-v1r2.3/mugsyenv.sh --base_name test_12 --num_threads 150
##安装infomap
git clone https://github.com/mapequation/infomap.git
cd infomap
make
##gcc要求4.9以上,不然报错(g++: error: unrecognized command line option ‘-std=c++14’)
##安装gcc-11.2.0(root用户)
wget http://ftp.gnu.org/gnu/gcc/gcc-11.2.0/gcc-11.2.0.tar.gz
tar -zxvf gcc-11.2.0.tar.gz
cd gcc-11.2.0
./contrib/download_prerequisites
mkdir build
cd build/
../configure -enable-checking=release -enable-languages=c,c++ -disable-multilib
make -j 160
make install
##重新打开终端gcc -v
##安装gcc-11.2.0后infomap make成功,然而./Infomap报错
##./Infomap: /lib64/libstdc++.so.6: version `GLIBCXX_3.4.20' not found (required by ./Infomap)
##./Infomap: /lib64/libstdc++.so.6: version `CXXABI_1.3.9' not found (required by ./Infomap)
##./Infomap: /lib64/libstdc++.so.6: version `GLIBCXX_3.4.29' not found (required by ./Infomap)
strings /usr/lib64/libstdc++.so.6 | grep GLIBCXX_##发现确实少了库文件
cp /usr/local/lib64/libstdc++.so.6.0.29 /usr/lib64/
cd /usr/lib64/ && rm libstdc++.so.6
ln -s libstdc++.so.6.0.29 ./libstdc++.so.6
##进入infomap安装目录
./Infomap -h
##Infomap没有报错可以运行cluster.py,infomap安装最新版本运行时需要将cluster.py的第107行-i改为-c,因为v2.5.0输入参数为-c,作者推荐的v0.18.3输入参数为-i。infomap github已找不到v0.18.3,如果不想麻烦下载最新版本的infomap,可以进入PopCOGenT的安装目录,在Infomap目录下make即可,这是作者提供的v0.18.3。
python cluster.py --base_name test_12 --length_bias_file test_12.length_bias.txt --output_directory output --infomap_path /opt/biosoft/PopCOGenT-master/Infomap/Infomap --single_cell


Posted

in

, ,

by

Tags:

Comments

Leave a Reply

Your email address will not be published. Required fields are marked *