Thursday, April 19, 2012

Comparative methods in R workshop

Just a quick mention that Luke Harmon (University of Idaho) & Mike Alfaro (UCLA) are once again offering their very popular workshop on macroevolutionary analysis in the R environment. By all accounts this is a great course that should be of considerable interest to readers of this blog. To sweeten the deal, there are even a limited number of competitive scholarships available to defray costs of travel, room, & board for some applicants. Note that I have no direct involvement in this course.

For more information contact Luke or Mike. I have also re-posted the full course announcement below:

**************************************************************

Macroevolution in R Short Course

We are pleased to announce an intensive short course on using R to perform comparative methods to be held in Santa Barbara on June 11th to June 15th. This course is funded by the National Science Foundation, and a number of stipends to cover or defray travel, room, and board are available to qualified students and post-docs. Topics covered will include an introduction to the R programming language, tree manipulation, independent contrasts and phylogenetic generalized least squares, ancestral state reconstruction, models of character evolution, diversification analyses, and community phylogenetic analysis. If you are interested please submit your CV along with a short (maximum 1 page) description of your research interests, background, and reasons for taking the course. Admission is competitive, and the best applications come from students with data sets to analyze. International applicants are welcome.

To apply visit this URL: tinyurl.com/macro-in-R

Application deadline: April 30th.

Individuals from cultural, racial, linguistic, geographic and socioeconomic backgrounds that are currently underrepresented in science are especially encouraged to apply.


Please contact the co-organizers, Michael Alfaro (michaelalfaro@ucla.edu) and Luke Harmon (lukeh@uidaho.edu) with any questions.

**************************************************************

Wednesday, April 11, 2012

phytools article published

I just discovered that the phytools article has been officially published in Methods in Ecology & Evolution. The article, like all program notes published in MEE, is available "open access" (link to article here). Check it out.

The article is already "out of date," in the sense that its list of phytools functionality leaves out many new features in the package, nonetheless some users might find the worked examples (which includes vignette style code from an interactive R session) helpful in guiding their use of some of phytools' functions.

Monday, April 9, 2012

Facebook page for Puerto Rico course

I just created a Facebook page for the tropical biology course in Puerto Rico that I will be teaching, starting in January of 2013, in collaboration with Alberto Puente-Rolón. The course is a three week field-based course that will visit all of the major ecosystems of the Caribbean. The URL for the Facebook page as follows: http://www.facebook.com/TropicalBiologyInPuertoRico. So far the page includes only an abbreviated course description and some additional photos, but I will add details, photos, and links as they develop. Please check it out, "like" us, or share with your friends.

The photo above, by the way, was taken from the south coast of the island by Brian Langerhans on a field trip by he & I down there in 2005.

Saturday, April 7, 2012

New package for population genetic simulation & numerical analysis

I have just posted a new package, 'popgen', that does some relatively simple numerical analyses of basic population genetic models, as well as genetic drift and founder effect simulations. These are mostly a small number of functions that I have developed for teaching the population genetics section of the undergraduate evolutionary biology class I'm giving this semester (as well as one function that I developed for a paper I have submitted in collaboration with Manuel Leal at Duke). Consequently, the functions generally generate animations (e.g., here). I have usually incorporated a few different options for plotting in each case. For instance, the two figures below illustrate the end result of the same simulation of genetic drift in 10 populations for the allele frequency, p, and the mean heterozygosity (in the latter case, the red curved line shows the expected decline in heterozygosity through time). It is not currently possible to generate both animations at once; rather to replicate the same simulation and plot different aspects (gene frequency, genotype frequencies, heterozygosity, etc.) is necessary to control the seed and re-run. For instance, in the cases below I just did the following:

> require(popgen)
> set.seed(1); genetic.drift() # using all defaults
> set.seed(1); genetic.drift(show="heterozygosity")



I mostly built this package to make it easier to save, document & load the code I have developed for future instances in which I might teach this course - but now that I have done so, I thought that I might as well share it with the world!

A direct link to the package is here after which you can install as follows:

> install.packages("popgen_0.1.tar.gz",type="source",repos=NULL)

The package is also linked of my programs page where there is also a link to a PDF manual for the package.

New article out "Accepted" in Evolution

Just a quick comment to note that my new paper with Graham Reynolds has just come out "Accepted" (that is, in manuscript form in advance of publication) in Evolution. The paper describes a new Bayesian method to incorporate intraspecific data in phylogenetic comparative analyses. A link to the article can be found here. Check it out! (And if you don't have access, please let me know and I would be happy to send you a PDF.)

Tuesday, April 3, 2012

Field biology course in Puerto Rico

This is neither phylogenetics nor 'phytools' related, at least not directly, but I just wanted to take this opportunity to announce a three week, field-based course in tropical biology - focusing on ecology, evolution, and conservation biology - to be offered for the first time in January 2013 during the UMass Boston winter session (and hopefully annually thereafter). A more detailed description of the course can be found on the UMass Boston international programs page, here. The course will be co-instructed by myself and Alberto Puente-Rolón, professor at the Universidad Interamericana de Puerto Rico, Arecibo campus, with guest instruction for at least part of the course by Graham Reynolds. Alberto, it should be noted, took both of the photos on the international programs page, as well as the photo (of Anolis evermanni) shown above. The price for the course (determined by the university and listed on the program webpage) includes all travel to, from, and within the island, all food, and all accommodation (along with tuition and fees, of course). We also hope to reduce this depending on enrollment numbers and our final budget for the course.

If you have any questions about the course or would be willing to advertise it at your home institution, please contact me. Keep in mind that due to variation in winter break times at different universities the period of this course may conflict with the start of spring semester for many students.

Fix for problem with anc.Bayes

A user reports the following problem (here):

I am using your anc.Bayes function in phytools with a nexus tree and continuous data. When I run the line "anc.Bayes(tree,data,ngen=10000,control=list())" I get an error message:
"Error in if (post.odds > runif(n = 1)) { : missing value where TRUE/FALSE needed"


I still have not identified the specific cause of this error, but the problem seems to be fixed by converting the input data (originally stored as a data frame) into a vector. Of course, as always, one has to be careful to preserve the species names which were row names in the data frame, and must be names in the vector.

I.e.,

# x is a data frame
x<-as.matrix(x)[,1] # now x is a named vector
result<-anc.Bayes(tree,x) # for instance


I hope this helps.