Using R for genetic analyses


As some people know, visit I have been using asreml for genetic analyses for quite a few years and even keep the ASReml Cookbook§. I was quite happy to see the development of asreml-R, ed a package that makes available most of ASReml’s functionality from R. This made my life easier: I still use plain-vanilla ASReml for very big jobs, but I can access a much more comprehensive statistical system for fairly substantial jobs.

One of my main problems with asreml-R is that is not available for OSX (mac). Yes, I can dualboot or use a virtual box, but both options are a bit of a pain. I rather use my computer with its primary operating system and no strange overheads. I have requested several times to have a mac version. It seems that the code can be compiled without problems, but it is the license management software that is not available for the mac.

I then started looking for options to run genetic analyses. nlme was designed around hierarchical models and fitting experimental designs did not feel right. lme4 is looking good and the main issue was around fitting pedigrees, a matter at least partially solved by the pedigreemm package. I then came across the MCMCglmm§ package, which has some nice features: it makes Bayesian analyses accessible, ready support for pedigrees and a syntax not that different from asreml-R.

After playing with the MCMCglmm library, I found that I could not use pedigrees with parents acting both as males and females. I modified the code (line 26 of inverseA.R) to print a warning rather than to stop and the compiled the library again. Voila! it is working (the beauty of having access to the source).

R CMD INSTALL /Users/lap44/Downloads/MCMCglmm --library=/Users/lap44/Library/R/2.9/library

By the way, ASReml is still my primary tool at the moment, but I enjoy having good alternatives.

Filed in genetics, mac, software, statistics

There are 2 comments in this article:

  1. 11/03/2010David Hsu say:

    Hi Luis,

    I have the same problem with lack of Asreml-R on the Mac. I could set up another machine (virtual or alternative), but I don’t know if that will offset just making lmer() do what I want on the Mac.


  2. 12/03/2010Luis say:

    At the moment I find lmer too limiting on speed and for fitting multivariate models. It seems that a beta mac version for asreml-r is coming in two weeks time. MCMCglmm is a nice option, although it still requires further development.

Write a comment: