Computing Growth Rates and XY Plotting of Vectorized Root Systems
Description
Calculation of growth rate matrices and XY plotting of vectorized root systems for selected observation dates using Data Analysis of Root Tracings (DART) output files. In the final plots, the colour code used for each link constituting the vectorized root systems depends on their corresponding growth rate value. More information can be found in Delory et al (2016).
Usage
1 2 3 4 
Arguments
inputlie 
A character string specifying the path to the folder containing the lie files created by DART. This argument could be the same as 
inputtps 
A character string specifying the path to the folder containing the tps files created by DART. This argument could be the same as 
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 both to calculate the growth rate matrices and to scale the X and Y axes of the graphical outputs. The value acceptable for this argument could be either “px” for pixels, “cm” for centimetres or “mm” for millimetres. 
unittime 
A character string specifying the unit of time used to express the data in the tps files created by DART (all character strings are valid for this argument). 
unitangle 
A character string specifying the unit that must be used by the function to express the calculated angles. The value acceptable for this argument could be either “d” for degrees (default value) or “r” for radians. 
rotation 
A numeric value specifying the angle (expressed in 
numdate 
A numeric value or a vector of numeric values specifying the identification number of all the observation dates at which the root system architecture must be plotted (see details). 
finalscale 
A logical value that must be specified when 
coldyn 
A vector specifying the colour(s) that must be used to draw the root system architecture at the selected observation dates. The function will colour each link constituting a vectorized root system depending on its corresponding growth rate value. To do so, 
GRscale 
A numeric vector (length=2) specifying the minimum and the maximum growth rate values (expressed in 
main 
A character string giving a main title for the plot. When 
xlab 
A character string giving a label for the X axis. When 
ylab 
A character string giving a label for the Y axis. When 
xlim 
A numeric vector (length=2) giving the X limits of the plot using the same unit as 
ylim 
A numeric vector (length=2) giving the Y limits of the plot using the same unit as 
... 
Additional graphical parameters (see details) 
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. At the end of the vectorization process, a final dataset can be exported as a table file (lie file) containing several attributes for each point used to construct the links constituting the vectorized root system. A second table file (tps file) containing the root system age at each observation date can also be exported from DART. Using these files created by DART, archigrow
allows the XY plotting of vectorized root systems for selected observation dates with a colour code depending on the growth rate value of each link constituting the vectorized root systems.
The archigrow
function will successively locate and read the lie and tps files created by DART, compute a growth rate matrix and plot the vectorization results at selected observation dates for each analysed root system. First, archigrow
will check if all arguments have been written in the suitable mode. If res
and rotation
are specified, the function will check if the numeric values required by these arguments are positive. If is.null(numdate)=FALSE
, the function will also automatically check if the numeric values in numdate
are positive and sorted by increasing values. 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 inputlie
and inputtps
to locate and read the raw lie and tps files created by DART. To run archigrow
efficiently, DART files must have been saved with their appropriate extensions (.lie or .tps). If inputtps
contains a single tps file, it will be used by archigrow
for each lie file located in inputlie
. If inputps
contains more than one tps file, the number of tps files in inputtps
must be equal to the number of lie files in inputlie
and corresponding lie and tps files must have the same name. If an error occurs at this step, a message will be returned by the function. Third, archigrow
will compute a growth rate matrix containing for each root constituting the vectorized root system its corresponding growth rate value at each observation date. Finally, archigrow
will plot each vectorized root system located in inputlie
at the observation dates specified by numdate
. By default (when is.null(numdate)=TRUE
), only the root system architecture at the last observation date will be plotted. If is.null(numdate)=FALSE
, archigrow
will plot only the root system architecture for the selected observation dates.
Due to technical limitations, it is sometimes easier to take a picture of a root system if it is rotated before image acquisition. In this case, the vectorized root system will depict a rotation compared with the natural plant root system. To make a correction, one can use rotation
to specify an angle value expressed in unitangle
that will be used by the function to rotate the vectorized root system clockwise before plotting and root system architecture parameters calculation.
Additional graphical parameters can also be used to personalize the graphical outputs (see par
). By default, a legend showing the colour gradient used to draw each vectorized root system is shown at the right side of the final plot.
Growth rates are calculated as follows:
For the first observation date, it is calculated as the ratio of the root length to the root system age.
For other observation dates (t), it is calculated as the difference between the root length at time t and t1 divided by the difference between the root system age at time t and t1.
Value
Returns the computed growth rate matrices in a list of data frames. Each element of the list is named as its corresponding lie file and contains the following columns: Root (the identification number of each root constituting a vectorized root system), GR.DateX (the calculated growth rate value of a single root at the observation date X expressed in unitlength
/unittime
).
Returns a XY plot for each vectorized root system located in inputlie
.
Author(s)
Benjamin M. Delory, Caroline Baudson, Yves Brostaux, Loic Pages, Patrick du Jardin, Pierre Delaplace
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.
See Also
par
.
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  ## Importation of example datasets
data(ch7lie)
data(ch7tps)
## Creation of a folder (DART_archigrow) inside a temporary directory to contain the lie and tps
## example datasets created by DART
dirDART < paste(tempdir(), "/DART_archigrow", sep="")
dir.create(dirDART)
## Definition of the number of lie and tps files that will be saved inside dirDART
n < 1
## Creation of lie and tps files inside dirDART
for (i in 1:n) {
write.table(ch7lie, file=paste(dirDART,"/ch7_",i,".lie", sep=""), row.names=FALSE)
write.table(ch7tps, file=paste(dirDART,"/ch7_",i,".tps", sep=""), row.names=FALSE)}
## Use of archigrow to plot the root system architecture for selected observation dates
## Use the same X and Yaxis scales to that used for the last observation date
ch7_output_1 < archigrow(inputlie=dirDART, inputtps=dirDART, res=75, unitlength="cm",
unittime="day", coldyn=c("blue", "orange", "red"), numdate=c(15,30), finalscale=TRUE,
las=1, bty="l", asp=1, xaxp=c(0,30,3), lwd=2)
unlink(dirDART, recursive=TRUE)
