This library provides functionality for processing and transforming experimental data, particularly focused on normalizing and analyzing reagent readouts from Cytometry by time of flight (CyTOF).
It assists in the design of immune assay panels by providing a structured way to find combinations of cell types, stimuli, and reagent readouts that are most informative because they show:
- Robust response
- Wide variance across a patient population
- Low correlation with other selected combinations
The package is organized into the following modules:
filtering.py
: Data filtering and cleaning operationsnormalization.py
: Data normalization functionsprocessing.py
: Core data processing functionscorrelation.py
: Correlation analysis utilities
indices.py
: Index calculation and managementpanels.py
: Panel optimization algorithmspivots.py
: Data pivoting and transformation utilities
io.py
: Input/output operations and file handling
- Filter and clean experimental data
- Remove outliers based on statistical measures
- Normalize values against baseline measurements
- Calculate group statistics and variance metrics
- Panel combination optimization
- Correlation analysis
- Response and variance scoring
- Population-level analysis
# Build the Docker image
make docker-build
# Pull the latest image
docker pull ludflu/i3h-response-and-variance
# Install dependencies
poetry install
# Run tests
make test
The package can be used both as a library and through the command-line interface:
from response_by_variance.etl import filtering, normalization
from response_by_variance.optimize import panels, indices
# Process your data
filtered_data = filtering.filter_data(df, initial_filters)
normalized_data = normalization.normalize_by_basal(filtered_data, basal_filters)
# Optimize panel combinations
optimized_panels = panels.optimize_panels(normalized_data)
Run the test suite with:
make test
- Create a new branch for your feature
- Make your changes
- Run tests to ensure everything works
- Submit a pull request
This work came out of the Immune Atlas Hackathon Team at the The Immune Health Hackathon 2025. Sponsored by:
- The Colton Consortium
- The Institute for Immunology and Immune Health (I3H)
- Penn Institute for Biomedical Informatics
- Seljuq Haider
- Kelvin Koser
- Jen Shi
- Jim Snavely
- Kevin Wang
- Charles Zheng