Future-proofing code: Principles of coding for plant ecophysiology with {photosynthesis} as a case study

Plant physiological ecology is founded on a rich body of physical and chemical theory, but it is challenging to connect theory with data in unambiguous, analytically rigorous, and reproducible ways. Custom scripts written in computer programming languages (coding) enable plant ecophysiologists to model plant processes and fit models to data reproducibly using advanced statistical techniques. Since most ecophysiologists lack formal programming education, we have yet to adopt a unified set of coding principles and standards that could make coding easier to learn, use, and modify. We outline principles and standards for coding in plant ecophysiology to develop: 1) standardized nomenclature, 2) consistency in style, 3) increased modularity/extensibility for easier editing and understanding; 4) code scalability for application to large datasets, 5) documented contingencies for code maintenance; 6) documentation to facilitate user understanding; and 7) extensive tutorials for biologists new to coding to rapidly become proficient with software. We illustrate these principles using a new R package, {photosynthesis}, designed to provide a set of analytical tools for plant ecophysiology. Our goal with these principles is to future-proof coding efforts to ensure new advances and analytical tools can be rapidly incorporated into the field, while ensuring software maintenance across scientific generations.

[1]  Melvin T. Tyree,et al.  The Measurement of the Turgor Pressure and the Water Relations of Plants by the Pressure-bomb Technique , 1972 .

[2]  Ian M. Mitchell,et al.  Best Practices for Scientific Computing , 2012, PLoS biology.

[3]  C. V. Willigen,et al.  A mathematical and statistical analysis of the curves illustrating vulnerability of xylem to cavitation. , 1998, Tree physiology.

[4]  Junfei Gu,et al.  Evaluating a new method to estimate the rate of leaf respiration in the light by analysis of combined gas exchange and chlorophyll fluorescence measurements , 2011, Journal of experimental botany.

[5]  D. Ort,et al.  Improved method for measuring the apparent CO2 photocompensation point resolves the impact of multiple internal conductances to CO2 to net gas exchange. , 2015, Plant, cell & environment.

[6]  S. V. Caemmerer,et al.  Biochemical models of leaf photosynthesis. , 2000 .

[7]  N. Peppas Theoretical Considerations , 2003 .

[8]  Andrej-Nikolai Spiess,et al.  Title R interface to the Levenberg-Marquardt nonlinear least-squares algorithm found in MINPACK, plus support for bounds , 2015 .

[9]  Edzer Pebesma,et al.  Measurement Units in R , 2016, R J..

[10]  Celiam . Smith,et al.  Plant water status, hydraulic resistance and capacitance , 1989 .

[11]  W. Bauerle,et al.  Carbon and water flux responses to physiology by environment interactions: a sensitivity analysis of variation in climate on photosynthetic and stomatal parameters , 2014, Climate Dynamics.

[12]  Peter Baumgartner,et al.  R – Data Science , 2017 .

[13]  Carl J. Bernacchi,et al.  Improved temperature response functions for models of Rubisco‐limited photosynthesis , 2001 .

[14]  B. Marshall,et al.  A Model for C3 Leaves Describing the Dependence of Net Photosynthesis on IrradianceII. APPLICATION TO THE ANALYSIS OF FLAG LEAF PHOTOSYNTHESIS , 1980 .

[15]  L. Schipper,et al.  Macromolecular rate theory (MMRT) provides a thermodynamics rationale to underpin the convergent temperature response in plant leaf respiration , 2017, Global change biology.

[16]  R. Leuning A critical appraisal of a combined stomatal‐photosynthesis model for C3 plants , 1995 .

[17]  C. Muir tealeaves: an R package for modelling leaf temperature using energy budgets , 2019, AoB PLANTS.

[18]  I. E. Woodrow,et al.  A Model Predicting Stomatal Conductance and its Contribution to the Control of Photosynthesis under Different Environmental Conditions , 1987 .

[19]  P. Reich,et al.  Convergence in the temperature response of leaf respiration across biomes and plant functional types , 2016, Proceedings of the National Academy of Sciences.

[20]  Roger M. Sauter Advanced R (2nd ed.) , 2020, Technometrics.

[21]  Eleazar Eskin,et al.  Improving the usability and archival stability of bioinformatics software , 2019, Genome Biology.

[22]  Christopher D. Muir,et al.  tealeaves: an R package for modelling leaf temperature using energy budgets , 2019, bioRxiv.

[23]  William R. Pearson,et al.  Bioinformatics core competencies for undergraduate life sciences education , 2017, bioRxiv.

[24]  N. Holbrook,et al.  The ‘hydrology’ of leaves: co‐ordination of structure and function in temperate woody species , 2003 .

[25]  B. Marshall,et al.  A Model for C3 Leaves Describing the Dependence of Net Photosynthesis on Irradiance , 1980 .

[26]  S. Pandis,et al.  Dimethylsulfide chemistry in the remote marine atmosphere: Evaluation and sensitivity analysis of available mechanisms , 1997 .

[27]  Monya Baker Scientific computing: Code alert , 2017 .

[28]  Denis Loustau,et al.  Temperature response of parameters of a biochemically based model of photosynthesis. II. A review of experimental data , 2002 .

[29]  Sara Varela Cómo crear paquetes de R: “R packages. Organize, test, document, and share your code” por Hadley Wickham, 2015 , 2015 .

[30]  Hadley Wickham,et al.  ggplot2 - Elegant Graphics for Data Analysis (2nd Edition) , 2017 .

[31]  J. Berry,et al.  A biochemical model of photosynthetic CO2 assimilation in leaves of C3 species , 1980, Planta.

[32]  Susanne von Caemmerer,et al.  Temperature Response of Mesophyll Conductance. Implications for the Determination of Rubisco Enzyme Kinetics and for Limitations to Photosynthesis in Vivo , 2002, Plant Physiology.

[33]  R. Duursma Plantecophys - An R Package for Analysing and Modelling Leaf Gas Exchange Data , 2015, PloS one.

[34]  H. Griffiths,et al.  An Excel tool for deriving key photosynthetic parameters from combined gas exchange and chlorophyll fluorescence: theory and practice. , 2016, Plant, cell & environment.

[35]  Kosuke Imai,et al.  mediation: R Package for Causal Mediation Analysis , 2014 .

[36]  B. Kok,et al.  On the inhibition of photosynthesis by intense light. , 1956, Biochimica et biophysica acta.

[37]  Svante Arrhenius,et al.  Quantitative laws in biological chemistry , 2009 .

[38]  Patrick J. Hudson,et al.  Impacts of long-term precipitation manipulation on hydraulic architecture and xylem anatomy of piñon and juniper in Southwest USA. , 2018, Plant, cell & environment.

[39]  A. Glen Houston,et al.  Mathematical and statistical analysis , 1988 .

[40]  Xinyou Yin,et al.  Using combined measurements of gas exchange and chlorophyll fluorescence to estimate parameters of a biochemical C photosynthesis model: a critical appraisal and a new integrated approach applied to leaves in a wheat (Triticum aestivum) canopy. , 2009, Plant, cell & environment.

[41]  Jason A. Papin,et al.  Ten simple rules for biologists learning to program , 2018, PLoS Comput. Biol..

[42]  Paolo De Angelis,et al.  Reconciling the optimal and empirical approaches to modelling stomatal conductance , 2011 .

[43]  Lianhong Gu,et al.  Reliable estimation of biochemical parameters from C₃ leaf photosynthesis-intercellular carbon dioxide response curves. , 2010, Plant, cell & environment.

[44]  T. Sharkey,et al.  Theoretical Considerations when Estimating the Mesophyll Conductance to CO(2) Flux by Analysis of the Response of Photosynthesis to CO(2). , 1992, Plant physiology.

[45]  Andreas Prlic,et al.  Ten Simple Rules for the Open Development of Scientific Software , 2012, PLoS Comput. Biol..

[46]  Kiona Ogle,et al.  Hierarchical statistical modeling of xylem vulnerability to cavitation. , 2009, The New phytologist.