Software for automation of instrument for automated detection of bloodborne pathogens. Developed as a part of the UW Lutz lab. Project in press for publication.
This repository contains scripts for operating an integrated diagnostic device and performing post-processing analysis of experimental data.
The workflow includes:
- Device control and experiment execution (motor control, thermal cycling, amplification)
- Data parsing and preprocessing
- Timing and system performance analysis
- Fluorescence signal processing (FAM/TEX)
- Detection time and SNR calculations
- Automated plotting and export of results
Integrated Device Manuscript Final Scripts/
├── Device Amplification Processing.py # Master script to run full analysis pipeline
├── 251013_Amplification_.py # ODrive device control + experiment execution
├── 251023_Amplification_.ino # Microcontroller / firmware code
├── Data Analysis Post-Processing/
│ ├── 1_Setup.py # Load raw data and initialize environment
│ ├── 2_Data_Process.py # Clean and organize data by wells and channels
│ ├── 3_Timing.py # Extract timing events (heating, amplification)
│ ├── 4_temperature_position_graphs.py # Temperature + motion visualization
│ ├── 5_Fluorescence.py # Fluorescence processing + filtering + fitting
│ ├── 6_Liftoff_Time.py # Detection time + SNR analysis
│ ├── 7_Save.py # Save figures and export data
├── *.csv # Example output data
└── venv/ # Python virtual environment (optional)
python Device\ Amplification\ Processing.py%run -i 1_Setup.py
%run -i 2_Data_Process.py
%run -i 3_Timing.py
%run -i 4_temperature_position_graphs.py
%run -i 5_Fluorescence.py
%run -i 6_Liftoff_Time.py
%run -i 7_Save.py- Select raw .txt data file via GUI
- Parses header and loads into a DataFrame
- Initializes output directories
- Converts timestamps to elapsed time (minutes)
- Computes well position and deviation
- Splits data into FAM and TEX channels
- Identifies key experimental events:
- Start of run
- Reach 50°C
- Reach 65°C
- Computes timing intervals and exports CSV
- Generates plots for:
- Temperature profiles
- Heating behavior
- Position tracking
- System status
- Processes fluorescence signals:
- Raw and filtered FAM/TEX
- Outlier removal
- Signal smoothing
- Fits amplification curves (4-parameter logistic model)
- Computes detection time (real-time call)
- Calculates SNR metrics
- Outputs detection summary and rolling averages
- Saves:
- Figures (PNG + PDF)
- Processed datasets
- Fluorescence tables
Generated in: Output_Analysis/_/
Includes:
- Figures (PNG + PDF)
- Timing results CSV
- Fluorescence data CSV
- Detection + SNR summary
- Rolling averages
Install required packages:
pip install pandas numpy matplotlib seaborn scipy tkinter openpyxl- Scripts rely on shared variables, so execution order matters
- Designed for interactive use (Jupyter/IPython recommended)
- Raw data must match expected column format
This codebase supports development of an integrated molecular diagnostic system combining:
- Thermal control
- Disk-based fluidics
- Optical fluorescence detection
- Automated data analysis