growthPheno-pkg: Functional Analysis of Phenotypic Growth Data to Smooth and...

growthPheno-packageR Documentation

Functional Analysis of Phenotypic Growth Data to Smooth and Extract Traits

Description

Assists in the plotting and functional smoothing of traits measured over time and the extraction of features from these traits, implementing the SET (Smoothing and Extraction of Traits) method described in Brien et al. (2020) Plant Methods, 16. Smoothing of growth trends for individual plants using natural cubic smoothing splines or P-splines is available for removing transient effects and segmented smoothing is available to deal with discontinuities in growth trends. There are graphical tools for assessing the adequacy of trait smoothing, both when using this and other packages, such as those that fit nonlinear growth models. A range of per-unit (plant, pot, plot) growth traits or features can be extracted from the data, including single time points, interval growth rates and other growth statistics, such as maximum growth or days to maximum growth. The package also has tools adapted to inputting data from high-throughput phenotyping facilities, such from a Lemna-Tec Scananalyzer 3D (see <https://www.youtube.com/watch?v=MRAF_mAEa7E/> for more information). The package 'growthPheno' can also be installed from <http://chris.brien.name/rpackages/>.

Version: NA

Date: NA

Index

The following list of functions does not include those that are soft-deprecated, i.e. those that have been available in previous versions of growthPheno but will be removed in future versions. For a description of the use of the listed functions and vignettes that are available, see the Overview section below.

(i) Wrapper functions
traitSmooth Obtain smooths for a trait by fitting spline
functions and, having compared several smooths,
allows one of them to be chosen and returned in
a data.frame.
traitExtractFeatures Extract features, that are single-valued for each
individual, from smoothed traits over time.
(ii) Helper functions
args4chosen_plot Creates a list of the values for the options of
profile plots for the chosen smooth.
args4chosen_smooth Creates a list of the values for the smoothing
parameters for which a smooth is to be extracted.
args4meddevn_plot Creates a list of the values for the options of
median deviations plots for smooths.
args4profile_plot Creates a list of the values for the options of
profile plots for comparing smooths.
args4smoothing Creates a list of the values for the smoothing
parameters to be passed to a smoothing function.
(iii) Data
exampleData A small data set to use in function examples.
RicePrepped.dat Prepped data from an experiment to investigate
a rice germplasm panel.
RiceRaw.dat Data for an experiment to investigate a rice
germplasm panel.
tomato.dat Longitudinal data for an experiment to investigate
tomato response to mycorrhizal fungi and zinc.
(iv) Plots
plotAnom Identifies anomalous individuals and produces
profile plots without them and with just them.
plotCorrmatrix Calculates and plots correlation matrices for a
set of responses.
plotDeviationsBoxes Produces boxplots of the deviations of the observed
values from the smoothed values over values of x.
plotImagetimes Plots the time within an interval versus the interval.
For example, the hour of the day carts are imaged
against the days after planting (or some other
number of days after an event).
plotMedianDeviations Calculates and plots the medians of the deviations
of the smoothed values from the observed values.
plotProfiles Produces profile plots of longitudinal data for a set
of individuals.
plotSmoothsComparison Plots several sets of smoothed values for a response,
possibly along with growth rates and optionally including
the unsmoothed values, as well as deviations boxplots.
plotSmoothsMedianDevns Calculates and plots the medians of the deviations
from the observed values of several sets for smoothed
values stored in a data.frame in long format.
probeSmooths Computes and compares, for a set of smoothing parameters,
a response and the smooths of it, possibly along with
growth rates calculated from the smooths.
(v) Smoothing and calculation
of growth rates and water use traits
for each individual (Indv)
byIndv4Intvl_GRsAvg Calculates the growth rates for a specified
time interval for individuals in a data.frame in
long format by taking weighted averages of growth
rates for times within the interval.
byIndv4Intvl_GRsDiff Calculates the growth rates for a specified
time interval for individuals in a data.frame in
long format by differencing the values for
a response within the interval.
byIndv4Intvl_ValueCalc Calculates a single value that is a function of
the values of an individual for a response in a
data.frame in long format over a specified
time interval.
byIndv4Intvl_WaterUse Calculates, water use traits (WU, WUR, WUI) over a
specified time interval for each individual in a
data.frame in long format.
byIndv4Times_GRsDiff Adds, to a 'data.frame', the growth rates
calculated for consecutive times for individuals in
a data.frame in long format by differencing
response values.
byIndv4Times_SplinesGRs For a response in a data.frame in long format,
computes, for a single set of smoothing parameters,
smooths of the response, possibly along with
growth rates calculated from the smooths.
byIndv_ValueCalc Applies a function to calculate a single value from
an individual's values for a response in a data.frame in
long format.
smoothSpline Fit a spline to smooth the relationship between a
response and an x in a data.frame,
optionally computing growth rates using derivatives.
probeSmooths For a response in a data.frame in long format, computes and
compares, for sets of smoothing parameters, smooths
of the response, possibly along with growth rates
calculated from the smooths.
(vi) Data frame manipulation
as.smooths.frame Forms a smooths.frame from a data.frame,
ensuring that the correct columns are present.
designFactors Adds the factors and covariates for a blocked,
split-unit design.
getTimesSubset Forms a subset of 'responses' in 'data' that
contains their values for the nominated times.
importExcel Imports an Excel imaging file and allows some
renaming of variables.
is.smooths.frame Tests whether an object is of class smooths.frame.
prepImageData Selects a set variables to be retained in a
data frame of longitudinal data.
smooths.frame Description of a smooths.frame object,
twoLevelOpcreate Creates a data.frame formed by applying, for
each response, a binary operation to the values of
two different treatments.
validSmoothsFrame Checks that an object is a valid smooths.frame.
(vii) General calculations
anom Tests if any values in a vector are anomalous
in being outside specified limits.
calcLagged Replaces the values in a vector with the result
of applying an operation to it and a lagged value.
calcTimes Calculates for a set of times, the time intervals
after an origin time and the position of each
within a time interval
cumulate Calculates the cumulative sum, ignoring the
first element if exclude.1st is TRUE.
GrowthRates Calculates growth rates (AGR, PGR, RGRdiff)
between a pair of values in a vector.
WUI Calculates the Water Use Index (WUI) for a value
of the response and of the water use.
(viii) Principal variates analysis (PVA)
intervalPVA.data.frame Selects a subset of variables using PVA, based on
the observed values within a specified time interval
PVA.data.frame Selects a subset of variables stored in a data.frame
using PVA.
PVA.matrix Selects a subset of variables using PVA based on a
correlation matrix.
rcontrib.data.frame Computes a measure of how correlated each
variable in a set is with the other variable,
conditional on a nominated subset of them.
rcontrib.matrix Computes a measure of how correlated each
variable in a set is with the other variable,
conditional on a nominated subset of them.

Overview

This package can be used to perform a functional analysis of growth data using splines to smooth the trend of individual plant traces over time and then to extract features or tertiarty traits for further analysis. This process is called smoothing and extraction of traits (SET) by Brien et al. (2020), who detail the use of growthPheno for carrying out the method. However, growthPheno now has the two wrapper, or primary, functions traitSmooth and traitExtractFeatures that implement the SET approach. These may be the only functions that are used in that the complete SET process can be carried out using only them. The Tomato vignette illustrates their use for the example presented in Brien et al. (2020).

The function traitSmooth utilizes the secondary functions probeSmooths, plotSmoothsComparison and plotSmoothsMedianDevns and accepts the arguments of the secondary functions. The function probeSmooths utilizes the tertiary functions byIndv4Times_SplinesGRs and byIndv4Times_GRsDiff, which in turn call the function smoothSpline. The function plotSmoothsComparison calls plotDeviationsBoxes. All of these functions play a role in choosing the smoothing method and parameters for a data set.

The primary function traitExtractFeatures uses the secondary functions getTimesSubset and the set of byIndv4Intvl_ functions. These functions are concerned with the extraction of traits that yield a single value for each individual in the data.

Recourse to the secondary and terriary functions may be necessary for special cases. Their use is illustrated in the Rice vignette.

Use vignette("Tomato", package = "growthPheno") or vignette("Rice", package = "growthPheno") to access either of the vignettes.

In addition to functions that implement SET approach, growthPheno also has functions for importing and organizing the data that are generally applicable, although they do have defaults that make them particularly adapted to data from a high-throughput phenotyping facility based on a Lemna-Tec Scananalyzer 3D system.

Data suitable for use with this package consists of columns of data obtained from a set of individuals (e.g. plants, pots, carts, plots or units) over time. There should be a unique identifier for each individual and a time variable, such as Days after Planting (DAP), that contain no repeats for an individual. The combination of the identifier and a time for an individual should be unique to that individual. For imaging data, the individuals may be arranged in a grid of Lanes \times Positions. That is, the minimum set of columns is an individuals, a times and one or more primary trait columns.

Author(s)

Chris Brien [aut, cre] (<https://orcid.org/0000-0003-0581-1817>)

Maintainer: Chris Brien <chris.brien@adelaide.edu.au>

References

Brien, C., Jewell, N., Garnett, T., Watts-Williams, S. J., & Berger, B. (2020). Smoothing and extraction of traits in the growth analysis of noninvasive phenotypic data. Plant Methods, 16, 36. \Sexpr[results=rd]{tools:::Rd_expr_doi("10.1186/s13007-020-00577-6")}.

See Also

dae


growthPheno documentation built on Oct. 24, 2023, 5:08 p.m.