Alessandro Filazzola & Christopher Lortie tell us about their new article ‘A call for clean code to effectively communicate science‘, which provides a series of recommendations and a suite of tools that can be used to help support scientists to produce cleaner code. Can you clearly understand the code that you have written? What about if you gave it to a colleague? Or a reviewer? … Continue reading How to write clean code
When we were putting together the British Ecological Society’s Guide to Reproducible Code we asked the community to send us their advice on how to make code reproducible. We got a lot of excellent responses and we tried to fit as many as we could into the Guide. Unfortunately, we ran out of space and there were a few that we couldn’t include.
Luckily, we have a blog where we can post all of those tips and tricks so that you don’t miss out. A massive thanks to everyone who contributed their tips and tricks for making code reproducible – we really appreciate it. Without further ado, here’s the advice that we were sent about making code reproducible that we couldn’t squeeze into the Guide:
“Don’t overwrite data files. If data files change, create a new file. At the top of an analysis file define paths to all data files (even if they are not read in until later in the script).” – Tim Lucas, University of Oxford
“Keep one copy of all code files, and keep this copy under revision management.” – April Wright, Iowa State University
“Learn how to write simple functions – they save your ctrl c & v keys from getting worn out.” – Bob O’Hara, NTNU
“For complex figures, it can make sense to pre-compute the items to be plotted as its own intermediate output data structure. The code to do the calculation then only needs to be adjusted if an analysis changes, while the things to be plotted can be reused any number of times while you tweak how the figure looks.” – Hao Ye, UC San DiegoContinue reading “Making YOUR Code Reproducible: Tips and Tricks”
The way we do science is changing — data are getting bigger, analyses are getting more complex, and governments, funding agencies and the scientific method itself demand more transparency and accountability in research. One way to deal with these changes is to make our research more reproducible, especially our code.
Although most of us now write code to perform our analyses, it’s often not very reproducible. We’ve all come back to a piece of work we haven’t looked at for a while and had no idea what our code was doing or which of the many “final_analysis” scripts truly was the final analysis! Unfortunately, the number of tools for reproducibility and all the jargon can leave new users feeling overwhelmed, with no idea how to start making their code more reproducible. So, we’ve put together the Guide to Reproducible Code in Ecology and Evolution to help. Continue reading “A Guide to Reproducible Code in Ecology and Evolution”
Today, we are pleased to be welcoming a new member of the Methods in Ecology and Evolution Associate Editor Board. Will Pearse joins us from McGill University in Canada and you can find out a little more about him below. Will Pearse “I am an evolutionary ecologist and use phylogeny to link the evolution of species’ traits with their ecological community assembly. I’m interested in phylogenetic methods, macro-evolution of species’ traits, community assembly … Continue reading New Associate Editor: Will Pearse
In this video Thomas Etherington shows how to use the NLMpy Python package to create neutral landscape models. The video demonstrates how the paper’s Supporting Information documentation, Python scripts, and GIS data can be used to create a the example neutral landscape models that are shown in the paper. Recognising that some ecologists may not be very familiar with Python, the authors have also created … Continue reading NLMpy: a python software package for the creation of neutral landscape models
Lots of exciting content has recently gone online. Firstly, two interesting new applications (as always free): simapse, simulation maps for ecological niche modelling in Python and nadiv, an R package for estimating non-additive genetic variances in animal models. Also, two research articles. In the first, Julien Beguin and colleagues introduce an alternative procedure for fitting Bayesian hierarchical spatial models (BHSM) with quite general spatial covariance … Continue reading Recent content and new video