BTGenZ
Research challenges & engineering decisions

Challenges in building an integrated computational PCR analysis system

Joining eleven analyses into one system is mostly a matter of respecting what each one assumes. These are ten problems that shaped the design, each set out as the problem, why it matters scientifically, the engineering approach and the evidence for the outcome.

Scope. The outcomes below are drawn from the project's acceptance run and its recorded outputs. Source code and internal configuration are not described.

1. Integrating multiple independent scientific engines

Problem

Primer design, thermodynamics, multiplex optimisation, alignment, clustering and quantification each rest on different models. Joining them naively would force one model's assumptions onto another.

Why it matters scientifically

A mistake in the hand-off between engines is invisible in each engine's own output but changes the final conclusion.

Engineering approach

Each module keeps its own logic, parameters and report. A workflow assessment layer chooses applicable modules, assigns files and orders execution, and a consolidation step collects the results.

Verification or outcome

In the acceptance project all eleven workflows were assessed, ordered and executed in one project, and each returned its own status and QC outcome.

2. Handling heterogeneous biological input files

Problem

A single project can contain FASTA, FASTQ, BED, CSV, vendor exports, a raster image, a binary trace and free-text parameters, often with inconsistent names.

Why it matters scientifically

If a file is misread or assigned to the wrong analysis, the result is wrong without any error message.

Engineering approach

Files are identified by content, given a role, checksummed and validated before use, instead of relying on file names.

Verification or outcome

50 files in 11 detected formats were ingested in the acceptance project, and all 50 validated with a role assigned.

3. Sequence validation and normalisation

Problem

Templates arrive with ambiguous characters, mixed case, line breaks and coordinates defined in different conventions.

Why it matters scientifically

Design depends on exact positions. A one-base coordinate shift moves a primer or an SNP.

Engineering approach

Sequences are validated and normalised into a clean working copy, and coordinate conventions are kept explicit. The acceptance project supplied the same region as a 0-based BED row (150 to 420) and a 1-based CSV row (151 to 420).

Verification or outcome

The targeted amplicon workflow completed with three regions covered by six amplicons.

4. Primer compatibility and thermodynamic evaluation

Problem

A primer can look good on its own and still form hairpins, dimers or unstable 3′ ends.

Why it matters scientifically

These interactions decide whether an assay works at the bench, and they depend on temperature and the model used.

Engineering approach

All candidates are profiled with a nearest-neighbour model (SantaLucia, 1998), with hairpin, dimer and 3′-terminal stability evaluated together with Tm and GC.

Verification or outcome

30 oligonucleotides were profiled in the multiplex acceptance project.

5. Multiplex primer cross-interaction analysis

Problem

Every primer in a panel can interact with every other, and the number of possible primer combinations grows quickly.

Why it matters scientifically

A cross-dimer between two primers can suppress a whole target.

Engineering approach

An N × N heterodimer matrix, Tm harmonisation to a span of 3.0 °C or less, an amplicon separation rule of at least 30 bp, virtual PCR cross-target screening, and pruning of the combinatorial search at 500 permutations.

Verification or outcome

125 combinations were considered and 10 ranked sets reported for a three-target panel.

6. Coordinating dependent analytical workflows

Problem

Some analyses need another workflow's output. Gel analysis, for example, compares observed sizes with expected sizes.

Why it matters scientifically

Running a dependent analysis before its prerequisite gives results with nothing to compare against.

Engineering approach

The assessment records dependencies and execution order, and flags missing required inputs before anything runs.

Verification or outcome

The acceptance plan records gel analysis as dependent on conventional PCR design, and reports no blocking missing input.

7. Handling sequencing and experimental datasets

Problem

Amplicon reads, Sanger traces, Ct tables and digital PCR amplitudes each need their own quality control and statistics.

Why it matters scientifically

Poor trimming, a wrong threshold or a missed outlier propagates into every downstream number.

Engineering approach

Quality trimming and primer removal for reads, overlap-aware alignment and tiered variant calls, four-channel trace extraction with mixed-peak detection, Grubbs outlier tests for Ct data, and partition clustering with Poisson quantification for digital PCR.

Verification or outcome

240 reads, 24 qPCR wells, a four-lane gel with 12 bands, a 230-base trimmed Sanger read and 6 digital PCR wells were processed in one acceptance project.

8. Maintaining scientific consistency across modules

Problem

If two modules compute melting temperature differently, results are not comparable.

Why it matters scientifically

Clients compare outputs across analyses and expect one set of conventions.

Engineering approach

A common thermodynamic model, shared sequence handling and recorded software versions for each run.

Verification or outcome

Versions recorded include primer3-py 2.4.0, BLAST+ 2.17.0, Biopython 1.88, ReportLab 5.1.0 and openpyxl 3.1.5.

9. Generating interpretable analytical outputs

Problem

Raw numbers are hard to review, and a figure without its parameters is hard to trust.

Why it matters scientifically

Reviewers need to see the result, the evidence and the limits in one place.

Engineering approach

Every module writes a scientific PDF, an Excel workbook, machine-readable JSON and annotated figures, and states its limitations in the report.

Verification or outcome

The acceptance project listed 173 artifacts, including 13 PDF reports, 8 Excel workbooks, 20 JSON files and 38 figures.

10. Keeping execution status separate from scientific QC

Problem

A run that finishes without error is easy to read as a result that passed.

Why it matters scientifically

Reporting a completed run as a validated result would mislead a reader.

Engineering approach

Execution status and scientific QC outcome are stored and reported as separate fields in every module report and in the consolidated summary.

Verification or outcome

In the acceptance run every module completed, while QC outcomes included pass, pass with warnings and fail.

Next step

The technical showcase shows the platform dashboard and selected analytical outputs.