Skip to content

This repo is intended to hold code and results pertaining to the raman hackathon carried out by the discovery team at the discovery offsite in March 2024.

License

Notifications You must be signed in to change notification settings

Arcadia-Science/2024-disco-raman-hackathon

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

87 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

2024-disco-raman-hackathon

run with conda Arcadia Pub

Purpose

This repository contains code and results pertaining to the Raman hackathon carried out by the Discovery team at the Discovery offsite in March 2024. It accompanies the pub "Raman spectroscopy enables rapid and inexpensive exploration of biology".

Installation and Setup

This repository uses conda to manage software environments and installations. You can find operating system-specific instructions for installing miniconda here. After installing conda and mamba, run the following commands to create the pipeline run environment.

mamba env create -n disco-raman --file envs/dev.yml
conda activate disco-raman

Some R packages are not installable through conda. For these, please run:

Rscript envs/install_r_packages.R

Data

The contents and organization of the data used in the analyses for the pub are described in data.

Overview

Description of the folder structure

This repository is organized into the following top-level directories.

  • code: collection of R and Python scripts used for the analysis described in the pub as well as for generating the figures.
  • data: subdirectories of spectral data recorded as csv files.
  • envs: YAML file including the packages and dependencies used for creating the conda environment.
  • notebooks: a Jupyter notebook written in Python for generating Figure 2 of the pub.
  • resources: a csv file containing the list of parts used to construct the Raman spectrometer.
  • results: collection of output files used for the analysis described in the pub as well as for generating the figures.

Preview of contents within each directory.

─ code
  ├── beer_spectra_analysis.R
  ├── chili_seed_spectra_analysis.R
  ├── plot_raw_spectra.py
  ├── raman-cluster-functions.R
  ├── raman-cluster-plot.R
  └── raman_prediction_functions.R
─ data
  ├── README.md
  ├── algae
  ├── beer
  ├── peppers_flesh
  └── peppers_seeds
─ envs
  └── dev.yml
─ notebooks
  └── Fig-2_Raw-Spectra.ipynb
─ resources
  ├── README.md
  └── OpenRaman_parts_list.csv
─ results
  ├── Fig-2_panel-A.svg
  ├── Fig-2_panel-B.svg
  ├── Fig-2_panel-C.svg
  ├── beer
  └── peppers

Methods

Below is a brief, stepwise overview of how to generate each figure in the pub (and in doing so perform each corresponding analysis). The outputs are stored in the results/ directory.

  1. Generate Figure 2 (visualization of raw spectra) by running notebooks/Fig-2_Raw-Spectra.ipynb.
  2. Generate Figure 3 (spectral clustering of samples via PCA and LDA) by running Rscript code/raman-cluster-plot.R from the root of the repository.
  3. Generate Figure 4 (local importance and contribution of spectra in predicting alcohol content) by running Rscript code/beer_spectra_analysis.R from the root of the repository.
  4. Generate Figure 5 (local importance and contribution of spectra in predicting perceived heat) by running Rscript code/chili_seed_spectra_analysis.R from the root of the repository.

Compute Specifications

The OpenRAMAN spectrometer was connected to a HP 255 G8 Notebook PC running Windows 10. All of the analysis was done on Apple MacBook Pro computers running macOS Sonoma.

Contributing

See how we recognize feedback and contributions to our code.

About

This repo is intended to hold code and results pertaining to the raman hackathon carried out by the discovery team at the discovery offsite in March 2024.

Resources

License

Stars

Watchers

Forks

Packages

No packages published