# September 2010 Archives

## Study sessions for Problem 3

I've booked the Pharm/Bio fishbowl (room 303) for the following dates and times.  If you know you need other time, please let me know.

Tuesday October 5: 11am to 2pm
Wednesday October 6: 1:15pm to 4pm

Cheers
Kathryn

## Justifying your K value for Problem 2

Hi all,

When you are answering question 1, please make sure to include the bar graphs from Structure for your chosen K (and perhaps a few other K's as well).  One thing that I have noticed is that different iterations result in different clustering, so if I don't know the diagram you are basing your cluster on, I'm going to have a hard time grading!

Also, remember to send me your file with the following name format: LastName_Problem2

Cheers
Kathryn

## More on picking the "right" K from Structure

I got an e-mail this morning with a question that deserves further discussion, so I'm posting the question and my response here so that everyone can see it.

Question: After running Structure last week, we all found that as K got larger, so did its corresponding mean log prob of the data. That would mean that K=8 has the largest and so, logically, we should pick K=8 for our K values to run with the new data? I remember you talking about this in class and I can't find in my notes if this is the most important method for finding K in our situation.
My response: When we first talked about Structure in class, I presented two methods for selecting K: (1) looking at the log probability of the data directly from Structure (in our case a mean of ~20 runs for each K from the spreadsheet) and (2) calculating Delta-K. I pointed out that simply using the log probability of the data is likely to overestimate K (a) if the underlying groups have genotype frequencies that depart from Hardy-Weinberg &/or (b) if the multilocus genotype frequencies aren't simply the product of the single-locus frequencies. In our case both (a) and (b) are likely to hold, so basing our choice of K purely on the log probability of the data probably isn't a good idea.

Looking at Delta-K isn't a horrible alternative, but if you read the paper in which it was proposed as an alternative, this approach to selecting K was tested only under one very specific kind of population structure, which may or may not apply in our case. So I'd certainly suggest looking at Delta-K, but I wouldn't treat what it tells you as gospel either.

So what do you do? Well, take a look at what we did in our Molecular Ecology paper. We combined what both criteria had to tell us about K with a look at where populations fell on the map and what the different choices of K seemed to tell us about their relationship. In other words, we combined some quantitative understanding of population structure with biological intuition about what relationships are likely to be important to settle on a K that best helped us to understand the data.

That's what I'm suggesting you do here. Look at both the log probability of the data and Delta-K. Then combine what they tell you with what the geographical distribution of populations might suggest about relationships to select a K (or possibly 2-3 Ks) that seem most informative. Be sure to explain your reasoning for settling on the number of Ks that you choose. Then use that choice (or those choices) to set up the analyses for questions 2 and 3.

## Inbreeding in Science

Not as in "science", the field of science. Science as in the journal. Many of you know that one of the hats I wear is that of conservation biologist. There's a paper in today's Science and an accompanying paper arguing that introduction of genes (by moving individuals from Texas to Florida, not by genetic engineering) from Texas panthers into the endangered Florida panther population is responsible, at least in part, for the Florida panther's recovery. I bring this up, because the Florida panther population seemed to be suffering from inbreeding depression, and we just finished talking about inbreeding.

The commentary: A bit of Texas in Florida

## Concept map updated

I just updated the concept map with a few ideas that carry us through our discussion of population structure. After getting it up on the web I realized that one of the links is faulty. I'll get that fixed in the next iteration of the map some time next week.

## Further update on Problem 2

I noticed a few errors on the new data set so please use the following data file when you are creating your final bar plots.  Here's the file: protea-ordered3.stru.  You will also note that there has been one final change to the table of data in Problem 2 (the NV06 population is actually mundii, not aurea).

Cheers
Kathryn

## Update on Problem #2 and other news

I've posted an updated version of Problem #2 on the web site. You can pick up either the HTML version or the PDF version from the lecture detail page here. The HTML version includes a link to the map of collection localities. I'll show you the map in lecture later this morning. Please notice that when I was augmenting the population table, I realized that I had mislabeled population WS. It's actually Protea subvestita.

We've also posted a slightly modified version of the structure data file that has the populations sorted into taxonomic order. You'll need to run Structure again to get the bar plot with the populations sorted into taxa, but you only need to do it for the K (or K's) you think are important for interpreting the data, and you only need to do it once for that K (or K's). Here's the link. We've also posted a copy of an Excel spreadsheet with the data you'll need for delta-K calculations.

Kathryn also put together a document describing how she solved the questions in Problem 1.

## Data for Problem 2

A couple of students are having some technical issues with Structure.  The data for Problem 2 will be posted tomorrow morning.

Sorry for the delay!

Kathryn

## A few notes for handing in your assignment

1)   1)  Save your file as a .doc or .docx with a file name Last Name_Problem1 (example: Theiss_Problem1)

