Here are my slides from a guest lecture I gave in ENVS 601. Interesting class, only place I’ve been called totally ignorant by another instructor… I’m thinking it was a compliment aimed at bias-free research approaches.

Goings on in population genetics.
Applied Population Genetics, a graduate-level text focusing on modern applied population genetics. This text is available online here and will be updated continuously.
Read moreDyer, RJ. 2015. Population Graphs and Landscape Genetics. Annual Review of Ecology, Evolution, and Systematics, 46, 327-342. DOI: 10.1146/annurev-ecolsys-112414-054150
Read moreHere are my slides from a guest lecture I gave in ENVS 601. Interesting class, only place I’ve been called totally ignorant by another instructor… I’m thinking it was a compliment aimed at bias-free research approaches.
The Virginia Transportation Research Council’s Environmental Research Advisory Committee meeting in Charlottesville Virginia on 14 May 2019. Below are the slides with the status update for the project Refining Environmental DNA Protocols Developed for the Endangered James Spinymussel.
If you need a link directly, it is here.
Center overview for Spring 2019.
If you took part in the Glasgow Landscape Genetics Course in March, I would appreciate any feedback you could provide so I can make the course better. Thank you.
Here is the seedlings file.
There is a persistent problem with the get_map() function now that the google api is required. Even if you ask for source=”stamen” you still get an error asking for the google api. A fix is to do the following:
library(gstudio)
data(arapat)
coords <- strata_coordinates(arapat)
b1 <- c( left = -114.2935,
bottom = 23.0757,
right = -109.1263,
top= 29.32541)
map <- get_stamenmap( bbox = b1, zoom=7 )
ggmap(map)
This week I’m in the wonderful town of Glasgow giving a workshop on Applied Landscape Genetics to a wide and interesting population of researchers.
Here is the link to the content. If you are not taking it, you can follow along at your own pace, it is all available under the following CC-SA 4.0 license.
Ubuntu server is a nice platform for server-related activities. Here is a short tutorial of how I updated my most current version to the latest available by rstudio.org. Here is how I got it going.
If this is your first install, you need to grab the gdebi stuff
sudo apt-get install gdebi-core
Next download the latest deb from rstudio. I typically like to try out the preview release, often stable enough to get what you want done while at the same time highlighting the latest features. When writing, it was the 1.2.1321 version.
wget https://s3.amazonaws.com/rstudio-ide-build/server/trusty/amd64/rstudio-server-1.2.1321-amd64.deb
Make sure to check the md5sum!
If you already have it running, stop it with
sudo rstudio-server stop
then install the new version
sudo gdebi rstudio-server-1.2.1321-amd64.deb
This went out and grabbed some other libraries and installed everything for me then turned it back on. Since I had it already installed, that was the end of it. If this is the first time you are installing it, you can configure it following the installation guide here.
Today, I’ve been invited to give a talk at the University of Virginia Center for Public Health Genomics. I’ll be introducing the Population Graph framework we’ve been developing over the last decade with highlights on how we are applying it to SNP-level genomic data analysis in non-model systems.
Here are the slides from the January Meeting.
Jane Remfert has successfully completed the necessary steps to proceed to Doctoral Candidate by completing her written and oral defense and submitting her research proposal. Thank you to Drs. Eckert, Gough, Johnson, and Keyghobadi for their insightful comments and expertise in helping to shape a dynamic and exciting research project.
Now, you just have to do it!
So as a way to expand some of the analytical tools we offer the students at my work, I’m developing a version of my Data Literacy course that will use Python as well as R. There is a lot of overlap in these two languages and both are of interest to our students as they develop their toolkits. This document walks through how to set up Pweave on your machine so you can engage in a little Literate Programming (trust me, it will make your life suck a lot less. To see how to set up Atom, see my previous post.
I believe that the time is ripe for significantly better documentation of programs, and that we can best achieve this by considering programs to be works of literature. Hence, my title Literate Programming.
Knuth – 1992
If you think of it a bit, as data scientists, the documents and manuscripts we work on every day are just extensions of programs and scripts we use to do our work. However, in academia we are taught the process in entirely the wrong sequence. Traditionally, we are taught the following sequence.
The main problem is that any iteration of the manuscript would require manually going through the process or changing the text document, rerunning the analysis, then replotting the figures. Move this section up her and then go back through and make sure all your figure and table references are recovered.
But this is entirely upside-down! Instead of Communicate -> Analysis -> Visualize, our workflow should be more like:
We should be data-focused, not manuscript focused!
The research manuscript is simply an advertisement of our research and the data, it IS NOT the research or data.
Dyer – Just now!
PWeave is like SWeave (and its better version Knitr) on R. It is a tool that we can use to interdigitate our analysis and how we go about presenting it all in one place. This allows us to have a single document where we can have the data, the analyses, the output, and the verbiage that we use to describe what we are doing. This tight coupling of the data to the rest of the components helps in Reproducible Research.
To install Pweave, you need to have atom and python already configured. Then in Atom, install the following packages
Next, you can prepare a short script. Here is a fragment of one.
What this does is mix in markdown text and code. If you have not used Markdown before, it is pretty straight forward. Here are some simple rules.
All the python code must be within the bounds marked by the three backslashes. The code will be evaluated, from the top of the document to the bottom. You do not have to show the code for it to run.
To weave the document into HTML (we can do other formats as well but this gets us going, open the terminal and type:
pweave.exe test1.pmd
And it should produce a document in the same folder but as an *.html file.
Which is pretty cool. Now, there are a lot more things you can do with markdown.
This is such a common thing to do these days, it is
Here is the issue. Say you have some data associated with your research project and are adding to it and doing analyses. Chances are, you have it shoved into an Excel spreadsheet that is on your laptop, your home computer, the computer in the lab, a backup disk (you are keeping backups, right?), and even perhaps shared on a Cloud Drive with your collaborators/advisors/partner/whatever. Great! Now you have absolutely no way to know which version of the dataset is the real one and which are wrong.
In R, we can use the ability to serve out spreadsheet-like data as *.csv files using Google Drive. This way, the data are in one (and only one) location and can be accessed by anyone you would like to grant access. Here is how to set it up.
First, on Google Drive, you need to tell it to make a spreadsheet available and how to publish it. This is done from the menu as File -> Publish to the Web… A dialog box will pop up, like the one below, and let you select which sheet is published and what it is published as. The salient part here is that you should select Comma separated values (*.csv) as the output type. The URL that is provided in the image below should be copied as we will be using it in R to grab the data.
Next, you can fire up R (I use RStudio as a sane interface) and make sure you have the RCurl library installed. If not, install it like this:
install.packages("RCurl")
So to load the file from Google Drive, we need to format the URL from Google Drive
require(RCurl) link <- "https://docs.google.com/spreadsheets/d/1QL9fYeKkDKphba12WLVTBJrv_d1WHTc9SrZoBeIFgj8/pub?gid=0&single=true&output=csv" url <- getURL( link )
Then open an internet connection asking for a text-based communication between Google Drive and your R session
con <- textConnection( url )
and then pull the data into R as if it was on the local filesystem.
data <- read.csv( con )
And your data should be there.
summary(data) # Population SampleID X.Coordinate Y.Coordinate Cf.G8 # Min. :2.000 Min. :203.0 Min. : 346 Min. : 254 Min. :147.0 # 1st Qu.:3.000 1st Qu.:315.5 1st Qu.:1482 1st Qu.:2231 1st Qu.:155.0 # Median :4.000 Median :428.0 Median :1656 Median :2928 Median :157.0 # Mean :3.809 Mean :428.0 Mean :1747 Mean :2588 Mean :160.3 # 3rd Qu.:5.000 3rd Qu.:540.5 3rd Qu.:1914 3rd Qu.:3082 3rd Qu.:165.0 # Max. :6.000 Max. :653.0 Max. :3778 Max. :6148 Max. :199.0 # NAs :9 # X Cf.H18 X.1 Cf.N5 X.2 # Min. :149 Min. : 83.0 Min. : 83.0 Min. :148.0 Min. :150 # 1st Qu.:161 1st Qu.: 99.0 1st Qu.:107.0 1st Qu.:165.0 1st Qu.:170 # Median :167 Median :105.0 Median :115.0 Median :170.0 Median :170 # Mean :172 Mean :104.5 Mean :112.8 Mean :167.7 Mean :170 # 3rd Qu.:181 3rd Qu.:111.0 3rd Qu.:119.0 3rd Qu.:170.0 3rd Qu.:170 # Max. :519 Max. :123.0 Max. :123.0 Max. :172.0 Max. :172 # NAs :9 NAs :1 NAs :1 NAs :36 NAs :36 # Cf.N10 X.3 Cf.O5 X.4 Min. :171.0 Min. :175.0 Min. :176.0 Min. :176.0 # 1st Qu.:187.0 1st Qu.:193.0 1st Qu.:178.0 1st Qu.:182.0 Median :189.0 Median :197.0 Median :182.0 Median :194.0 # Mean :189.4 Mean :196.3 Mean :182.5 Mean :190.3 3rd Qu.:193.0 3rd Qu.:201.0 3rd Qu.:182.0 3rd Qu.:196.0 # Max. :205.0 Max. :205.0 Max. :202.0 Max. :204.0 NAs :13 NAs :13 NAs :8 NAs :8
This past summer has seen some rather spectacular cases of where people have run afoul of dangerous flora, the most recent of which was a college student after a runin with Giant Hogweed–the results were not good.
The Virginia Tech Cooperative Extension group publishes a nice overview of toxic plants in the Commonwealth. It has some useful information in that all of us should be aware of.
Some awesome presentations by lab members at today’s research symposium.
Bonnie Roderique speaking about the James Spinymussel.
Matt DeSaix presenting work on migration connectivity in Prothonotary warblers.
Jane Remfert & Wyatt Carpenter discussing the Carver Community Project
Today, we had the first event in the Global Environment Speaker Series hosted by the VCU Center for Environmental Studies and the Departments of Geography & the Environment and Environmental Studies from the University of Richmond—a set of units that already has a lot of collaborations among faculty, curricula, and students.
We invited Dr. Gary Machlis to come and speak on his new book entitled, “Conservation in America: A char for rough waters“
It was a great talk and the poster session. We have to incorporate more inter-unit dialog and collaboration.
Syndication is a process whereby you can post something to your site and other locations will detect that you have posted something and then pull in the content to their site, making it look like you wrote it and posted it on their site. Is that clear? Here is my use-case:
This is particularly interesting for teaching and other uses. If a class uses WordPress for its webpage, students can provide content for that class page by publishing on their own site. This allows each student to create a "Digital Portfolio" of work that they maintain (see my thing on Content Silos for more on this).
I'm going to use the FeedWordPress Plugin for this because it was the one that my university uses and I want to standardize the approaches.
To install it, go to Plugins->Add New and search for it. Install & Activate .I'm going to use a new Category, named Dyerlab, to trigger the syndication. So I add a new one.
OK, now on my personal page, I have a category "Dyerlab" that I will attach to things that I want to show up on my Dyerlab WordPress site. To make the connection, we need to get the category feed address. Unless you are changing something drastic it has the following structure:
https://yoursiteurl/category/categoryname
which in my case is:
https://rodneydyer.com/category/Dyerlab/
You can try it out and you should see (if you have any posts with that category published) a list of just those posts. If so, perfect. If not, then you either have not posted anything with that category or you have not set up the category correctly. Go back and check.
Now, I need to set up the other site, in this case my laboratory site, to monitor my personal site, and any time something is posted, grab it. Go open your other site and make sure the plugin is installed. This site will "Pull" the posts from the original site. Click on Syndication in the bottom left panel and you will open the settings page.
In the "New Source" box, paste in the category address from your other site. In my case I pasted in
https://rodneydyer.com/category/dyerlab.
You will be taken to a verification screen where you can verify that things are working properly and select the correct feed type. There is a 'verify' link that you can use to make sure it is providing good input. After you select which kind of feed you want, you will be redirected back to the list, as above, but with your new feed in it.
Success
Now, when I write something (like this post) on my site, it will automagically show up on my laboratory site as well. The Cool thing is that wherever it is displayed, it is reformatted to look as if it belonged at that location. Here is this post on my personal site.
and on my laboratory site
are identical in content, though are individually styles. Pretty cool!
Featured image bytes amattox mattox (CC BY-NC 2.0).
Syndication is a process whereby you can post something to your site and other locations will detect that you have posted something and then pull in the content to their site, making it look like you wrote it and posted it on their site. Is that clear? Here is my use-case:
This is particularly interesting for teaching and other uses. If a class uses WordPress for its webpage, students can provide content for that class page by publishing on their own site. This allows each student to create a "Digital Portfolio" of work that they maintain (see my thing on Content Silos for more on this).
I'm going to use the FeedWordPress Plugin for this because it was the one that my university uses and I want to standardize the approaches.
To install it, go to Plugins->Add New and search for it. Install & Activate .I'm going to use a new Category, named Dyerlab, to trigger the syndication. So I add a new one.
OK, now on my personal page, I have a category "Dyerlab" that I will attach to things that I want to show up on my Dyerlab WordPress site. To make the connection, we need to get the category feed address. Unless you are changing something drastic it has the following structure:
https://yoursiteurl/category/categoryname
which in my case is:
https://rodneydyer.com/category/Dyerlab/
You can try it out and you should see (if you have any posts with that category published) a list of just those posts. If so, perfect. If not, then you either have not posted anything with that category or you have not set up the category correctly. Go back and check.
Now, I need to set up the other site, in this case my laboratory site, to monitor my personal site, and any time something is posted, grab it. Go open your other site and make sure the plugin is installed. This site will "Pull" the posts from the original site. Click on Syndication in the bottom left panel and you will open the settings page.
In the "New Source" box, paste in the category address from your other site. In my case I pasted in
https://rodneydyer.com/category/dyerlab.
You will be taken to a verification screen where you can verify that things are working properly and select the correct feed type. There is a 'verify' link that you can use to make sure it is providing good input. After you select which kind of feed you want, you will be redirected back to the list, as above, but with your new feed in it.
Success
Now, when I write something (like this post) on my site, it will automagically show up on my laboratory site as well. The Cool thing is that wherever it is displayed, it is reformatted to look as if it belonged at that location. Here is this post on my personal site.
and on my laboratory site
are identical in content, though are individually styles. Pretty cool!
Featured image bytes amattox mattox (CC BY-NC 2.0).