Diagnostics data engineering — molecular TB testing (GeneXpert MTB/RIF)

GeneXpert MTB/RIF results ETL and pooled-testing analytics

turn messy, multi-encoding instrument exports into one clean, analysis-ready result set

A GeneXpert instrument beside its results software — the raw exports behind the ETL pipeline.
The GeneXpert instrument and its results software — roughly 1,700 raw files per run turned into one clean result table.

GeneXpert molecular testing machines across seventeen Cameroon laboratories export raw CSV result files that vary by language and character encoding, feeding several TB research studies and a diagnostic-efficiency manuscript.

The problem

Raw exports varied by machine language (English/French) and encoding (UTF-16-LE, UTF-8-SIG, windows-1252, latin-1), study IDs were malformed or hand-typed, pooled testing produced duplicate sample records, and tests spanning midnight produced invalid negative durations.

What I did

I built a high-performance parser with a BOM-plus-chardet encoding cascade and a process-pool that auto-switches to streaming above ten thousand files, then a cleaning layer that applies 200+ French→English mappings, extracts study IDs by project-specific regex, corrects datetime rollovers, and resolves pooled cartridges back to individual specimens.

1,721 files
Parsed per scheduled run
133,556 rows
Consolidated result set
17 labs
Laboratories consolidated
77.5 / 84.3 min
Median time-to-result (pos/neg)
ETL pipelineGeneXpert / TB diagnosticsencoding detectionPython / Polarspooled testingbiostatistics
Result

A single automated run consolidates 1,721 raw machine exports into a 133,556-row analysis-ready dataset, and a pooled-testing analysis across 14,404 pools quantified where pooling saves cartridges without missing cases.

LET'S TALK

Ready to get started?

Tell me about your project, question or goal. I reply within 24 hours, in English or French.

Get in touch