Skip to main content

Nanopredict

Nanopredict is a local browser dashboard for calibrated early prediction of Oxford Nanopore MinION run yield. It connects read-only to MinKNOW, adapts to the capabilities exposed by the installed Core version, and predicts final passed yield at 30, 60, and 120 minutes when the required statistics are available. A version-independent BAM fallback and an anonymous historical replay mode are included.

Research-use prototype: prospective validation is required. Predictions and suspected-problem flags must not replace MinKNOW QC or operator judgement.

Install from PyPI

Requirements: MinKNOW and 64-bit Python 3.9–3.12 on the sequencing computer.

py -m pip install nanopredict
nanopredict

Every later launch is simply nanopredict. To install a newer release, run py -m pip install --upgrade nanopredict.

Install from a clone

For an editable checkout, Git is also required. The fully validated live collector targets Core 6.10.12 and MinION; other Core generations are detected and handled as described below.

git clone https://github.com/AlexanderM-M/nanopredict.git
cd nanopredict
py -m pip install .
nanopredict

The installation command is required once because cloning a repository cannot register a shell command or install Python dependencies. Every later launch is:

nanopredict

Nanopredict starts in the background, binds only to 127.0.0.1, and opens the dashboard in the default browser. It waits for an active MinION run and detects new runs automatically. If several MinION positions are active, it monitors all of them simultaneously and lists them in the dashboard. Closing the browser does not stop monitoring.

In the dashboard, enter the desired final passed-yield target and select Apply target. During sequencing, the dashboard continuously displays the current passed-base count, target progress, remaining bases, recent production rate, and estimated time to target. The target changes to TARGET REACHED when the live passed yield crosses it. The first final-yield prediction appears at 30 minutes and is updated at 60 and 120 minutes. Nanopredict may be started before or after sequencing begins.

The dashboard also follows completed MinKNOW BAM batches and counts covered CpG features used by the NanoDx Capper classifier. It displays progress toward the institute-defined threshold of 180 CpGs and changes to THRESHOLD REACHED as soon as that count is reached. This is a local report-readiness indicator, not a guarantee that ichorCNA or the complete NanoDx report will succeed.

nanopredict status
nanopredict stop

Repository launcher on Windows

Instead of installing the command, PowerShell users can run:

.\nanopredict.cmd

On its first invocation, the launcher creates a private environment inside the clone and installs Nanopredict there. PowerShell requires the ./ or .\ prefix for executables in the current directory.

On Linux or macOS, the equivalent self-bootstrapping command is:

./nanopredict

Test without a sequencing run

Stop an already running dashboard, then launch anonymous replay mode:

nanopredict stop
nanopredict --replay

The repository launcher accepts the same option: .\nanopredict.cmd --replay.

What the dashboard shows

  • Predicted final passed yield and a calibrated 90% interval
  • Continuously updated passed bases and target progress
  • Remaining bases, recent yield rate, and estimated time to target
  • Probability of reaching an operator-selected yield target
  • GOOD, BAD, or UNCERTAIN status with an explanation
  • Concise peer-based suspected QC problem flags
  • Observed passed yield, reads, and temperature
  • One selectable overview of every active MinION position
  • Live NanoDx classifier CpGs and progress toward the institute threshold of 180
  • Recent CpG accumulation rate and estimated time to the 180-CpG threshold

Replay mode contains 513 snapshots from 171 complete MinION runs. Its table contains only anonymous SampleN labels, the numerical model inputs, and the historical outcome. It contains no report paths, original run identifiers, device serials, names, or N-numbers.

Live collector and safety

The package includes minknow_api 6.10.3 as its validated baseline. Oxford Nanopore recommends matching the first two client-version components to Core, and notes that RPCs may change between minor versions. Nanopredict therefore checks capabilities instead of rejecting another version immediately, makes optional statistics non-fatal, and falls back to completed BAM batches when the essential API counters are incompatible. The validated collector reads acquisition output, basecall boxplots, duty time, temperature, basecaller settings, and pore-scan results.

Live NanoDx CpG counter

For CpG counting, configure the MinKNOW sequencing run with all three of the following:

  • BAM output enabled
  • Live alignment against the hg38 reference
  • A modified-base basecalling model that writes MM and ML tags

Nanopredict detects these settings and shows a direct setup message if BAM output, alignment, or MM/ML tags are missing. It processes only BAM batches that MinKNOW has finished writing, so the CpG count updates after each completed BAM batch in addition to the 20-second scan interval. A BAM batch duration of about 60–120 seconds gives a more responsive display than MinKNOW's longer batching defaults. The CpG ETA appears after two completed batches show measurable CpG growth and is recalculated from the recent accumulation rate after every batch.

The bundled target table represents 366,217 of the 366,263 features selected by the NanoDx Capper_et_al model; 46 source features could not be cleanly lifted from hg19 to hg38. Calls use a NanoDx/modkit-compatible confidence filter and the same final-27-base edge exclusion. Anonymous incremental state is stored locally so restarting Nanopredict does not recount completed BAM batches. Before using the counter operationally, compare its result on at least one completed local run with NanoDx's reported num_features.

MinKNOW version compatibility

Nanopredict chooses the best available read-only path automatically:

  • Validated API: Core 6.10.x with the bundled 6.10 API client. This provides live yield, calibrated final-yield predictions, QC features, and CpGs.
  • Compatibility API: another Core version that still exposes compatible acquisition and statistics fields. Nanopredict uses the available fields and labels the session as compatibility mode. Because Oxford Nanopore may change the API between minor Core releases, this path should be checked locally before operational use.
  • BAM fallback: if the statistics API cannot be read, Nanopredict discovers completed bam_pass and bam_fail batches and continues to display passed bases, target progress, yield ETA, NanoDx CpGs, and CpG ETA. A calibrated final-yield prediction is not shown in this mode because the trained model requires statistics that cannot be reconstructed reliably from BAM alone.

The default BAM locations are detected automatically (C:\data on Windows and /data or ~/data on Linux). If MinKNOW writes elsewhere, supply the directory when starting Nanopredict:

nanopredict --bam-dir "D:\data"

Alternatively, set the NANOPREDICT_BAM_DIR environment variable. The selected mode, Core version, and API-client version are shown at the top of the dashboard. This capability-based approach covers a much wider range of Core releases, but it does not claim that every past or future undocumented API will provide all prediction inputs.

It uses only documented getter and statistics-stream RPCs. It contains no code to start, stop, pause, unblock, change voltage, change temperature, or otherwise control a run. Run IDs, flow-cell IDs, sample names, and patient identifiers are not sent to the browser or stored by Nanopredict. MinKNOW position names are shown only in the local dashboard so an operator can select the correct device; Nanopredict does not persist or transmit them externally.

By default, every active MinION position is monitored. To deliberately restrict API monitoring to one position, launch with nanopredict --position POSITION_NAME. BAM-only runs have anonymous BAM-XXXXXX labels and remain selectable in the dashboard because BAM output does not reliably expose the MinKNOW position name. To show connection errors in the terminal, use nanopredict --foreground.

Development

py -m pip install --editable .
python -m unittest discover -s tests -v
nanopredict --foreground --no-browser

The server uses Python's standard HTTP library and no external web framework. Models and all dashboard assets are installed inside the Python package.

License

Nanopredict is free software licensed under the GNU General Public License version 3 only. It is distributed without any warranty. Third-party data provenance and licensing information are listed in THIRD_PARTY_NOTICES.md.

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

nanopredict-0.7.0.tar.gz (6.2 MB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

nanopredict-0.7.0-py3-none-any.whl (6.3 MB view details)

Uploaded Python 3

File details

Details for the file nanopredict-0.7.0.tar.gz.

File metadata

  • Download URL: nanopredict-0.7.0.tar.gz
  • Upload date:
  • Size: 6.2 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for nanopredict-0.7.0.tar.gz
Algorithm Hash digest
SHA256 1110ee2bc294c8c426b30cc5133a5e2220f934270f1451e8798ed17c50c19aa9
MD5 ed208c43742b97c1725ced16f5d6e92b
BLAKE2b-256 dc5a2b8c7d161dfd9c1728f5cbe88d2bdce7a99ec1d5f6968c790e1673ebefeb

See more details on using hashes here.

Provenance

The following attestation bundles were made for nanopredict-0.7.0.tar.gz:

Publisher: publish.yml on AlexanderM-M/nanopredict

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file nanopredict-0.7.0-py3-none-any.whl.

File metadata

  • Download URL: nanopredict-0.7.0-py3-none-any.whl
  • Upload date:
  • Size: 6.3 MB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for nanopredict-0.7.0-py3-none-any.whl
Algorithm Hash digest
SHA256 74f68df5a1a3249f781fa4cd82f1d10df2583783bf9fa592feb40be0707c0f49
MD5 1b40eb3f03f5f02b86be92b0fb7b5147
BLAKE2b-256 687a5bb1077e569bb78d6972fce8b5f5ab9059fce1d4e2a2197d9a882ee0e701

See more details on using hashes here.

Provenance

The following attestation bundles were made for nanopredict-0.7.0-py3-none-any.whl:

Publisher: publish.yml on AlexanderM-M/nanopredict

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Release history Release notifications | RSS feed

0.10.0

2 files

0.9.0

2 files

0.8.0

2 files

This release

0.7.0 This release

2 files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page