Computing Lateral Root Length and Density Distribution
Description
Calculation of local lateral root lengths and densities, as well as distances between neighbouring lateral roots according to the distance between the branching point and the parent root base (DBase) using Data Analysis of Root Tracings (DART) output files and RSA data encoded with the Root System Markup Language (RSML). More information can be found in Delory et al (2016).
Usage
1 2 
Arguments
inputrac 
A character string specifying the path to the folder containing the rac files created by DART. This argument could be the same as 
inputrsml 
A character string specifying the path to the folder containing the rsml files. This argument could be the same as 
output 
A character string specifying the type of output that must be returned by the function. Two values are acceptable for this argument: “lrd” and “dtp”. If 
res 
If images were acquired with a flatbed scanner: a numeric value specifying the resolution of the images used to vectorize the root systems (resolution is expressed in dots/inch). If images were acquired with a digital camera: the ratio between the length of a reference object located on the image expressed in pixels and the actual length of the same object expressed in inches. This argument must be specified only if 
unitlength 
A character string specifying the unit of length that must be used by the function to express the results in the final list. The value acceptable for this argument could be either “px” for pixels, “cm” for centimetres or “mm” for millimetres. 
int.length 
A numeric value specifying the interval length (expressed in 
interpol 
A numeric value specifying the number of points that must be used by the function on each mother root to calculate local lateral root lengths and densities. By default, 
rsml.date 
A numeric value that must be specified when 
rsml.connect 
A logical value that must be specified when 
Details
Le Bot et al (2010) presented a free and openaccess software (Data Analysis of Root Tracings  DART) allowing the analysis of complex root system architectures from captured images, particularly across time series. Using this software, a user has to manually identify roots as a set of links. After vectorization of a root system, a final dataset can be exported as a table file (rac file) containing several attributes for each individual root, notably the root length at each observation date and the distance between each branching point to the parent root base (DBase). This R function allows the calculation of either local lateral root lengths and densities or distances between neighbouring lateral roots according to DBase on each mother root constituting a vectorized root system.
The latdist
function will successively locate and read the rac files created by DART and calculate RSA parameters. First, latdist
will check if all arguments have been written in the suitable mode. If res
, interpol
and int.length
are specified, the function will check if the numeric values required by these arguments are positive. If an error occurs for one argument, the code stops and the corresponding error message will be returned by the function. Second, the function will use inputrac
to locate and read the raw rac files created by DART. To run latdist
efficiently, the DART files must have been saved with their appropriate extensions (.rac). Third, depending on the output
value, the function will compute RSA parameters. If output="lrd"
, the function will use interpol
to select the appropriate DBase values for which the calculation of RSA parameters should be performed. Then, a lateral root density and a total lateral root length will be calculated on intervals possessing a length equal to int.length
and centred on each DBase value. If output="dtp"
, only the distances between neighbouring lateral roots on each mother root will be computed by the function.
If RSA data have been encoded with the Root System Markup Language (Lobet et al, 2015), the path to the folder containing the rsml files can be specified using the inputrsml
argument. To run latdist
efficiently, rsml files must have been saved with their appropriate extensions (.rsml). If is.null(inputrsml)=FALSE
, latdist
will check if rsml.date
and rsml.connect
are specified and written in the suitable mode. After reading the rsml files located in inputrsml
, the RSA data associated with one root system in each rsml file will be converted into a data frame possessing the same structure as the rac files created by DART. The latdist
function will then use these data frames to compute lateral root length and density distribution. As some rsml files do not provide connection information between daughter and mother roots, the rsml.connect
argument can be used to connect the lateral roots to their corresponding mother root. If rsml.connect=TRUE
, each point starting a lateral root will be connected to the nearest point located on its mother root. If rsml.connect=FALSE
or rsml.connect=TRUE
, the distance between a branching point and the parent root base (DBase) will be approximated by the distance between the point located on the mother root that is closest to the point starting a lateral root and the parent root base. Using rsml files, only RSA data associated with roots possessing a branching order lower or equal to 5 will be used for the computation of RSA traits.
Value
Returns a list including:
root 
A list of data frames. Each element of the list is named as its corresponding rac/rsml file and contains the following columns: Root (the identification number of each root constituting the vectorized root system in the corresponding rac/rsml file), Ord (the branching order), LatRootNum (the number of lateral roots), FinalRootLength (the root length at the last observation date expressed in 
res 
A list of secondary lists. Each element of the primary list (res) is named as its corresponding rac/rsml file. The secondary lists contain as much elements as roots constituting a vectorized root system. Each element of the secondary lists could be either a If If 
Author(s)
Benjamin M. Delory, Guillaume Lobet, Loic Pages
References
Delory B.M., Baudson C., Brostaux Y., Lobet G., du Jardin P., Pages L., Delaplace P. (2016) archiDART: an R package for the automated computation of plant root architectural traits, Plant and Soil, DOI: 10.1007/s1110401526734.
Le Bot J., Serra V., Fabre J., Draye X., Adamowicz S., Pages L. (2010) DART: a software to analyse root system architecture and development from captured images, Plant and Soil, DOI: 10.1007/s1110400900052.
Lobet G., Pound M.P., Diener J., Pradal C., Draye X., Godin C., Javaux M., Leitner D., Meunier F., Nacry P., Pridmore T.P., Schnepf A. (2015) Root System Markup Language: Toward a Unified Root Architecture Description Language, Plant Physiology, DOI: 10.1104/pp.114.253625.
Examples
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40  ## Importation of an example dataset
data(ch7rac)
## Creation of a folder (DART_latrootdensity) inside a temporary directory to contain the rac
## example datasets created by DART
dirDART < paste(tempdir(), "/DART_latrootdensity", sep="")
dir.create(dirDART)
## Definition of the number of rac files that will be saved inside dirDART
n < 1
## Creation of rac files inside dirDART
for (i in 1:n) {write.table(ch7rac, file=paste(dirDART,"/ch7_",i,".rac", sep=""), row.names=FALSE)}
## Use of latdist to compute RSA parameters from DART output files
## Plotting the results for the primary root
ch7_output_4 < latdist(inputrac=dirDART, output="lrd", res=75, unitlength="cm",
int.length=5)
plot(ch7_output_4$res$ch7_1[[1]]$DBase, ch7_output_4$res$ch7_1[[1]]$LRD, pch=16,
xlab="DBase (cm)",ylab="Lateral root density (roots/cm)", main="LRDinterpol=NULLint.length=5",
las=1, bty="l", xaxp=c(0,90,9))
plot(ch7_output_4$res$ch7_1[[1]]$DBase, ch7_output_4$res$ch7_1[[1]]$LRL, pch=16,
xlab="DBase (cm)",ylab="Lateral root length (cm/cm)", main="LRLinterpol=NULLint.length=5",
las=1, bty="l", xaxp=c(0,90,9))
ch7_output_5 < latdist(inputrac=dirDART, output="lrd", res=75, unitlength="cm",
int.length=5, interpol=1000)
plot(ch7_output_5$res$ch7_1[[1]]$DBase, ch7_output_5$res$ch7_1[[1]]$LRD, pch=16,
xlab="DBase (cm)", ylab="Lateral root density (roots/cm)", main="LRDinterpol=1000int.length=5",
las=1, bty="l", xaxp=c(0,90,9))
plot(ch7_output_5$res$ch7_1[[1]]$DBase, ch7_output_5$res$ch7_1[[1]]$LRL, pch=16,
xlab="DBase (cm)", ylab="Lateral root length (cm/cm)", main="LRLinterpol=1000int.length=5",
las=1, bty="l", xaxp=c(0,90,9))
ch7_output_6 < latdist(inputrac=dirDART, output="dtp", res=75, unitlength="cm")
plot(ch7_output_6$res$ch7_1[[1]]$DBase, ch7_output_6$res$ch7_1[[1]]$DTP, pch=16,
xlab="DBase (cm)", ylab="Distance to the previous root (cm)", main="DTP", las=1, bty="l",
xaxp=c(0,90,9))
unlink(dirDART, recursive=TRUE)
