Skip to content

feat: Cytiva Biacore T200 Evaluation -- Update parser to extract kinetics data (kd, ka, RMax, chi-squared, errors)#1183

Merged
nathan-stender merged 13 commits into
mainfrom
jleinas-biacore-evaluation-kinetics
Apr 22, 2026
Merged

feat: Cytiva Biacore T200 Evaluation -- Update parser to extract kinetics data (kd, ka, RMax, chi-squared, errors)#1183
nathan-stender merged 13 commits into
mainfrom
jleinas-biacore-evaluation-kinetics

Conversation

@james-leinas

Copy link
Copy Markdown
Collaborator

Update parser to extract kinetics data (kd, ka, RMax, chi-squared, errors)

Co-Authored-By: Claude Sonnet 4.5 noreply@anthropic.com

james-leinas and others added 10 commits April 10, 2026 09:55
Allow measurements to have multiple processed data documents when both kinetics and affinity models are present. This enables proper representation of files where both 1:1 binding kinetics and steady state affinity analyses are performed on the same data.

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Updated Cytiva Biacore T200 Control and T200 Evaluation parsers to work with
the new binding_affinity_analyzer schema that uses list[ProcessedData] instead
of individual processed data fields on Measurement.

Changes to T200 Control:
- Added ProcessedData import
- Wrap report points in a ProcessedData object (required by new schema where
  report points are nested inside processed data documents)
- Create empty ProcessedData with model_name="N/A" when report points exist

Changes to T200 Evaluation:
- Added ProcessedData import
- Extract kinetic parameters (kon, koff, kd, rmax) into variables
- Create ProcessedData object with kinetic parameters and custom info
- Pass processed_data=[ProcessedData(...)] instead of individual fields

This maintains backward compatibility while supporting the enhanced schema
that allows multiple analysis models per measurement (e.g., both kinetics
and affinity models in Cytiva Biacore Insight).

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Updated EvaluationKinetics.get_data() to return list[KineticsData] instead of
a single KineticsData object. This aligns with the internal storage (_data)
which already stores lists of KineticsData (to support multiple analysis models
like both kinetics and affinity in the same measurement).

This fixes a type mismatch where get_data was returning the wrong type, and
enables proper support for measurements with multiple analysis models.

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
…ture

Updated test expected outputs to reflect the new schema structure where
kinetic analysis data is wrapped in ProcessedData objects within processed
data aggregate documents.

Changes:
- Added processed data aggregate document containing ProcessedData with:
  - model_name extracted from kinetic data
  - Kinetic parameters (kon, koff, kd, rmax)
  - Custom info (kinetics chi squared, ka/kd/Rmax errors)

All T200 Evaluation tests passing (1/1).

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
…calculated concentration

Updated test expected outputs to include changes from main branch:
- Dynamic extraction of Analyte 1-N columns (from PR #1171)
- Calculated concentration support (from PR #1172)
- Support for multiple ProcessedData documents (kinetics + affinity models)

Changes include:
- Multiple Analyte fields (Analyte 2, Analyte 3) in device control and sample custom info
- Multiple Regeneration fields (Regeneration 2, Regeneration 3)
- Two processed data documents per measurement when both models exist:
  1. 1:1 binding kinetics model with kon, koff, KD, Rmax
  2. Steady state affinity model with KD, Rmax, offset
- Test data masking updates (sensor chip ID, lot number, solution names)

All Insight tests passing (4/4).

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
… kinetics extraction

Extends kinetic analysis extraction to handle the newer "Fits/Fit0" structure in addition to the legacy "modelFits" format. Also extracts actual flow cell IDs from CurveSet CurveName fields to ensure accurate data mapping.

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Apply code formatting fixes to kinetics extraction logic and update test file identifiers to match actual filenames.

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
…luation files

- Add support for extracting KD (equilibrium dissociation constant) and Rmax (maximum binding capacity) from steady-state affinity analysis
- Add error fields for KD and Rmax to custom information document
- Enhance CalculatedValue class to support error values
- Update decoder to handle affinity analysis parameter format (0:KD|value|error)
- Add new test file: biacore_evaluation_module_example4.bme (affinity analysis)
- Update existing test outputs to include newly extracted KD error and Rmax error fields

Data now captured for affinity analysis:
- KD (equilibrium dissociation constant) in M
- KD error in M
- Rmax (maximum binding capacity) in RU
- Rmax error in RU
- Chi-squared (fit quality)

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
@james-leinas
james-leinas requested review from a team and slopez-b as code owners April 17, 2026 00:54
@james-leinas james-leinas changed the title feat: Biacore T200 Evaluation -- Update parser to extract kinetics data (kd, ka, RMax, chi-squared, errors) feat: Cytiva Biacore T200 Evaluation -- Update parser to extract kinetics data (kd, ka, RMax, chi-squared, errors) Apr 17, 2026
nathan-stender and others added 3 commits April 21, 2026 19:26
Resolve conflicts from the schema model refactor (MeasurementDocument →
MeasurementDocumentItem, field casing changes). Fix missing
TQuantityValueSquareResponseUnit by using TQuantityValue directly.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
kinetic_data is always a KineticResult dataclass, never a dict, so the
isinstance check was always False and model_name was always "N/A".

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@nathan-stender
nathan-stender merged commit 0076cc4 into main Apr 22, 2026
9 checks passed
@nathan-stender
nathan-stender deleted the jleinas-biacore-evaluation-kinetics branch April 22, 2026 04:34
nathan-stender added a commit that referenced this pull request Apr 22, 2026
### Added

- Cytiva Biacore T200 Evaluation -- Update parser to extract kinetics
data (kd, ka, RMax, chi-squared, errors) (#1183)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants