Tutorials
Genomics
How to install R and Rstudio under Ubuntu Linux version 20.04
Don't have Linux? No problem! You can run it as a virtual machine within your Windows PC or Mac.
See the show notes on this video for links, including for setting up a virtual Ubuntu Linux PC within your existing Windows or Mac computer.
How to convert between a PHYLIP file and FASTA file, and how to convert from a FASTA file to a Nexus file
This tutorial utilizes:
RStudio: https://rstudio.com/
(Rstudio also requires R: https://www.r-project.org/)
Mesquite: http://mesquiteproject.org
Note that there are actually two different types of PHYLIP files: interleaved and sequential. This tutorial assumes you are using sequential PHYLIP files.
Don't have Linux? No problem! You can run it as a virtual machine within your Windows PC or Mac.
See the show notes on this video for links, including for setting up a virtual Ubuntu Linux PC within your existing Windows or Mac computer.
How to make an Arlequin file from a FASTA file
This tutorial utilizes:
RStudio: https://rstudio.com/
(Rstudio also requires R: https://www.r-project.org/)
Don't have Linux? No problem! You can run it as a virtual machine within your Windows PC or Mac.
See the show notes on this video for links, including for setting up a virtual Ubuntu Linux PC within your existing Windows or Mac computer.
How to perform an alignment for mitochondrial or plastid DNA sequences
This tutorial utilizes:
RStudio: https://rstudio.com/
(Rstudio also requires R: https://www.r-project.org/)
Mesquite: http://mesquiteproject.org
Don't have Linux? No problem! You can run it as a virtual machine within your Windows PC or Mac.
See the show notes on this video for links, including for setting up a virtual Ubuntu Linux PC within your existing Windows or Mac computer.
How to do an Analysis of Molecular Variance (AMOVA) using Arlequin
This tutorial utilizes:
Wine: https://www.winehq.org/
The Windows graphical user interface (GUI) version of Arlequin:
Don't have Linux? No problem! You can run it as a virtual machine within your Windows PC or Mac.
See the show notes on this video for links, including for setting up a virtual Ubuntu Linux PC within your existing Windows or Mac computer.
How to get the pairwise FST information out of Arlequin into more convenient formats
This tutorial utilizes:
RStudio: https://rstudio.com/
(Rstudio also requires R: https://www.r-project.org/)
Don't have Linux? No problem! You can run it as a virtual machine within your Windows PC or Mac.
See the show notes on this video for links, including for setting up a virtual Ubuntu Linux PC within your existing Windows or Mac computer.
How to do a Spatial Analysis of Molecular Variance (SAMOVA)
This tutorial utilizes:
Wine: https://www.winehq.org/
SAMOVA version 1.0:
Don't have Linux? No problem! You can run it as a virtual machine within your Windows PC or Mac.
See the show notes on this video for links, including for setting up a virtual Ubuntu Linux PC within your existing Windows or Mac computer.
This tutorial was written by Ava Laszlo, a graduate student in the Banta lab, as part of an Evolutionary Genetics Laboratory course.
How to perform a mantel test comparing genetic distances to geographic distances using R
This tutorial utilizes:
RStudio: https://rstudio.com/
(Rstudio also requires R: https://www.r-project.org/)
Don't have Linux? No problem! You can run it as a virtual machine within your Windows PC or Mac.
See the show notes on this video for links, including for setting up a virtual Ubuntu Linux PC within your existing Windows or Mac computer.
How to make a STRUCTURE file from a FASTA file
This tutorial utilizes:
RStudio: https://rstudio.com/
(Rstudio also requires R: https://www.r-project.org/)
Don't have Linux? No problem! You can run it as a virtual machine within your Windows PC or Mac.
See the show notes on this video for links, including for setting up a virtual Ubuntu Linux PC within your existing Windows or Mac computer.
A brief overview of the program STRUCTURE for population genetic analysis
See the show notes on YouTube for the links referenced in the video
How to perform Bayesian clustering analysis using the program STRUCTURE
This tutorial assumes you have the program STRUCTURE installed. See the show notes for a tutorial to install STRUCTURE, or else use the virtual machine that I have pre-configured with STRUCTURE and other software (details which are in the show notes).
All other links mentioned in the tutorial can be found in the show notes.
Don't have Linux? No problem! You can run it as a virtual machine within your Windows PC or Mac.
See the show notes on this video for links, including for setting up a virtual Ubuntu Linux PC within your existing Windows or Mac computer.
How to decide which results from STRUCTURE to use
This tutorial utilizes:
RStudio: https://rstudio.com/
(Rstudio also requires R: https://www.r-project.org/)
All other links mentioned in the tutorial can be found in the show notes.
Don't have Linux? No problem! You can run it as a virtual machine within your Windows PC or Mac.
See the show notes on this video for links, including for setting up a virtual Ubuntu Linux PC within your existing Windows or Mac computer.
How to perform a QTL analysis using the qtl package in R and plot the results
There is a second part to this video, which can be found here: https://youtu.be/pr4ZeYw4hmI
This tutorial utilizes:
RStudio: https://rstudio.com/
(Rstudio also requires R: https://www.r-project.org/)
These programs are free of charge and can be installed on a Windows, Mac, or Linux (for instance, Ubuntu) machine.
This video assumes you have already installed the following R libraries: lme4, qtl, devtools, and qtlTools.
This video illustrates how to perform the analysis using a Mac, but it should work exactly the same on a Windows machine, as well as on a Linux machine (assuming you have properly installed the packages on your Linux machine).
How to perform a QTL power analysis using R
There is a second part to this video, which can be found here: https://youtu.be/vRgDnjXBnnc
This tutorial utilizes:
RStudio: https://rstudio.com/
(Rstudio also requires R: https://www.r-project.org/)
These programs are free of charge and can be installed on a Windows, Mac, or Linux (for instance, Ubuntu) machine.
This video assumes you have already installed the following R libraries: lme4, qtl, devtools, and qtlDesign.
This video illustrates how to perform the analysis using a Mac, but it should work exactly the same on a Windows machine, as well as on a Linux machine (assuming you have properly installed the packages on your Linux machine).
How to most easily visualize the results from STRUCTURE and make a publication-ready figure
This tutorial assumes you have Inkscape installed on your machine. Click here for the link.
There is an older version of this tutorial that was made on a Windows machine using Microsoft Office. You can access that tutorial by clicking on this link.
Microsoft makes an online version of their office suite available for free that looks and works just like the paid version. You access it from a web browser, so it works on any computing platform, including Linux. Click here for the link to use it. The point is, if you prefer Microsoft Office, you can use it to accomplish this task.
This tutorial was written by Alyssa Blanton, an undergraduate research assistant in the Banta lab.
Assuming 150bp per RAD-seq fragment -- check with SNPSaurus first!
This tutorial was written by Katherine Barthel, a graduate student, as part of an Evolutionary Genetics Laboratory course.
This tutorial was written by Alyssa Blanton, an undergraduate research assistant in the Banta lab.
This tutorial was written by Alyssa Blanton, an undergraduate research assistant in the Banta lab.
This tutorial was written by Alyssa Blanton, an undergraduate research assistant in the Banta lab.
This tutorial was written by Alyssa Blanton, an undergraduate research assistant in the Banta lab.
This tutorial was written by Nevada King, a graduate student, as part of an Evolutionary Genetics Laboratory course.
This tutorial was written by Sarah Senula, an graduate student, as part of an Evolutionary Genetics Laboratory course.
How to test for the correct nucleotide substitution model using jmodeltest2
This tutorial utilizes:
Open JDK: https://openjdk.java.net/
jModeltest2: https://github.com/ddarriba/jmodeltest2
All other links mentioned in the tutorial can be found in the show notes.
Don't have Linux? No problem! You can run it as a virtual machine within your Windows PC or Mac.
See the show notes on this video for links, including for setting up a virtual Ubuntu Linux PC within your existing Windows or Mac computer.
How to install the population genetic software PartitionFinder under Ubuntu Linux version 20.04
Don't have Linux? No problem! You can run it as a virtual machine within your Windows PC or Mac.
See the show notes on this video for links, including for setting up a virtual Ubuntu Linux PC within your existing Windows or Mac computer.
How to install the population genetic software jModelTest2 under Ubuntu Linux version 20.04.
Don't have Linux? No problem! You can run it as a virtual machine within your Windows PC or Mac.
See the show notes on this video for links, including for setting up a virtual Ubuntu Linux PC within your existing Windows or Mac computer.
How to convert an output file from MrBayes, which is in Nexus format, into the Newick tree file format for making phylogenies.
This is tricky, because programs such as FigTree won't export the node support data (the posterior probabilities). This is the only tutorial I am aware of that shows you how to do it right, so that you don't lose the crucial node support data when you do the conversion.
Don't have Linux? No problem! You can run it as a virtual machine within your Windows PC or Mac.
See the show notes on this video for links, including for setting up a virtual Ubuntu Linux PC within your existing Windows or Mac computer.
How to perform a Bayesian Markov Chain Monte Carlo (MCMC)-based phylogenetic analysis using the software MrBayes.
This tutorial assumes you have the following programs installed:
Mr. Bayes: http://nbisweden.github.io/MrBayes/
For the links referenced in the video, see the show notes.
Don't have Linux? No problem! You can run it as a virtual machine within your Windows PC or Mac.
See the show notes on this video for links, including for setting up a virtual Ubuntu Linux PC within your existing Windows or Mac computer.
How to perform phylogenetically independent contrasts
This tutorial utilizes:
RStudio: https://rstudio.com/
(Rstudio also requires R: https://www.r-project.org/)
Don't have Linux? No problem! You can run it as a virtual machine within your Windows PC or Mac.
See the show notes on this video for links, including for setting up a virtual Ubuntu Linux PC within your existing Windows or Mac computer.
How to install the R package 'phytools' under Ubuntu Linux version 20.04.
Links you need to have open during this tutorial:
This tutorial utilizes RStudio:
(Rstudio also requires R: https://www.r-project.org/)
Don't have Linux? No problem! You can run it as a virtual machine within your Windows PC or Mac.
See the show notes on this video for links, including for setting up a virtual Ubuntu Linux PC within your existing Windows or Mac computer.
How to install the R package 'pegas' under Ubuntu Linux version 20.04.
Links you need to have open during this tutorial:
Code you will be using is in the show notes.
This tutorial utilizes RStudio:
(Rstudio also requires R: https://www.r-project.org/)
Don't have Linux? No problem! You can run it as a virtual machine within your Windows PC or Mac.
See the show notes on this video for links, including for setting up a virtual Ubuntu Linux PC within your existing Windows or Mac computer.
How to make a publication-ready phylogeny figure using R and Inkscape (advanced)
This tutorial assumes you have Inkscape installed on your machine. Click here for the link.
Don't have Linux? No problem! You can run it as a virtual machine within your Windows PC or Mac.
See the show notes on this video for links, including for setting up a virtual Ubuntu Linux PC within your existing Windows or Mac computer.
How to install fastStructure on Ubuntu Linux 20.04
Don't have Linux? No problem! You can run it as a virtual machine within your Windows PC or Mac.
See the show notes on this video for links, including for setting up a virtual Ubuntu Linux PC within your existing Windows or Mac computer.
How to install and run STRUCTURE under Ubuntu Linux 20.04
Don't have Linux? No problem! You can run it as a virtual machine within your Windows PC or Mac.
See the show notes on this video for links, including for setting up a virtual Ubuntu Linux PC within your existing Windows machine. VirtualBox does not work on newer (M1 and M2) Macs.
How to install distruct on Ubuntu Linux 20.04
This is for installing the program distruct on Ubuntu Linux version 20.04. distruct is used to visualize the results from the population genetics programs STRUCTURE and fastStructure.
Links you need to have open during this tutorial:
Don't have Linux? No problem! You can run it as a virtual machine within your Windows PC or Mac.
See the show notes on this video for links, including for setting up a virtual Ubuntu Linux PC within your existing Windows or Mac computer.
How to hook up and use my pre-configured Ubuntu Linux virtual machine on your Windows computer
I have made a Linux virtual machine that is pre-configured with many population genetics and ecological niche modeling programs. The video below explains how to open up this virtual machine on your Windows computer, so that you can start using the pre-configured software without having to install it (and even without having to install Ubuntu Linux!)
Instructions:
The username for the virtual machine account is sample
The password for the virtual machine account is stanleysfamous.com75702
How to hook up and use my pre-configured Ubuntu Linux virtual machine on your Mac computer
I have made a Linux virtual machine that is pre-configured with many population genetics and ecological niche modeling programs. The video below explains how to open up this virtual machine on your Mac computer, so that you can start using the pre-configured software without having to install it (and even without having to install Ubuntu Linux!)
Instructions:
The username for the virtual machine account is sample
The password for the virtual machine account is stanleysfamous.com75702
Geographic Information Systems (GIS)
Tutorials using ArcGIS
ArcGIS must be purchased from ESRI
How to perform logistic regression with correction for spatial autocorrelation
Uses both ArcGIS and R
How to export a points layer from ArcGIS as a shapefile so that you can send it to someone else
Tutorials using R
How to get the highest resolution hydrology data for your area of interest within the US and to create GIS layers from it
This tutorial utilizes:
RStudio: https://rstudio.com/
(Rstudio also requires R: https://www.r-project.org/)
Don't have Linux? No problem! You can run it as a virtual machine within your Windows PC. Or you can run Rstudio directly on your Windows or Mac without running Linux.
See the show notes on this video for links, including for setting up a virtual Ubuntu Linux PC within your existing Windows computer.
How to extract raster values (from Maxent or elsewhere) at point locations using R
This tutorial utilizes:
RStudio: https://rstudio.com/
(Rstudio also requires R: https://www.r-project.org/)
This tutorial also assumes you already have the R package 'raster' and all of its dependencies installed.
If you encounter difficulties installing the 'raster' package, follow my tutorials for installing the 'ENMEval' package, as this will also install the 'raster' package along the way (link here).
Don't have Linux? You can run it as a virtual machine within your Windows PC or Mac.
See the show notes on this video for links, including for setting up a virtual Ubuntu Linux PC within your existing Windows computer.
Running Ubuntu Linux on a new Mac computer with an M1 chip will require Parallels (https://parallels.com)
Projections, transformations, and GPS data import
This tutorial assumes you have already installed GRASS GIS. Instructions can be found here:
Don't have Linux? No problem! You can run it as a virtual machine within your Windows PC or Mac.
See the show notes on this video for links, including for setting up a virtual Ubuntu Linux PC within your existing Windows or Mac computer.
Rasters and raster manipulation
This tutorial assumes you have already installed GRASS GIS. Instructions can be found here:
Don't have Linux? No problem! You can run it as a virtual machine within your Windows PC or Mac.
See the show notes on this video for links, including for setting up a virtual Ubuntu Linux PC within your existing Windows or Mac computer.
Buffering and clipping vectors
This tutorial assumes you have already installed GRASS GIS. Instructions can be found here:
Don't have Linux? No problem! You can run it as a virtual machine within your Windows PC or Mac.
See the show notes on this video for links, including for setting up a virtual Ubuntu Linux PC within your existing Windows or Mac computer.
Making rasters from vectors
Tutorials for doing cartography using QGIS
Cartography refers to the making of publication-ready maps based upon GIS layers.
QGIS is another open-source GIS software solution. It uses GRASS GIS "under the hood" to perform some of its routines, so GRASS GIS is still the most powerful open-source option. But QGIS is much better for cartography, which is why you'll want to know how to use it.
The files for this tutorial are the same as for part one (see above).
The purpose is to translate the knowledge from the previous lab (and prior ones) using your own data.
Species Distribution Modeling
This tutorial uses R-Studio. You can download it here.
This tutorial was written by Danielle Joerger, a graduate student in my Landscape Ecology lab in the spring of 2019.
How to install the R Package 'ENMEval' (and 'xml2,' 'tidyverse,' 'rJava') under Ubuntu Linux 20.04
This tutorial also installs the R package 'ENMEval,' as well as the dependency R packages 'xml2,' 'tidyverse,' and 'rJava,' under Ubuntu Linux version 20.04. The ENMEval package is used to find the best settings for running the ecological niche modeling (also known as species distribution modeling) software Maxent.
This tutorial utilizes:
RStudio: https://rstudio.com/
(Rstudio also requires R: https://www.r-project.org/)
Don't have Linux? No problem! You can run it as a virtual machine within your Windows PC or Mac.
See the show notes on this video for the code used in this tutorial, and links, including for setting up a virtual Ubuntu Linux PC within your existing Windows or Mac computer.
How to install the R Package 'ENMTools' under Ubuntu Linux 20.04
The ENMTools package has many tools to assist with ecological niche modeling (also known as species distribution modeling) and its analysis. For instance, an important tool is to compare the niches of two species and determine if they are significantly different from one another.
This tutorial utilizes:
RStudio: https://rstudio.com/
(Rstudio also requires R: https://www.r-project.org/)
This tutorial also assumes you already have the R package 'ENMEval' and all of its dependencies installed. See the link to my tutorial for installing it in the show notes.
Don't have Linux? No problem! You can run it as a virtual machine within your Windows PC or Mac.
See the show notes on this video for the code used in this tutorial, and links, including for setting up a virtual Ubuntu Linux PC within your existing Windows or Mac computer.
How to adjust your environmental layers so that they have exactly the same spatial extent and resolution
This tutorial shows you how to make the resolutions and spatial extents of ESRI/ASCII grid rasters exactly the same. This is an important step for performing ecological niche modeling (also known as species distribution modeling). If the environmental layers (typically in the form of rasters) do not have exactly the same resolution and spatial extent, the modeling will fail! Often when you make your own rasters, even when you make them exactly the same way, they will still have slight differences in the resolutions and/or spatial extents. That is why this tutorial is so vital.
This tutorial utilizes:
RStudio: https://rstudio.com/
(Rstudio also requires R: https://www.r-project.org/)
This tutorial also assumes you already have the R packages 'ENMTools', 'ENMEval," and all of their dependencies installed. See the link to my tutorial for installing it in the show notes.
Don't have Linux? No problem! You can run it as a virtual machine within your Windows PC or Mac.
See the show notes on this video for the code used in this tutorial, and links, including for setting up a virtual Ubuntu Linux PC within your existing Windows or Mac computer.
How to check for correlations among environmental layers and remove ones that are highly correlated (using ENMTools in R)
This tutorial utilizes:
RStudio: https://rstudio.com/
(Rstudio also requires R: https://www.r-project.org/)
This tutorial also assumes you already have the R package 'ENMTools' and all of its dependencies installed. See the link to my tutorial for installing it in the show notes.
Don't have Linux? No problem! You can run it as a virtual machine within your Windows PC or Mac.
See the show notes on this video for links, including for setting up a virtual Ubuntu Linux PC within your existing Windows or Mac computer.
How to check for correlations among environmental layers and remove ones that are highly correlated (using standalone ENMTools)
This tutorial assumes you already have ActivePerl installed. You can find it here.
This tutorial was written by Janey Dudley, Andrea Ortiz, and Samantha Rowe, graduate students in my Landscape Ecology lab in the spring of 2017 and 2019.
How to convert species occurrence points to another projection using R (recommended)
This tutorial utilizes:
RStudio: https://rstudio.com/
(Rstudio also requires R: https://www.r-project.org/)
This tutorial also assumes you already have the R package 'sf' and all of its dependencies installed (or you can just use my preconfigured virtual machine. See the show notes.)
Don't have Linux? No problem! You can run it as a virtual machine within your Windows PC or Mac.
See the show notes on this video for links, including for setting up a virtual Ubuntu Linux PC within your existing Windows or Mac computer.
File needed for tutorial (it's just one file, and it's already unzipped)
This tutorial requires the software GRASS GIS. See tutorials above if you are unfamiliar with this software.
How to decide which settings to use when running Maxent, as well as how to make a bias file
Did it not work? If so, see this video for troubleshooting:
How to perform species distribution modeling using Maxent
This tutorial requires the software Maxent, which is free. You can download it here.
Run Maxent using R to automate everything
I have created a single R script to automate almost every step of performing species distribution modeling using Maxent. The script even runs Maxent for you. No more running ENMEvaluate separately to find the right model settings, and then inputing them into Maxent. No more hassle creating a bias file and then trying to incorporate it into Maxent on your own (I know a lot of you have trouble with this).
With this script, all you need are your species occurrence points, your environmental layers, and the R script. The whole process is automated for you, from choosing the model settings, making the bias file, and feeding all this information into Maxent and then running Maxent.
As an added bonus, you can also use this script to automatically forecast your results into the future!
How to make publication-quality figures of response curves from the Maxent output
How to test whether two species distribution models are significantly different from each other (using ENMTools in R)
This tutorial utilizes:
RStudio: https://rstudio.com/
(Rstudio also requires R: https://www.r-project.org/)
This tutorial also assumes you already have the R package 'ENMTools' and all of its dependencies installed. See the link to my tutorial for installing it in the show notes.
Don't have Linux? You can run it as a virtual machine within your Windows PC or Mac.
See the show notes on this video for links, including for setting up a virtual Ubuntu Linux PC within your existing Windows computer.
Running Ubuntu Linux on a new Mac computer with an M1 chip will require Parallels (https://parallels.com)
How to install the stand-alone version of ENMTools under Ubuntu Linux 20.04
Don't have Linux? No problem! You can run it as a virtual machine within your Windows PC or Mac.
See the show notes on this video for the code used in this tutorial, and links, including for setting up a virtual Ubuntu Linux PC within your existing Windows or Mac computer.
This tutorial assumes you already have ActivePerl installed. You can find it here.
Miscellaneous
How to install the the R package RMark, as well as the mark-recapture program Mark, on the Ubuntu Linux operating system
This tutorial utilizes:
RStudio: https://rstudio.com/
(Rstudio also requires R: https://www.r-project.org/)
Don't have Linux? No problem! You can run it as a virtual machine within your Windows PC or Mac.
See the show notes on this video for links, including for setting up a virtual Ubuntu Linux PC within your existing Windows or Mac computer.
How to use the mark-recapture program Mark under R (by using the RMark package)
This tutorial utilizes:
RStudio: https://rstudio.com/
(Rstudio also requires R: https://www.r-project.org/)
This tutorial also assumes you already have the R package 'RMark' and all of its dependencies installed. It also assumes you have the program Mark installed. I have a tutorial for installing these items in the show notes (or you can just use my preconfigured virtual machine. See the show notes.)
Don't have Linux? No problem! You can run it as a virtual machine within your Windows PC or Mac.
See the show notes on this video for links, including for setting up a virtual Ubuntu Linux PC within your existing Windows or Mac computer.