2)   2)  Please answer each question on its own page.  You should write 2-3 sentences to answer the question, and then paste your code and stats underneath.

Thanks!

## Fixes

I fixed the bad link to james-gda.nex in an earlier post, and I corrected the subscripting problem in the notes from this morning. Sorry for the confusion.

## TA hints/suggestions for Problem 1

After meeting with a group of you, I have the following hints/suggestions.

1)  For EACH question, you will be writing 2 models and then comparing the DIC values to determine whether there is evidence to support the claim.

2)  For Question 3 you will be combining the model types that you used in Questions 1 & 2.

Cheers
Kathryn

## Just to make sure we're all in sync

I recommend downloading the most recent version of james-gda.nex and james.arp. I made a couple more tweaks to make it easier to illustrate some data manipulations tomorrow. If you have the version I'm working with, it will be easier for you to follow along.

The link to the Mac OS X versiion of Arlequin in the last post didn't work. I've fixed it, or you can click on this one.

## Success!

Good news, Mac users. I defeated Arlequin. You can now download a binary for Mac OS X here. I haven't tested it extensively, but it seems to work fine.

I've also uploaded a new version of james.arp (for use with Arlequin). If you downloaded it earlier, please replace that version with this one. There were a couple of glitches in it that I needed to fix.

It also dawned on me that I should post versions of the R/JAGS code for the solution to the example problem for anyone whose interested. The R code is in the (creatively named) zoarces.R and the JAGS code, which is equivalent to the WinBUGS code, is in zoarces.txt.

## Late breaking news

If you have a chance to download and install GDA (Windows executable available from here; Mac OS X v10.6 available from here, within UConn.Edu) and Arlequin (Windows executable available from here; I'm trying to get a Mac version working, but no luck yet) before lecture, please do it and grab yourself a copy of the example input files james-gda.nex (for GDA) and james.arp (for Arlequin), too.

## Revision to Problem #1

I just posted a revised version of Problem #1. If you've made progress on your solution, don't worry. The solution is the same. But after answering a few questions about what it means, I rewrote it a little bit in a way that (I hope) will make the question easier to understand.

## Using the DIC tool in WinBUGS/OpenBUGS

I've had a few questions about using the DIC tool in WinBUGS/OpenBUGS, so I decided to compile the questions and answers into a single page (http://darwin.eeb.uconn.edu/eeb348/using-the.html) where everyone can see them. Let me know if you have questions that aren't answered there, and I'll add them to the list.

## Another Mac version of OpenBUGS

I've uploaded a second version of OpenBUGS. The one labeled OpenBUGS-Leopard was put together on OS X v10.5. I hope (but can't be sure) that it will also work on OS X v10.4. Click here for the download. (If this works for those of you using OS X v10.4 and v10.5, I'll use the same approach to provide binaries for some other Windoze programs we'll be using soon.)

## Study sessions Sept 14 & 15

Hi all,

I've booked the fishbowl conference room in the Pharm/Bio building (3rd floor) for the following dates and times.  If these don't work for you, feel free to email me and we can schedule something!

Cheers
Kathryn

Tuesday Sept 14 10-2
Wednesday Sept 15 1-5

## Problem #1 posted

I just posted the assignment for Problem #1. You will find a link to it in the detail page for today's lecture. It is due a week from Friday.

## Book pages for Testing for departures from H-W

Hi all,

For those of you who are reading along in the textbook, I recommend pages 33-35 and problem 1.4 as a good accompaniment to the lecture notes.

Cheers
Kathryn

## More notes posted

I've posted updates to the notes on testing for departures from Hardy-Weinberg and introducing the Wahlund effect and F-statistics. I'll have more notes on the genetic structure of populations posted by tomorrow night.

## Solution to Example #1 posted

I just posted the solution to Example problem #1. You can find the PDF here. I will be out of town on Tuesday, so I won't be able to respond to questions until Wednesday, but feel free to drop me a line anyway, and I'll get back to you with an answer as soon as I can.

## WinBUGS on Mac OS X

I think I've managed to put together a binary of OpenBUGS, a somewhat newer version of WinBUGS, that will install and run on OS X. If you click on this link, you'll download a large (~600MB) disk image. Double-click on it and drag OpenBUGS to your Applications folder. Then you should be able to double-click on the OpenBUGS icon and run it like any other Mac application. It will take a long time to start up, especially least the first time, because it has to do a lot of internal configuration to set up the environment that allows it to emulate Windoze. But once it starts up, it should work just fine.

Even if you've already figured out how to use JAGS and R, you may want to download this too. It's easier to see where errors in your code are when you use the graphical interface. And if you're like me, you'll make plenty of errors, so finding them (relatively) easily is a big plus.

If you're connecting from off-campus, you should get an error message saying that you don't have permission to retrieve the file. I did that because even though OpenBUGS is freely available, I don't want to be responsible for distributing it to anyone other than folks at UConn.