MacOS software installation: Difference between revisions
No edit summary |
No edit summary |
||
| Line 32: | Line 32: | ||
# MrBayes (built from source, linked to the BEAGLE library, with MPI for multi-core runs) | # MrBayes (built from source, linked to the BEAGLE library, with MPI for multi-core runs) | ||
# (If you previously ran "brew install mrbayes", remove it first so it does not shadow | # (If you previously ran "brew install mrbayes", remove it first so it does not shadow | ||
# | # this build: brew uninstall mrbayes ) | ||
brew install cmake open-mpi git | brew install cmake open-mpi git | ||
BEAGLE_TAG=$(git ls-remote --tags --refs https://github.com/beagle-dev/beagle-lib.git 'v*' | sed 's|.*/||' | sort -V | tail -n1) | BEAGLE_TAG=$(git ls-remote --tags --refs https://github.com/beagle-dev/beagle-lib.git 'v*' | sed 's|.*/||' | sort -V | tail -n1) | ||
git clone --depth=1 --branch "$BEAGLE_TAG" https://github.com/beagle-dev/beagle-lib.git ~/beagle-lib | git clone --depth=1 --branch "$BEAGLE_TAG" https://github.com/beagle-dev/beagle-lib.git ~/beagle-lib | ||
| Line 54: | Line 42: | ||
sudo cmake --install build | sudo cmake --install build | ||
cd ~ | cd ~ | ||
git clone --depth=1 https://github.com/NBISweden/MrBayes.git ~/MrBayes | git clone --depth=1 https://github.com/NBISweden/MrBayes.git ~/MrBayes | ||
cd ~/MrBayes | cd ~/MrBayes | ||
| Line 85: | Line 71: | ||
# BEASTX | # BEASTX | ||
brew install beagle | brew install beagle | ||
brew install beast | brew install beast | ||
Latest revision as of 11:51, 7 July 2026
These are instructions for how to install software and data used on the course Computational Molecular Evolution (22115) when using the MacOS operating system.
Check which shell you are using
Depending on what version of MacOS you are using, your shell is probably either bash or zsh. This plays a role when you want to set environment variables (including, importantly, PATH which tells your computer where to look for executables), define aliases, etc: If you are using bash then that information should be stored in the file .bashrc, in the case of zsh, the file should be .zshrc
Issue the following command to see which one it is:
echo $SHELL
In the commands below I have assumed that you are using ZSH, and we will store information in .zshrc. If you are instead using BASH, then you should instead use .bashrc.
Install required software
# Makes sure /usr/local/bin exists (won't overwrite it if it does) sudo mkdir -p /usr/local/bin
# Homebrew: A package manager that can be used to more easily install other software xcode-select --install /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
Note: for the one-liner installation of home-brew above, you need to use /bin/bash when installing, even if your shell is zsh.
# wget: command-line tool for downloading files from the internet brew install wget
# Text editor
# This replaces nedit in exercise manuals.
# You need a text editor that can read and save plain-text files.
# Here we install TextMate, but there are many other options, including built-in TextEdit, and BBEdit
# To run from command line: Go to Textmate --> Preferences --> Terminal --> install shell support
brew install --cask textmate
# MrBayes (built from source, linked to the BEAGLE library, with MPI for multi-core runs) # (If you previously ran "brew install mrbayes", remove it first so it does not shadow # this build: brew uninstall mrbayes ) brew install cmake open-mpi git BEAGLE_TAG=$(git ls-remote --tags --refs https://github.com/beagle-dev/beagle-lib.git 'v*' | sed 's|.*/||' | sort -V | tail -n1) git clone --depth=1 --branch "$BEAGLE_TAG" https://github.com/beagle-dev/beagle-lib.git ~/beagle-lib cd ~/beagle-lib cmake -S . -B build -DBUILD_OPENCL=OFF -DBUILD_CUDA=OFF -DBUILD_JNI=OFF cmake --build build -j sudo cmake --install build cd ~ git clone --depth=1 https://github.com/NBISweden/MrBayes.git ~/MrBayes cd ~/MrBayes ./configure --with-mpi --with-beagle=/usr/local MPICC="$(brew --prefix)/bin/mpicc" make sudo make install cd ~
# PAUP wget https://phylosolutions.com/paup-test/paup4a168_osx.gz gunzip paup4a168_osx.gz chmod 755 paup4a168_osx sudo mv paup4a168_osx /usr/local/bin/paup
# IQ-TREE 3 brew install brewsci/bio/iqtree3
# PAML wget https://github.com/abacus-gene/paml/releases/download/v4.10.10/paml-4.10.10-mac-arm64.tar.gz tar -xvf paml-4.10.10-mac-arm64.tar.gz sudo cp paml-4.10.10-mac-arm64/bin/* /usr/local/bin rm -r paml-4.10.10-mac-arm64*
# jmodeltest wget https://github.com/ddarriba/jmodeltest2/files/157117/jmodeltest-2.1.10.tar.gz sudo tar -xvf jmodeltest-2.1.10.tar.gz --directory /Applications rm jmodeltest-2.1.10.tar.gz echo "alias jmodeltest='java -jar /Applications/jmodeltest-2.1.10/jModelTest.jar &> /dev/null &'" >> ~/.zshrc
# BEASTX brew install beagle brew install beast
# FigTree wget https://github.com/rambaut/figtree/releases/download/v1.4.4/FigTree.v1.4.4.dmg hdiutil mount FigTree.v1.4.4.dmg sudo cp -R "/Volumes/FigTree\ v1.4.4/FigTree\ v1.4.4.app" /Applications hdiutil unmount /Volumes/FigTree echo "alias figtree='open /Applications/FigTree\ v1.4.4.app'" >> ~/.zshrc
# Tracer wget https://github.com/beast-dev/tracer/releases/download/v1.7.2/Tracer.v1.7.2.dmg hdiutil mount Tracer.v1.7.2.dmg sudo cp -R "/Volumes/Tracer/Tracer v1.7.2.app" /Applications hdiutil unmount /Volumes/Tracer echo "alias tracer='open /Applications/Tracer\ v1.7.2.app'" >> ~/.zshrc
# TempEst wget --content-disposition 'https://tree.bio.ed.ac.uk/download.php?id=102&num=3' sudo tar -zxf TempEst_v1.5.3.tgz --directory /Applications sudo chmod 755 /Applications/TempEst_v1.5.3/bin/tempest echo "alias tempest='/Applications/TempEst_v1.5.3/bin/tempest'" >> ~/.zshrc rm TempEst_v1.5.3.tgz
# MAFFT brew install mafft
# Aliview # Note: This only works if java has access to files and folders on the mac wget https://ormbunkar.se/aliview/downloads/mac/AliView-1.30-app.zip unzip AliView-1.30-app.zip sudo mv AliView-1.30/AliView.app /Applications rm -r AliView-1.30 echo 'aliview() { java -jar /Applications/AliView.app/Contents/Resources/Java/repo/AliView/AliView/1.30/AliView-1.30.jar "$1" &> /dev/null & }' >> ~/.zshrc
# Anders Gorm software: seqconverter, phylotreelib, sumt # These are scripts and libraries written by me: # GitHub phylotreelib GitHub seqconverter GitHub sumt # These instructions assume you already have a working installation of python3 python3 -m ensurepip --upgrade python3 -m pip install seqconverter python3 -m pip install phylotreelib python3 -m pip install sumt
# maxalign tool # See MaxAlign: maximizing usable data in an alignment for more information. wget https://teaching.healthtech.dtu.dk/material/22115/maxalign.pl chmod 755 maxalign.pl sudo mv maxalign.pl /usr/local/bin
# Set up directory for course exercises # You can place this directory anywhere you prefer. # Just replace tilde (~) in command below with path to preferred base directory cd ~ mkdir molevol wget https://teaching.healthtech.dtu.dk/material/22115/data.tar.gz tar -xvf data.tar.gz --directory molevol rm data.tar.gz
# Activate changes to .rc file in current terminal session source ~/.zshrc
- R, RStudio
- Download newest version of R from CRAN and follow instructions to install. Note: Different versions for Intel and Apple Silicon macs
- Download newest version of RStudio from posit.co and follow instructions
# R packages (do this inside Rstudio)
install.packages("tidyverse")
install.packages("bayesplot")
install.packages("hexbin")