LoginSignup
1
1

More than 3 years have passed since last update.

MACS2 install to MacOS with Anaconda3 (AnacondaにPython3とPython2を共存させたよ。の回)

Last updated at Posted at 2019-10-01

1.はじめに

ちょっとこれをやってみたかっただけ。

ChIP-Seq データの解析方法 Bowtie2 + MACS2

2.環境

・MacOS Mojave 10.14.3
・Anaconda3インストール
・Python3がデフォルト
基本condaで環境構築中

3.つまずいた

とりあえずcondaでインストール
https://anaconda.org/bioconda/macs2

command
$ conda install -c bioconda macs2

エラー・・・・・
↓こんなんでてきた・・・・

command
UnsatisfiableError: The following specifications were found                                                                                                                                          
to be incompatible with the existing python installation in your environment:

Specifications:

  - macs2 -> python[version='2.7.*|>=2.7,<2.8.0a0|>=2.7,<3']

Your python: python=3.7

If python is on the left-most side of the chain, that's the version you've asked for.
When python appears to the right, that indicates that the thing on the left is somehow
not available for the python version you are constrained to. Note that conda will not
change your python version to a different minor version unless you explicitly specify
that.

The following specifications were found to be incompatible with each other:
(以下略)

なにやらpython2やないとあかんとかなんとか。。。
pip install macs2 でも同じようなエラーが出てきましたよ)

4.めんどくさいけどAnaconda3にPython2も使えるようにしてみた。

Python2は使うことないはず!!と勝手におもっていたが、避けられないようなのだ。

先人の知恵(参考URL):
Anacondaでpythonのバージョンを使い分ける

5.改めまして、install

参考URLと同じですが。。。

command
#仮想環境にpython2をインストール
$ conda create -n py27 python=2.7 anaconda

#python2に切り替える
$ source activate py27

さて、インストールできるかな?
成功!!

command
#お目当のパッケージをインストール
$ conda install -c bioconda macs2

Python2の仮想環境を抜ける。(こちらは参考URLのsource deactivateではエラーになりましたが、下記コマンドで成功しました。)

$ conda deactivate

おわり

以上です!

解析が成功したかどうかはまた別のお話。。。
conda install -c anaconda numpyが必要。とのことで、インストールしたが、エラー・・・。
uninstallして、再度conda install -c anaconda numpy==1.16.3で動いた!
(なぜかMACS2もuninstallされたので、再度install)

参考URL:https://www.reddit.com/r/bioinformatics/comments/bhlbx0/macs2_callpeak_error/

1
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
1