Skip to content

briencj/growthPheno

Repository files navigation

growthPheno

Project Status: Active:  The project has reached a stable, usable state and is being actively developed. minimal R version CRAN_Status_Badge packageversion Last-changedate Licence Downloads

growthPheno is an R package that collects together functions that can be used to perform functional analyses of phenotypic growth data to smooth and extract traits, as described by Brien et al. (2020). Many of the functions can be applied to longitudinal data in general.

An overview can be obtained using ?growthPheno. .

More information

Two vignettes, Tomato and Rice, illustrate the process for smoothing and extraction of traits (SET), the former being the example presented in Brien et al. (2020). Use vignette("Tomato", package = "growthPheno") or vignette("Rice", package = "growthPheno") to access either of the vignettes.

Installing the package

From a repository using drat

Windows binaries and source tarballs of the latest version of growthPheno are available for installation from my repository. Installation instructions are available there.

Directly from GitHub

growthPheno is an R package available on GitHub, so it can be installed from the RStudio console or an R command line session using the devtools command install_github. First, make sure devtools is installed, which, if you do not have it, can be done as follows:

install.packages("devtools")

Next, install growthPheno from GitHub by entering:

devtools::install_github("briencj/growthPheno").

The version of the package on CRAN (see CRAN badge above) and its dependencies can be installed using:

install.packages("growthPheno")

If you have not previously installed growthPheno then you may need to install it dependencies:

install.packages(c("dae","GGally","ggplot2","grDevices","Hmisc","JOPS","methods","RColorBrewer","readxl","reshape","stringi"))

What is does

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 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.

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 have a single value for each individual in the data.

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.

The full set of functions falls into the following natural groupings:

(i) Wrapper functions

(ii) Data

(iii) Plots

(iv) Smoothing and calculation of growth rates and water use traits for each individual

(v) Data frame manipulation

(vi) General calculations

(vii) Principal variates analysis (PVA)

What it needs

It imports dae, GGally, ggplot2, grDevices, Hmisc, JOPS, methods, RColorBrewer, readxl, reshape, stats, stringi, utils.

License

The growthPheno package is distributed under the GPL (>= 2) licence.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Languages