Little software

Some useful code to me:

images (1)


Implementation in R of the equations from Lande and Arnold (1985)  to calculate natural selection on correlated traits (multivariate selection).

Since L&A proposed a solution by matricial algebra, I use a bootstrap procedure to assess the significance of selection.



A number of scripts in python, R and bash for a Genome Wide Association analysis of phenotypes that does not remove population structure, but uses it. It re-purposes the output of chromosomepainter software to identify regions of the genome where ancestry origin is associated with a phenotype. The code includes a correction of p-values by an empirical p-value distribution.  It is basically what I used for this paper.


In this R package I store and document general functions that come quite handy in most of my analyses.



Ever wanted to use global climate databases? and from different times in history? This extends the “famous” getData funciton the raster R package to also retrieve historic datasets from  and in a recursive manner. Particularly, the available datasets to download correspond to the calendar dates of 22,000 years ago (Last Glacial Maximum), 6,000 years ago (Mid-Holocene), present (average 1960-1990), and two future time points (2050 and 2070) under several gas emission scenarios.

Install the package as:


Now get all data and start playing with it just with one command line:

# To get the 19 bioclimatic variables for all available dates (past, present, future)
bioclim = recursive.getData(times="all") 

And for example, to plot a map of annual temperature and precipitation in summer. Present and future (2070 rcp8.5), just run:


Note: This repo is just making easier to get in R the awesome data that the people at and the developers of raster R package are producing and putting available.


A python module that wraps several image processing modules. It segments the green areas of plant images. It was used to produce this:f_video_s1








git clone
cd hippo
python # this will process example images