MacOS software installation

From 22115
Revision as of 14:12, 19 March 2024 by WikiSysop (talk | contribs) (Created page with "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, and specify .rc file == Depending on what version of MacOS you are using, [https://support.apple.com/en-us/HT208050 your shell is probably either bash or zsh]. This plays a role when you want to set [https://en.wikipedia.org/wiki/E...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

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, and specify .rc file

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

If you are using zsh:

export MYRCFILE=~/.zshrc

If you are using bash:

export MYRCFILE=~/.bashrc

This will store the name of your .rc file in the environment variable $MYRCFILE, which will be used in some commands below. (The environment variable is not stored, so it will only be active in the current terminal session).

Install required software

# Homebrew
xcode-select --install
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
# 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
brew install mrbayes
# PAUP
wget http://phylosolutions.com/paup-test/paup4a168_osx.gz
gunzip paup4a168_osx.gz
chmod 755 paup4a168_osx
sudo mv paup4a168_osx /usr/local/bin/paup
# PAML
brew install brewsci/bio/paml
# 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 &'" >> $MYRCFILE
# FigTree
brew install brewsci/bio/figtree
# 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'" >> $MYRCFILE
# 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.28-app.zip
unzip AliView-1.28-app.zip
sudo mv AliView-1.28/AliView.app /Applications
rm -r AliView-1.28
echo 'aliview() { java -jar /Applications/AliView.app/Contents/Resources/Java/repo/AliView/AliView/1.28/AliView-1.28.jar "$1" &> /dev/null & }' >> $MYRCFILE
# seqconverter, sequencelib, phylotreelib
# These are scripts and libraries written by me: 
# GitHub phylotreelib GitHub sequencelib GitHub seqconverter
# These instructions assume you already have a working installation of python3
python3 -m pip install seqconverter
python3 -m pip install phylotreelib
# maxalign tool
# See MaxAlign: maximizing usable data in an alignment for more information.
wget http://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 http://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 $MYRCFILE
BEAST2
Download newest version of BEAST2 from BEAST2 web site and follow instructions to install.
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")