m1 Mac でRAxML-NG & MrBayes

macOS のSilicon CPU もすなる多遺伝子解析といふものを、Enter the Fungi もしてみんとて、環境構築するなり

Homebrew のインストール

/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"

RAxML-NG のインストール

brew install raxml-ng 

メモ 自分がやったときは以下のエラーが出たので対応した

Error: The following directories are not writable by your user: /usr/local/share/man/man8 

You should change the ownership of these directories to your user. sudo chown -R [user name] /usr/local/share/man/man8 And make sure that your user has write permission. chmod u+w /usr/local/share/man/man8 

sudo chown -R [user name] /usr/local/share/man/man8

chmod u+w /usr/[user name]/share/man/man8

brew install raxml-ng


https://github.com/ddarriba/modeltest/releases

macOS とlinux はバイナリファイルを入手可能

windows はwsl2 で実行すると良い?


./modeltest-ng-osx -d nt -i SSU+ITS+LSU+RPB2+mtSSU.phy -o SSU+ITS+LSU+RPB2+mtSSU -q whole_AICc4_partitioned_codonpartitioned.partition -T raxml


-d nt: 核酸配列を指定

-i SSU+ITS+LSU+RPB2+mtSSU.phy: fasta やphylip ファイルを指定

-o models: アウトプットファイル名

-q:whole_AICc4_partitioned_codonpartitioned.partition パーティーションファイル、Kakusan4 で作ったモノを流用している

-T raxml: raxml-ng で使うテンプレートで出力


  解析が終わると「SSU+ITS+LSU+RPB2+mtSSU.part.aicc」が出力されるのでこれを使う。

--msa SSU+ITS+LSU+RPB2+mtSSU.phy: fasta やphylip ファイルを指定

--model SSU+ITS+LSU+RPB2+mtSSU: modeltest-ng で出力されたファイルを使用

--all: Combined search (樹形探索) & bootstrapping (ブートストラップ) を同時にするらしい、詳しくはわからない

--bs-trees 1000: rapidbootstrap を1000回施行、best ML tree にbootstrap value を書き込むので便利

[00:17:51] [worker #2] Bootstrap tree #851, logLikelihood: -15106.037388

raxml-ng(25428,0x3099d5000) malloc: *** error for object 0x600001f37fe0: pointer being freed was not allocated

raxml-ng(25428,0x3099d5000) malloc: *** set a breakpoint in malloc_error_break to debug

MEGA11 のインストール

理由は分からないけどHomebrew 経由でコンパイルした方が動作が機敏

brew install cask       

brew install --cask mega

MrBayes のインストール

https://github.com/NBISweden/MrBayes/tree/v3.2.7

2. ZIP を解凍後にhome フォルダに移動し、terminal でフォルダを開く

フォルダ名がMrBayes-3.2.7 の場合

cd /Users/[user name]/MrBayes-3.2.7

3. 以下を順に入力

./configure --with-mpi

make

make install

4. MrBayes-3.2.7 内のSource フォルダにmb ファイルが作られるのでmacOS のアプリケーションフォルダにコピー

5. コンパイルに使ったMrBayes-3.2.7 は不要のため削除する

6. Terminal では「mb」と入力すると起動する。アプリケーションフォルダからも起動できる。