APPL Data products access and Documentation

 

Automated analyses for APPL experiments are available upon request. Users should supply a file containing the design information prior to running the analysis.

Data access

The finished data set will be in labkey under the APPL folder, under the PI’s name.  (Figure 1)

 

Figure 1.   Labkey download instructions

There are two files compressed in .tar.gz format.  The file name contains the data run and some metadata about the experiment. The .parquets file contains the raw data in columnar format. This format is ideal for rapid analysis of large data. The .parquet file is non-lossy so it contains ALL information included within the raw data.   Most people will want to use the smaller file as it contains first level analytical results that can be used for further analysis. Clicking on the download button allows you to download the file.  On windows machines, the download tarball will land in the downloads directory. We recommend you move this to another directory before extracting the tarball.  There are a number of methods to extract a tarball.  For windows users recommend using 7-Zip (https://7-zip.org/). Note that two extractions will be required. The first extraction unzips the compression (.gz) and the second untars the tarball.  Once extraction is complete, you should have a directory structure as in Figure 2.

 

Graphical user interface, text, application

Description automatically generated

Figure 2. Folder structure

The Folders contain the following information

·        Python_scripts folder:  This folder contains the python code that was used to generate the data products from APPL’s output files and metadata

·        Data_Entry folder: This folder contains the .csv files with the plant information and the the path to the signature file. This is used to ensure that the signatures for each plant are representing the right thing.

·        Design: This folder contains the formatted design file produced by the user for the purposes of running the analysis

·        Data products : Each modality contains a folder. Each folder with the exception of Hyperspectral contains two folders, analysis and signatures.  The hyperspectral folder contains subfolder called SWIR (Short Wave Infrared) and VNIR (Visible and near infrared) that corresponds to the two hyperspectral modalities. Within these subfolders are the signature and analysis folders

·        Analyses: This folder contains the processed result of the modality that it is a subfolder of.  The analysis subfolder contains a series of .png files and .txt files with information about the different comparisons. Note that the software does every possible comparison, without ascertaining whether or not the comparison makes sense. It is up to the end user to determine sense vs nonsense comparisons.

·        Signatures: This file contains the one dimensional signatures of all the data. For each band in the modality, the information is aggegrated and statistics (mean, standard deviation, and percentiles at 2.5%, 25% , 50%, 75%, and 97.4% are calculated. This can be useful for downstream analysis. For plots, only the mean of the signatures is used.

 

Design file format

The design file plays a critical role in structuring data for analysis. It encompasses essential metadata for each plant specimen, for example, genotype and replicate information. These parameters are instrumental in facilitating the grouping of data for subsequent statistical comparisons and analyses.

Text

Description automatically generated with medium confidence

Figure 3. A sample design file

The sample design file is a CSV (Comma-Separated Values) file comprising the following columns:

·        plant_info: Contains comprehensive data for each plant specimen, typically encompassing a combination of genotype and replicate identifier.

·        Genotype: Denotes the genetic constitution or strain of the plant. This column is crucial for categorizing plants based on genetic homology.

·        Replicate: Specifies the individual replicate for each genotype, enabling the experiment to account for intra-genotypic variability.

Note that while the "plant_info" column is obligatory, the "Genotype" and "Replicate" columns are user-defined parameters that can be modified or supplemented as per experimental requirements.

 

Analysis codes in python_scripts

The Python scripts designed to conduct sophisticated statistical analyses, including Tukey's Honest Significant Difference (HSD) test, one-way and two-way Analysis of Variance (ANOVA), Multivariate Analysis of Variance (MANOVA), and Mixed Linear Model analysis. These analytical methods are implemented to generate both quantitative results and visual representations, facilitating a comprehensive and nuanced interpretation of complex datasets. Execution of this code requires the following Python libraries: statsmodels, matplotlib, numpy, and pandas.

The codes process and analyze data from multiple imaging modalities:

·        Fluorcam (analysis_fc.py)

·        Hyperspectral Imaging (analysis_hc.py)

·        Hyperspectral Imaging by empirical line calibration (analysis_elc.py)

·        Thermal Imaging (analysis_ir.py)

·        Multispectral (analysis_msc.py)

·        RGB imagery (analysis_rgb.py)

·        Indices derived from hyperspectral imaging (analysis_indices.py).

Each modality offers unique insights. This Python-based pipeline streamlines the processing, comparison, and visualization of data from these various modalities. Note that MANOVA results are currently available for the Fluorcam dataset, which has the following two dependent variables: Fo (minimal fluorescence) and Fm (maximal fluorescence).

Running the script

To execute the statistical analysis script, open your command line terminal and navigate to the “python_scripts” directory. Then, run the desired analysis script by typing:

python analysis_XXX.py [command-line parameters]

Replace XXX with the corresponding modality (e.g., fc, hc, ir, msc, or rgb). This code is compatible with Windows, macOS, and Linux, ensuring accessibility across various platforms.

Command-line parameters

These parameters are input as command-line arguments during script execution, facilitating customization of the analysis based on user-defined variables.

·        --design_file:

o   Description: Specifies the file path containing experimental design information.

o   Syntax: --design_file [path/to/design.csv]

o   Default: “../design/10.5.2023_CBI.0003_Chen_Poplar.csv”

·        --analysis:

o   Specifies the statistical analysis method to be applied: pairwise comparisons, one-way ANOVA, two-way ANOVA, MANOVA, mixed linear models, or all of them

o   Syntax: --analysis [method]

o   Options: pairwise, one_way_anova, two_way_anova, manova, mixed_lm, all

o   Example: --analysis one_way_anova

o   Default: "all" (Executes all available analytical methods)

·        --temporal:

o   Description: A boolean parameter for enabling or disabling temporal analysis. When activated, data is stratified based on temporal intervals, facilitating the examination of time-dependent patterns and trends.

o   Syntax: --temporal or --no-temporal

o   Default: --no-temporal

·        --interval:

o   Description: Specifies the temporal resolution for temporal analysis. Options include "day", "week", or "month". This parameter functions in conjunction with the --temporal flag to stratify data temporally, allowing for the investigation of phenomena at various time scales.

o   Syntax: --interval [day|week|month]

o   Default: "week"

How to interpret outputs

TukeyHSD outputs

The TukeyHSD analysis results are stored in an output text file, with nomenclature derived from the design file and the specific property analyzed. This section elucidates the file's structure and nomenclature convention.

Nomenclature Convention

The output text file follows this naming format:

[design filename].[design property].txt

·        [design filename]: The root name of the design file utilized in the analysis, excluding the file extension (e.g., .csv).

·        [design property]: The specific property or combination of properties subjected to analysis from the design file (e.g., Genotype, Replicate, or a combination thereof).

For example, if a design file denominated as plant_design.csv with Genotype as the analyzed property, the resultant output file will be:

plant_design.Genotype.txt

In the case of a property combination analysis (e.g., Genotype_Replicate), the file nomenclature will reflect this:

plant_design.Genotype_Replicate.txt

Output file contents and detailed explanation

The output text file encompasses the results of pairwise comparisons utilizing TukeyHSD. Each file conforms to this structure:

Figure 4. TukeyHSD analysis results in text file

The file provides detailed pairwise comparisons between the groups defined by the design properties.

In the TukeyHSD output, each pairwise comparison between groups is represented by several key statistical values. These values facilitate the assessment of statistically significant differences between group means. The results text file will be saved in the "analyses" folder within each modality's corresponding folder. The following is a detailed explanation of each term:

Mean Difference (meandiff)

·        Definition: meandiff represents the arithmetic difference between the mean values of two compared groups, denoted as group1 and group2.

·        Interpretation:

o   A positive meandiff indicates that the mean of group1 exceeds that of group2.

o   A negative meandiff indicates that the mean of group1 is less than that of group2.

o   The magnitude of meandiff quantifies the effect size, but its statistical significance is determined by the p-adj value and confidence interval.

Adjusted p-value (p-adj)

·        Definition: The p-adj (adjusted p-value) represents the probability value for the pairwise comparison, adjusted for multiple comparisons using TukeyHSD method. This adjustment is crucial for controlling the familywise error rate in multiple comparisons.

·        Interpretation:

o   If p-adj < 0.05, the difference between groups is deemed statistically significant, providing strong evidence for differing means.

o   If p-adj ≥ 0.05, the difference is not considered statistically significant, suggesting similar means.

·        Note that the significance level of 0.05 is the conventional threshold, but it can be adjusted based on the specific experimental design and requirements.

Lower and upper bound of confidence interval (lower, upper)

·        Definition: The lower value represents the lower boundary of the 95% confidence interval for the mean difference between group1 and group2. With 95% confidence, the true population mean difference is expected to be greater than or equal to this value.
The upper value represents the upper boundary of the 95% confidence interval for the mean difference between group1 and group2. With 95% confidence, the true population mean difference is expected to be less than or equal to this value.

·        Interpretation: A negative lower bound suggests a potential reversal in the direction of the difference (i.e., group2 might have a higher mean in the population). Conversely, a positive lower bound indicates that the true population difference is likely positive.
The upper bound, in conjunction with the lower bound, delineates the range of plausible values for the true population difference. If both bounds are on the same side of zero (either both positive or both negative), it suggests a likely significant difference between group means in the population.

Reject null hypothesis (reject)

·        Definition: The reject column indicates whether the null hypothesis (which assumes no difference between group means in the population) is rejected. The outcome is binary:

o   True: Null hypothesis is rejected, indicating a statistically significant difference between groups in the population.

o   False: Null hypothesis is not rejected, indicating no statistically significant difference between groups in the population.

·        Interpretation: A True value in the reject column provides strong evidence for differing group means in the population. Conversely, a False value suggests insufficient evidence to conclude a significant difference.

To determine whether a pairwise comparison demonstrates a statistically significant difference:

·        Evaluate the p-adj: A value below the predetermined significance level (typically 0.05) indicates statistical significance.

·        Examine the confidence interval: If both bounds are either positive or negative (i.e., the interval does not include zero), the difference is likely statistically significant.

·        Consult the reject column: A True value confirms statistical significance, while a False value indicates no significant difference in the population.

Interpreting bar charts for TukeyHSD results

Bar charts derived from TukeyHSD test provide a visual representation of pairwise comparisons between group means, elucidating statistically significant inter-group differences.

Figure 5. Bar chart of TukeyHSD test

The plot figures will be saved in the "analyses" folder within each modality's corresponding folder.

Chart component analysis

Essential elements of each bar chart facilitate result interpretation:

·        Error Bars: Horizontal bars depicting confidence intervals around the mean difference between two groups. These intervals delineate the probable range encompassing the true inter-group mean difference.

·        Group Means: Points representing individual group means.

Consider an analysis of reflectance values across diverse imaging conditions:

·        LILB_26-1 vs. Nisq-1: Non-overlapping error bars indicate a statistically significant difference in means (p < 0.05).

·        GW-9898 vs. ILL-101: Overlapping error bars suggest no statistically significant difference in means (p > 0.05).

Data Application Methodology

The bar chart facilitates rapid identification of significantly different groups, enhancing interpretation of TukeyHSD test results. Statistically significant differences may necessitate further investigation into potential causal factors, such as experimental conditions or temporal variables.

Furthermore, the chart provides a quantitative visual representation of inter-group differences. Larger disparities between group means suggest more pronounced effects or condition-dependent variations, warranting closer examination in the context of the experimental design.

ANOVA analyses

Each modality is associated with a dedicated script that executes the appropriate ANOVA or MANOVA analysis. These scripts generate both a textual output file containing statistical results and an optional graphical representation for data visualization purposes.

One-way ANOVA

One-way ANOVA is a statistical method that compares the means of a single dependent variable across multiple groups defined by one independent variable. This technique evaluates whether statistically significant differences exist in quantitative variables (e.g., fluorescence intensity, spectral reflectance, or thermal measurements) among various experimental conditions (such as genotypic variants or biological replicates).

Text

Description automatically generated

Figure 6. Sample One-way ANOVA test result

Figure 6 demonstrates a One-way ANOVA. This statistical method evaluates the effects of independent variables (Genotype, Replicate, and week) on the dependent variable SWIR. The “Genotype” variable shows a statistically significant effect on SWIR (F = 14.58, p = 9.25e-32). In contrast, the “Replicate” variable does not demonstrate a significant effect (F = 1.16, p = 0.32). The “week” variable exhibits a substantial influence on SWIR, as evidenced by a high F-statistic (F = 92.33) and extremely low p-value (p = 3.01e-143), indicating a significant temporal effect.Chart

Description automatically generated

Figure 7. Box plot of the one-way ANOVA test.

The one-way ANOVA visualization presents a boxplot with categorical variables (e.g., Genotype or week) on the y-axis and the continuous dependent variable (e.g., SWIR) on the x-axis. The following elements facilitate interpretation:

·        Boxplot: Each box depicts the distribution of the dependent variable for a specific group. The median is represented by the central line, while the interquartile range (IQR) is delineated by the box edges. Whiskers extend to illustrate the data range, with potential outliers represented as discrete points beyond the whiskers.

·        Stripplot: Superimposed on the boxplot are individual data points for each group, providing a comprehensive view of data distribution. These points undergo slight jittering to enhance visual distinction.

·        Statistical parameters: The plot title incorporates the F-statistic and p-value derived from the one-way ANOVA test. An elevated F-statistic coupled with a p-value below the significance threshold (typically 0.05) indicates statistically significant inter-group differences.

This graphical representation enables quantitative comparison of dependent variable distributions across groups and facilitates assessment of statistical significance based on the ANOVA results.

Two-way ANOVA

Two-way ANOVA is a statistical method that examines the influence of two independent variables on a single dependent variable, while also assessing the interaction between these variables. This technique enables researchers to evaluate whether the interaction between factors (e.g., genotype and replicate) exerts a statistically significant effect on a quantitative variable such as fluorescence intensity or temperature. By simultaneously analyzing multiple factors, Two-Way ANOVA provides a more comprehensive understanding of complex experimental designs compared to simpler statistical methods.

Graphical user interface, text

Description automatically generated with medium confidence

Figure 8. Sample Two-way ANOVA test

Figure 8 illustrates an example two-way ANOVA test. The analysis examines the effects of two independent variables (Genotype, Replicate, and week) on the continuous dependent variable SWIR, as well as their interactions.

·        Genotype and Replicate:

o   Genotype exhibits a statistically significant effect on SWIR (F = 20.66, p = 3.93e-20), indicating substantial variation across genotypes.

o   Replicate demonstrates no statistically significant effect (F = 0.39, p = 0.53).

o   The interaction between Genotype and Replicate lacks statistical significance (F = 1.12, p = 0.24).

·        Genotype and week:

o   Both Genotype (F = 23.01, p = 1.16e-51) and week (F = 111.58, p = 2.50e-166) exhibit highly significant effects on SWIR.

o   The interaction between Genotype and week is statistically significant (F = 1.99, p = 6.37e-09), suggesting temporal variation in Genotype's effect on SWIR.

·        Replicate and week:

o   Replicate shows no statistically significant effect on SWIR (F = 1.64, p = 0.12), whereas week demonstrates a highly significant effect (F = 91.22, p = 6.95e-141).

o   The interaction between Replicate and week is not statistically significant (F = 0.56, p = 0.998), indicating no meaningful combined effect on SWIR.

Genotype and week exhibit strong main effects on SWIR, while Replicate generally does not. Interaction effects vary, with significant interactions observed between Genotype and week. These findings underscore the complex relationships between these variables and their influence on SWIR.

Chart

Description automatically generated

Figure 9. Interaction plot of the two-way ANOVA test

The two-way ANOVA plot is an interaction plot that visually represents the relationship between two independent variables and one dependent variable. This plot utilizes a Cartesian coordinate system to illustrate how the dependent variable (e.g., value) fluctuates across different levels of the first independent variable (Replicate), with distinct lines representing various categories of the second independent variable (week).

This graphical representation complements the numerical output of two-way ANOVA by providing a visual medium for understanding the complex interplay between variables. It allows researchers to intuitively grasp the nature of variable relationships, which can be particularly valuable in hypothesis generation and results interpretation in experimental design.

Multivariate ANOVA (MANOVA)

MANOVA is a statistical technique that simultaneously analyzes multiple dependent variables to assess differences in means across groups. This method is particularly advantageous in hyperspectral imaging applications, where researchers concurrently examine numerous wavelength bands or derived spectral indices. By employing MANOVA, investigators can efficiently detect subtle variations across multidimensional datasets, enhancing the analytical power and interpretability of complex spectral information.

Graphical user interface

Description automatically generated with medium confidence

Figure 10. Sample MANOVA test

The MANOVA results illustrated in Figure 10 assess the multivariate effects of “Genotype”, “Replicate”, and “week” on the dependent variables “Fo” and “Fm”. The following interpretation of key metrics is based on statistical significance (α = 0.05):

·        Intercept:

o   All multivariate tests (Wilks' Lambda, Pillai's Trace, Hotelling-Lawley Trace, Roy's Greatest Root) yield statistically significant results (p < 0.0001), indicating the model's overall goodness of fit.

·        Genotype:

o   Wilks' Lambda = 0.5230, F(df1, df2) = 122.72, p < 0.0001: Genotype exhibits a statistically significant multivariate effect on both “Fo” and “Fm”.

o   Additional multivariate test statistics (Pillai's Trace, Hotelling-Lawley Trace, Roy's Greatest Root) corroborate this finding, suggesting that Genotype variations significantly influence the combined response of Fo and Fm.

·        Replicate:

o   Wilks' Lambda = 0.9797, F(df1, df2) = 6.13, p < 0.0001: Despite a smaller effect size compared to Genotype, Replicate demonstrates a statistically significant impact on the dependent variables.

·        week:

o   Wilks' Lambda = 0.1879, F(df1, df2) = 453.92, p < 0.0001: The week factor exhibits a robust and statistically significant multivariate effect on “Fo” and “Fm”, indicating that temporal variation substantially influences both variables.

In conclusion, “Genotype”, “Replicate”, and “week” all demonstrate statistically significant effects on “Fo” and “Fm”. The magnitude of these effects, as indicated by the F-statistics and Wilks' Lambda values, suggests that “week” has the strongest impact, followed by “Genotype”. The temporal component, represented by the week factor, appears to play a crucial role in explaining the variability of the dependent variables. Further analysis of effect sizes and post-hoc tests may provide additional insights into the specific nature and magnitude of these relationships.

 

Chart

Description automatically generated

Figure 11. A sample pairwise scatter plot for MANOVA test

The MANOVA plot produces a pairwise scatter plot that illustrates the relationships between dependent variables (e.g., “Fo” and “Fm”) across groups defined by the independent variable (e.g., “Genotype”, “Replicate”, or “week”). This graphical representation facilitates the observation of group distributions and potential distinctions based on the dependent variables. The plot's diagonal displays kernel density estimates (KDE) for each variable, providing insights into intra-group distributions. Utilizing color coding (via the hue parameter) enables the visualization of data point clustering or overlap among different groups. This visual representation aids in comprehending multivariate relationships and evaluating the concordance between MANOVA results and observed group differences.

MixedLM

MixedLM is a statistical approach utilized to analyze data with both fixed effects (e.g., genotype) and random effects (e.g., temporal variations or replicates) in hierarchical or repeated measures experimental designs. This sophisticated modeling technique is particularly advantageous for examining datasets comprising multiple measurements per experimental unit (subject or plant) under diverse environmental conditions or treatments.

Graphical user interface

Description automatically generated with medium confidence

Figure 12. A sample MixedLM test result

The MixedLM output elucidates the effects of “Genotype” and “Replicate” on the dependent variable, SWIR, while accounting for group-level variation.

·        Intercept: The model's intercept (0.199) exhibits high statistical significance (p < 0.0001), representing the baseline SWIR value for the reference genotype and replicate group.

·        Genotype Effects: Multiple genotypes demonstrate statistically significant impacts on SWIR:

o   CMBF_28-5 (Coefficient = 0.016, p = 0.018) exhibits a small yet statistically significant positive effect relative to the reference genotype.

o   D-124 (Coefficient = -0.056, p < 0.0001) displays a robust, statistically significant negative effect.

o   Additional genotypes, including GW-9898, ILL-101, and LILB_26-1, also demonstrate significant effects. GW-9898 and LILB_26-1 exhibit positive effects, while ILL-101 shows a negative effect.

o   Certain genotypes, such as 93-968 and Nisq-1, do not exhibit statistically significant differences from the reference genotype (p > 0.05).

·        Replicate Effects: None of the “Replicate” levels demonstrate statistically significant effects on SWIR (all p-values > 0.05), indicating that replicate variation does not substantially contribute to SWIR variability.

·        Group-Level Variation: The group variance (0.002) suggests minimal group-level random effects, indicating a degree of intra-group variability.

In conclusion, the model identifies statistically significant genotype effects on SWIR, while replicate effects are not significant. Specific genotypes (e.g., D-124, GW-9898, ILL-101) demonstrate pronounced effects on SWIR, manifesting either positive or negative influences.

Application

Description automatically generated with medium confidence

Figure 13. Visualization of MixedLM test

The MixedLM plot generated by this procedure integrates both fixed effects and random effects into a single visualization, facilitating the analysis of their respective contributions to the model.

This visualization enables a clear differentiation between the stable, systematic effects captured by the fixed effects and the stochastic variability encapsulated by the random effects, enhancing the interpretability of the mixed linear model.