Experiment tracking & LIMS/ELN runbook
Actionable runbook for linking experimental runs, instruments, LIMS, and ELN records. Includes a recommended metadata schema, data contract examples, synchronization patterns, conflict-resolution rules, verification checks, audit validations, an implementation checklist, and testing and monitoring guidance to preserve provenance and reproducibility.
Purpose
This runbook describes practical patterns, data contracts, synchronization recipes, and validation checks to link experimental runs, instrumentation outputs, LIMS records, and ELN entries into a single source of experimental truth. Use it to automate metadata capture, preserve provenance, and make experiment results auditable and reproducible.
Scope
Applies to integrations between instruments, middleware, Laboratory Information Management Systems (LIMS), and Electronic Lab Notebooks (ELN). Covers metadata design, instrumentation data flows, synchronization approaches, conflict resolution, verification checks, audit trail validation, and rollout/testing guidance. It does not prescribe vendor-specific APIs but gives reusable patterns and examples.
Key Hungers
- Capture complete provenance for every experiment so results are auditable and reproducible.
- Automate metadata capture so human error and missing fields are minimized.
- Establish clear authoritative sources and conflict-resolution rules to avoid divergent records.
Roles & Responsibilities
- Lab owner / PI: Define provenance requirements and approve authoritative sources.
- Lab manager: Oversee rollout, training, and local reconciliation workflows.
- Instrument custodian: Ensure instruments are configured to emit required metadata and participate in validation testing.
- Integration engineer: Implement adapters, middleware, and API mappings; create data-contract manifests.
- Data steward: Own metadata schema, mapping manifests, and validation rules.
Recommended Experiment Metadata Schema (minimum required fields)
Design the schema so it is compact, machine-validated, and extensible. Below are recommended fields to capture for each experimental run.
- experiment_id (string, globally unique)
- lab_id (string)
- project_id / study_id (string)
- title / description (string)
- principal_investigator / owner (string, person id)
- operator / performed_by (string, person id)
- start_time, end_time (ISO8601 timestamps)
- protocol_id & protocol_version (string)
- sample_ids (array of sample identifiers tied to LIMS)
- instrument_id / instrument_serial (string)
- instrument_settings (structured object or link to settings file)
- raw_data_links (array of URIs; include checksums & sizes)
- derived_data_links (array of URIs; analysis pipeline version)
- quality_flags / qc_status (enum)
- provenance_chain (ordered list of event ids or links; see audit trail)
- change_history (compact list of edits: who, when, why)
- digital_signatures / approvals (structured)
Example JSON fragment (store as canonical data-contract in mapping manifests)
{
"experiment_id": "EXP-2026-00123",
"project_id": "PRJ-42",
"start_time": "2026-08-15T09:12:00Z",
"end_time": "2026-08-15T11:05:00Z",
"instrument": {"id": "INS-RT-qPCR-01","serial": "SN12345"},
"sample_ids": ["SMP-1001","SMP-1002"],
"raw_data_links": [{"uri": "s3://labdata/EXP-2026-00123/raw1.dat","sha256": "..."}],
"provenance_chain": ["evt-987","evt-988"]
}
Instrument-to-ELN/LIMS Data Flow Patterns
Select a pattern that matches your operational constraints; many labs use a hybrid approach.
- Instrument → Middleware → LIMS/ELN (Event-driven)
Instruments emit events or files to a middleware layer (edge agent). Middleware enriches messages with sample and run context, validates against the metadata schema, and posts to LIMS/ELN via API. Advantage: real-time capture, centralized enrichment, and consistent validation.
- Instrument → Shared Storage + Periodic Sync
Instrument writes raw files and a metadata sidecar to shared storage (NAS/S3). A synchronization job ingests new files, validates metadata, and creates/updates LIMS/ELN records. Advantage: simple for legacy instruments; avoid heavy real-time dependencies.
- ELN-driven Run Creation with Instrument Attachments
Operator creates run in ELN (or LIMS) first; instrument outputs are then attached to that canonical run (via barcode/sample-id). This pattern makes ELN/LIMS authoritative but requires discipline on run creation.
- Hybrid (Authoritative LIMS + Instrument Events)
Use LIMS as the authoritative source for sample and project relationships; allow instrument events to append raw data and runtime metadata, but use reconciliation rules to align entities.
Synchronization & Conflict Resolution Rules
Conflicts will occur. Define deterministic rules and a reconciliation workflow.
- Authoritative source: explicitly declare which system owns which fields (e.g., LIMS owns sample IDs and sample metadata; ELN owns experimental narrative; instrument emits instrument_settings and raw data pointers).
- Versioning and timestamps: every record update must include source_id, source_version, and an ISO8601 timestamp. Use optimistic merge when versions differ—do not silently overwrite without source priority rules.
- Merge strategy: field-level merges where safe (append-only lists, links); otherwise prefer the authoritative source or require manual reconciliation for critical fields.
- Conflict resolution workflow: auto-tag conflicting records, notify data steward and operator, and provide a reconciliation UI where differences are shown side-by-side with the history and suggested resolution.
- Last-writer-wins is acceptable only when updates include reliable monotonic timestamps and the source priority is defined; avoid LWW for provenance fields.
Verification Checks and Audit Trail Validations
Automated checks should run at ingest and synchronously where feasible.
- Schema validation: validate required fields, types, enumerations, and references to LIMS sample IDs.
- Referential integrity: ensure sample_ids and protocol_id exist in LIMS before finalizing an experiment record.
- File integrity: validate file checksums (sha256) and file sizes on ingest; reject or quarantine mismatches.
- Provenance completeness: each experiment must have a provenance_chain entry showing creation, instrument events, analysis pipeline runs, and approvals.
- Audit trail immutability: preserve an append-only event log (event id, actor, action, timestamp, before/after snapshot). Store or export logs so they can be verified independently.
- Digital signing: where compliance requires it, include digital signatures or signed manifest files for critical events (approvals, finalization).
Implementation Checklist
- Define authoritative sources and map each metadata field to an owning system.
- Create a canonical metadata JSON schema and publish a versioned data-contract manifest.
- Implement instrument adapters / edge agents to emit metadata with sample context.
- Implement middleware validation and enrichment (barcode to sample lookup, timestamp normalization).
- Implement API integrations that respect field ownership and versioning semantics.
- Build conflict tagging and reconciliation workflows; define SLA for manual resolutions.
- Create automated verification checks (schema, referential integrity, checksums, provenance completeness) and a monitoring dashboard for failures.
- Run pilot integrations with a small set of instruments and experiments; iterate mapping and validation rules.
- Train operators and custodians on new run creation and reconciliation processes.
Testing Plan
- Unit tests for schema validation and adapter logic.
- Integration tests that simulate instrument events, file uploads, and API calls; include intentional corruption cases to verify quarantining.
- User acceptance testing for reconciliation UI and operator workflows.
- Regression tests when schemas or mappings change (automate where possible).
Monitoring & KPIs
- % of experimental runs with complete required metadata at time of finalization.
- Average time to reconcile conflicts.
- Number of quarantined files due to checksum failures per week.
- Latency between instrument event and record appearing in LIMS/ELN.
- Provenance completeness score (automated check: pass/fail or graded).
Templates & Artifacts to Create
- Versioned data-contract manifest (canonical JSON schema + field ownership mapping).
- Instrument adapter spec (events, sidecar metadata format, authentication).
- Reconciliation UI spec and example workflow (screenshots or mockups).
- Validation & monitoring playbook (alerts, runbook for common errors).
Security, Compliance & Privacy Notes
Ensure access controls map to roles (who can edit experiment metadata, who can finalize). Encrypt sensitive payloads in transit and at rest. Retain audit trails to meet regulatory retention policies. Avoid storing personally identifying information in experiment metadata unless required; use person identifiers mapped to directory services instead.
Common Pitfalls & How to Avoid Them
- Missing sample linkage: require sample_id at ingest or refuse finalization.
- Loose assumptions about timestamps: normalize to UTC and require source_timestamp + ingest_timestamp.
- Over-reliance on last-writer-wins: prefer authoritative ownership and reconciliation UI for critical fields.
- Ignoring file integrity: always record and validate checksums.
Next Steps / Rollout Recommendations
- Publish the canonical metadata schema and field-ownership map.
- Run a short pilot on a single instrument class and one ELN/LIMS integration.
- Iterate mappings and automation based on pilot findings, then expand scope incrementally.
- Bundle mapping manifests, adapter templates, and validation checks into a reusable toolkit for other teams.
Appendix: Quick Reference — Minimal Required Fields for Finalization
Before an experiment is marked finalized (or archived), ensure these fields are present and validated: experiment_id, project_id, start_time, operator, sample_ids (or LIMS link), instrument_id, at least one raw_data_link with checksum, provenance_chain entry, and qc_status.
Discussion
Comments and conversation will live here.