Approaching Archaeogenetics

DNA Map Populations Tutorials



Getting Started with ADMIXTOOLS

A Guide to Downloading ADMIXTOOLS and Preparing to Use It (Part 1 of a Larger ADMIXTOOLS Tutorial)

As stated in this article, ADMIXTOOLS is a collection of programs that use direct genetic data (SNPs) to infer genetic relationships between populations. There are two versions of ADMIXTOOLS, the original, developed by David Reich and Nick Patterson for Linux and Mac, and ADMIXTOOLS 2, an improved, faster version developed by Robert Maier, Pavel Flegontov, Ulas Isildak, David Reich, and Nick Patterson for Linux, Mac and Windows. Please note that ADMIXTOOLS tutorials on this site will be specific to ADMIXTOOLS 2, as it is more accessible. Please see this site for comparisons of results between the two softwares.

Downloading ADMIXTOOLS
Linux (Linux/Ubuntu):

For Fedora users, use Fedora-specific commands.

1. Downloading base R

In your terminal, run the following commands in the order that they are listed:

sudo bash

sudo apt-get install r-base

2. Downloading Rstudio

Rstudio is a user-friendly R interface that requires R to function.

Go to the Rstudio download page and download the Rstudio build specific to your OS.

3. Downloading ADMIXTOOLS in Rstudio

In Rstudio, run the following commands:

install.packages("remotes")

remotes::install_github ("uqrmaie1/admixtools")

library("admixtools")

Pay close attention to the error messages that come up during installation and rectify all errors.

If you encounter problems during installation, try installing these packages manually:

install.packages("Rcpp")

install.packages("tidyverse")

install.packages("igraph")

install.packages("plotly")

4. (Optional) Downloading the interactive ADMIXTOOLS app

The interactive app has a spiffy user interface that contains features such as the ability explore multiple models at once. More info here!

In Rstudio, run the following commands:

remotes::install_github ("uqrmaie1/admixtools", dependencies = TRUE)

Windows:

1. Downloading base R

Go to the R Windows download page and download the program.

2. Downloading Rstudio

Rstudio is a user-friendly R interface that requires R to function.

Go to the Rstudio download page and download the Rstudio Windows build.

3. Downloading Rtools

Rtools makes R significantly easier to use on Windows.

Go to the Rtools download page and download the newest Rtools build.

4. Downloading ADMIXTOOLS in Rstudio

In Rstudio, run the following commands:

install.packages("remotes")

remotes::install_github ("uqrmaie1/admixtools")

library("admixtools")

Pay close attention to the error messages that come up during installation and rectify all errors.

If you encounter problems during installation, try installing these packages manually:

install.packages("Rcpp")

install.packages("tidyverse")

install.packages("igraph")

install.packages("plotly")

5. (Optional) Downloading the interactive ADMIXTOOLS app

The interactive app has a spiffy user interface that contains features such as the ability explore multiple models at once. More info here!

In Rstudio, run the following commands:

remotes::install_github ("uqrmaie1/admixtools", dependencies = TRUE)

Mac:

1. Downloading base R

Go to the R MacOS download page and download the program.

2. Downloading Rstudio

Rstudio is a user-friendly R interface that requires R to function.

Go to the Rstudio download page and download the Rstudio Windows build.

3. Downloading XCode Command Line Tools

XCode Command Line Tools makes R significantly easier to use on MacOS.

See this tutorial and follow the instructions.

4. Downloading ADMIXTOOLS in Rstudio

In Rstudio, run the following commands:

install.packages("remotes")

remotes::install_github ("uqrmaie1/admixtools")

library("admixtools")

Pay close attention to the error messages that come up during installation and rectify all errors.

If you encounter problems during installation, try installing these packages manually:

install.packages("Rcpp")

install.packages("tidyverse")

install.packages("igraph")

install.packages("plotly")

5. (Optional) Downloading the interactive ADMIXTOOLS app

The interactive app has a spiffy user interface that contains features such as the ability explore multiple models at once. More info here!

In Rstudio, run the following commands:

remotes::install_github ("uqrmaie1/admixtools", dependencies = TRUE)

Preparing ADMIXTOOLS for use

1. Set up a folder for your datasets that ADMIXTOOLS will reference. Put all your datasets in this folder. ADMIXTOOLS needs to reference a specific dataset in this folder in order for it to work.

2. Set up an f2 directory- this is a folder that geenrated f-statistics blocks will go in. ADMIXTOOLS needs to reference these f-statistic blocks in order for it to work.

3. Run the following commands in Rstudio every time it is opened for the use of ADMIXTOOLS:

prefix = "full directory to specific dataset(WITHOUT file suffix, as three files in the dataset are referenced)"

my_f2_dir = "full directory to f2 directory folder"

library(admixtools)

library(tidyverse)

ADMIXTOOLS is now ready to be used! Note that the aforementioned commands listed in step 3 must be run every time that R is opened for the use of ADMIXTOOLS.

Sources

Github - ADMIXTOOLS 2

Github- ADMIXTOOLS 2 Tutorial

Programs Mentioned

Base R (Windows)

Base R (Linux)(NOTE: the program must be downloaded through the terminal, it cannot be installed through CRAN. The program is only listed here for informational purposes.)

Base R (Windows)

Base R (Windows)

Base R (Mac)

Base R (Mac)

Rstudio

Rtools (for Windows users only)

Tutorial for downloading XCode Command Line Tools (for MacOS users only)

ADMIXTOOLS 2 (NOTE: the program must be downloaded through Rstudio, it cannot be installed through GitHub. The program is only listed here for informational purposes.)