Home » Principles of resilient coding for plant ecophysiologists

Principles of resilient coding for plant ecophysiologists

Tired: Remembering if ‘ACi_sol_C_1.xlsx’ or ‘ACi_sol_D_v3.xlsx’ has correct parameter estimates. Wired: Using reproducible, scalable code to analyse data.

You can listen to this page as an audio file.

Computer coding is becoming an increasingly important skill in biological research. Custom scripts written in computer programming languages are enabling plant ecophysiologists to model plant processes and fit models to data using advanced statistical techniques. Coding allows for consistent, reproducible, transparent and scalable analyses of scientific data, while at the same time minimising human work hours compared to using pre-packaged software. However, many ecophysiologists lack formal programming education. As a result, most published ecophysiological analyses still rely upon spreadsheet-based methods rather than computer code. These are often time consuming, subjective and error prone. For example, cryptic changes in the spreadsheets can occur over time without a record of the changes, potentially leading to compounding errors. Furthermore, spreadsheet tools often break, requiring a fresh, unaltered spreadsheet to be used for each analysis.

The {photosynthesis} R package was created by Stinziano et al. following their eight principles of resilient coding. Image credit: Stinziano et al.

In their new Editor’s Choice article published in AoBP, Stinziano et al. identify eight principles to help plant ecophysiologists without much programming experience write resilient code. These principles are illustrated using a new R software package called {photosynthesis}. The goal of these principles is to advance scientific discovery in plant ecophysiology by making it easier to use code for simulation and data analysis, reproduce results and rapidly incorporate new biological understanding and analytical tools.

Stinziano et al.’s principles of resilient coding cover (i) standardized nomenclature, (ii) consistency in style, (iii) increased modularity/extensibility for easier editing and understanding, (iv) code scalability for application to large data sets, (v) documented contingencies for code maintenance, (vi) documentation to facilitate user understanding, (vii) extensive tutorials and (viii) unit testing and benchmarking. The {photosynthesis} package implements these principles for gas exchange and hydraulic curve fitting and modelling. The authors highlight that adopting some or all of their principles will improve code reproducibility and help advance scientific discovery, without rigidly prescribing how plant ecophysiologists should do their work. Going forward as a community, Stinziano et al. argue that we should adopt a set of coding principles and guidelines to create code as flexible as the biology we study. They state, “it will be easier for new trainees and beginner coders to learn, understand and write code for the community; and it will be easier to tailor existing code to our projects.”

For more information on the {photosynthesis} R package please visit the package GitHub repository.

RESEARCH ARTICLE

Stinziano, J.R., Roback, C., Sargent, D., Murphy, B.K., Hudson, P.J., Muir, C.D., 2021. Principles of resilient coding for plant ecophysiologists. AoB PLANTS. https://doi.org/10.1093/aobpla/plab059

William Salter

William (Tam) Salter is a Postdoctoral Research Fellow in the School of Life and Environmental Sciences and Sydney Institute of Agriculture at the University of Sydney. He has a bachelor degree in Ecological Science (Hons) from the University of Edinburgh and a PhD in plant ecophysiology from the University of Sydney. Tam is interested in the identification and elucidation of plant traits that could be useful for ecosystem resilience and future food security under global environmental change. He is also very interested in effective scientific communication.

Read this in your language

The Week in Botany

On Monday mornings we send out a newsletter of the links that have been catching the attention of our readers on Twitter and beyond. You can sign up to receive it below.

@BotanyOne on Mastodon

Loading Mastodon feed...

Audio


Archive