This project is a part of the New Mexico State (NMSU) Chile Pepper Institute's (CPI) research program, and is built in R to understand underlying relationships between stress and capsaicin content in New Mexico.
🌶️
CPI Homepage
·
Chile Breeding Program
Table of Contents
We are looking at plant porometry, fluorometry, plant yield/maturity, and environmental factor data to gain better insight into the scoville heat unit (SHU) in new mexican chile peppers. The goal is to understand how SHU is affected by looking at the following:
- Environmental data such as weather and altitude
- The plants stress response (taken using LICOR LI600)
- The quality of yield - fruit weight, color, fruit maturity, yield quantity.
Understanding these relationships will better aid farmers and researchers in all of their spicy endeavors, whether it be breeding the worlds hottest pepper, or simply maintaining a constant heat level in their harvest.
This project is fairly contained, with minimal setup. However, due to the proprietary nature of the data, the data is not stored on github. The instructions for NMSU CPI researchers data access is described below.
The code is entirely based in R, using SQL to query environmental data.
- Editor Used: RStudio version 2023.12.1
- R Version: R version 4.3.3
Below are the instructions to setup up and run the project locally:
- Clone the repo
git clone https://github.com/lilynorthcutt/licorAnalysis.git
- Request access to the LICOR project through Dr. Dennis Lozada.
- Navigate to the files in the LICOR project and copy the
Data
folder - Paste the
Data
folder into the main directory of the project
⚠️ Do not change the file names withinData
: The code is dependent on the filenames remaining the same!
Depending on your need for the code, how you will run it will vary. Here are some possible use cases:
- Visualizing Data in App: To run the RShiny application and view the data, graphs, and analysis without
interacting with the code, navigate to the
app
folder, selectui.R
,server.R
, orglobal.R
, and pressRun App
. You should now be able to play around with the interactive visualizations. - Contributing to Code: To add/modify how the data is read in, cleaning/wrangling, feature engineering or anything similar, access the
preprocessing.R
file. To edit the training process, add models, change parameters, or anything similar, access thetraining.R
file. To modify/edit the model evaluation or anything similar, access theresults.R
file. Themain.R
file runs everything together, and the files in the RShiny app are found in theapp
folder. Finally, many functions that are used throughout the files previously mentioned can be found in thefuncs.R
file. - Updating in Real-Time (not currently implemented): We would like to have the code setup such that we can directly input data collected the same day, and view results. This feature is not currently implemented.
Much of the LICOR data used in this project is proprietary and belongs to NMSU, if access is granted, researcher must add the data locally to run the code.
This project uses four data sources:
- Porometry/Fluorometry Data: Using LI-COR LI-600 data, such as stomatal conductance, transpiration, leaf vapor pressure, fluorescence, etc. is collected. A full data dictionary of LI-600 output can be found here. Data was collected at 2 different locations on 3 separate days for 20 genotypes for 3 replications. _Additional information is located in the powerpoint found under
Project Overview and Status/LICOR Project Overview.pptx
. - Scoville Heat Unit (SHU) Data: Peppers from 5 different plants in each replication for each genotype at both locations are sampled, dried, ground, and assessed by high-performance liquid chromatography (HPLC) to quantitatively measure SHU.
- Harvest Data: At the time of harvesting mature fruit, additional data is taken by researchers. This includes number of plants harvested, harvest date, yield (mature vs. non-mature), and pod weight.
- Environmental Data: Weather data and environmental factors are our fourth and final data source. The data is queried using the National Weather Service's API, more information can be found here.
Thank you to the folks on the Spicy Team at NMSU CPI for their diligent and thorough assistance in collecting and preparing data for this project. Without their contributions this project would not be possible.