MEME Motif分析的并行运算

MEME 安装

我的一些基本环境

  • CentOS 7.8
  • Bash 4.2.46
  • gcc 9.1.0

并行依赖 / MPICH安装

若需要并行计算的话,在安装MEME之前,需要先安装下面两个软件之一:

因为MPICH 有详细的文档,我们就安装它了!
这是下载页面:

https://www.mpich.org/downloads/

以3.2.1版本的为例:
下载解压

## 下载解压
wget https://www.mpich.org/static/downloads/3.2.1/mpich-3.2.1.tar.gz
tar xfz mpich-3.2.1.tar.gz

编译安装

cd  mpich-3.2.1
## 先创建软件安装地址,比如我放在~/softeware/mpich-3.2.1下
mkdir ~/softeware/mpich-3.2.1
## configure 是解压的mpich-3.2.1里的文件
## 配置软件,指定安装目录
./configure -prefix=$HOME/software/mpich-3.2.1
## 编译安装
make
make install

若运行./configure出现以下问题时:

configure: error: F90 and F90FLAGS are replaced by FC and FCFLAGS respectively in this configure, please unset F90/F90FLAGS and set FC/FCFLAGS instead and rerun configure again.

可以在命令输入(适用于bash)

unset F90
unset F90FLAGS

然后重新运行。

设置环境变量

安装成功后,打开~/.bashrc文件,在末尾添加:

export PATH=$HOME/software/mpich-3.2.1:$PATH
export OMPI_MCA_btl_base_warn_component_unused=0   ## 避免运行MEME时出现警告信息

保存,然后source ~/.bashrc

运行

mpicc -v

返回mpicc版本信息,则暂时安装成功了。

MEME-suite安装

建议参考官网按照你的需求进行安装

https://meme-suite.org/meme/doc/install.html?man_type=web#quick

懒得跳转看的,这里粘贴下官网的说明(for Linux, OS X and Cygwin systems):
去这里下载最新meme suite:

https://meme-suite.org/meme/meme-software/
## 下载软件,当前最新是5.3.3
wget https://meme-suite.org/meme/meme-software/5.3.3/meme-5.3.3.tar.gz
## 解压
tar zxf meme-5.3.3.tar.gz
cd meme-5.3.3

一定先安装mpich,因为./configure 这一步,会去寻找mpich可执行文件地址(上一步设置mpich环境变量,这里可以不用添加多余参数,如果没有需要指定--with-mpidir=MPI directory)

编译测试安装
./configure --prefix=$HOME/meme --enable-build-libxml2 --enable-build-libxslt
make
make test
make install

并行计算

MEME-suite 里的有些功能支持并行计算,不过大多都不支持。具体可以看命令的参数里是否提供了设置多进程计算的参数选项。
这里举meme-chip作为一个例子

meme-chip -meme-p 20 -oc example_out -db motif_databases/MOUSE/HOCOMOCOv11_full_MOUSE_mono_meme_format.meme  test.fa

-meme-p就是设置多进程数, -db 后的参数是meme motif数据库文件,可以去这里下载想要的数据库

https://meme-suite.org/meme/doc/download.html

其他

conda 安装

安装命令:

$ conda install -c bioconda meme

但是可能在一个现有的conda环境中并不能安装成功,因为现有的一些包可能和meme的依赖包不兼容。可能会提示:

...
Found conflicts! Looking for incompatible packages.
...

这时,可以考虑新建一个虚拟环境,来安装

$ conda create -n meme
$ conda activate meme
$ conda install -c bioconda meme

当前,截至本文发表时(20210302),个人不太推荐用conda. 因为conda安装的meme有点坑。这是个人观点,仅在一台服务器上测试过。也许对于其他人可能结果不一样。并且很可能在之后anaconda里的meme更新后,再安装可能并没有我遇到的问题。

我当前需要使用的是meme 中的meme-chip 和 CentriMo两个功能。meme-chip封装了motif discovery和motif enrichment 两个功能。CentriMo 单用于motif enrichment. 但是当前conda 安装的meme,没法使用meme-chip和CentriMo 。并且meme-chip 中的motif discovery 功能还在使用官网已经废弃的DREME。

参考

https://meme-suite.org/meme/doc/install.html
https://www.mpich.org/documentation/guides/
https://randroll.wordpress.com/2019/07/23/mpich-configure-error-unset-f90-f90flags/

原文地址:https://www.cnblogs.com/huanping/p/14473084.html