DotMatch
DotMatch assigns short FASTQ read windows to a known list of DNA sequences. It is useful when you already know the guides, barcodes, feature tags, primers, or other targets that may be present and want every read reported as a unique match, an ambiguous match, unmatched, or invalid.
Documentation · Getting started · Command reference · Examples · Citation
Install
PyPI is the quickest route on Linux and macOS:
python3 -m pip install dotmatch
dotmatch --version
Conda users can install the current Bioconda build:
conda create -n dotmatch -c conda-forge -c bioconda dotmatch
conda activate dotmatch
The Bioconda recipe supports Linux, Intel macOS, and Apple Silicon
(osx-arm64). If a newly tagged version has not reached Bioconda yet, use the
PyPI package or install from source.
A small example
Prepare a tab-separated target file:
target_id sequence
guide_001 ACGTACGTACGTACGTACGT
guide_002 ACGTACGTACGTACGTAGGT
Then assign a fixed 20-base window from each read:
dotmatch count \
--targets guides.tsv \
--reads sample_R1.fastq.gz \
--sample-label sample_1 \
--target-start 23 \
--target-length 20 \
--k 1 \
--metric hamming \
--out counts.tsv \
--sample-qc sample_qc.tsv \
--summary summary.json
DotMatch only counts a read when exactly one target is compatible under the selected matching rule. Reads that fit several targets remain visible as ambiguous instead of being assigned arbitrarily.
What it is for
- counting CRISPR guides and writing MAGeCK-compatible count tables;
- demultiplexing fixed-position inline barcodes;
- assigning feature-barcode and guide-capture reads;
- checking primer, adapter, amplicon-panel, or whitelist sequences;
- auditing target lists before enabling mismatch correction;
- designing and checking barcode panels;
- writing TSV, JSON, FASTQ, and HTML results for pipelines and lab review.
DotMatch is not a genome aligner, basecaller, UMI pipeline, variant caller, or screen-level statistics package. It compares short read windows with a finite target list.
Read outcomes
| Outcome | Meaning |
|---|---|
unique |
Exactly one target is compatible. |
ambiguous |
More than one target is compatible. |
none |
No target is within the selected distance. |
invalid |
The requested read window could not be extracted. |
These states appear in the assignment and QC outputs. They are not folded into the unique counts.
Common workflows
Count CRISPR guides
For a new screen, DotMatch can prepare a small assay project and infer a likely guide window for review:
dotmatch crispr quickstart \
--library guides.csv \
--fastq 'fastqs/*.fastq.gz' \
--out crispr_screen/
Review crispr_screen/inference_report.json and assay.toml, then run:
dotmatch assay start crispr_screen/assay.toml
For an explicit one-command run, use dotmatch crispr-count. The
CRISPR tutorial
covers both routes.
Demultiplex inline barcodes
dotmatch demux \
--barcodes barcodes.tsv \
--reads pooled.fastq.gz \
--barcode-start 0 \
--barcode-length 8 \
--k 1 \
--metric hamming \
--out-dir demuxed/ \
--summary demux.summary.json
If a run has an unexpectedly high unmatched or ambiguous rate, inspect it with:
dotmatch barcode autopsy \
--barcodes barcodes.tsv \
--reads pooled.fastq.gz \
--scan-starts 0:12 \
--k-values 0,1 \
--out-dir autopsy/
Open autopsy/report.html first. The tables beside it record offset scans,
near-neighbour barcodes, correction safety, and frequent unmatched windows.
Check a target library
Before allowing mismatch correction, check whether neighbouring targets can produce ambiguous assignments:
dotmatch audit \
--targets guides.tsv \
--k 1 \
--audit-mode auto \
--out-dir audit/
The barcode panel guide also covers panel design, optimisation, simulation, layout, and export.
Python API
import dotmatch
distance = dotmatch.distance("ACGT", "AGGT")
assert distance == 1
result = dotmatch.assign_posterior("ACGT", ["ACGT", "AGGT"], "IIII")
print(result.status)
The posterior helper is experimental and is not used by the high-throughput CLI path. The Python API documentation describes the supported streaming interfaces.
Outputs and workflow integration
Depending on the command, DotMatch writes count tables, split FASTQs,
sample_qc.tsv, per-read assignments, unmatched-read tables, summary.json,
and self-contained HTML reports. The formats are documented in the
output schema reference.
Examples for Nextflow, nf-core, Snakemake, Galaxy, and MultiQC live under
examples/workflows.
The desktop Workbench is maintained separately in
dotmatch-community.
Matching rules and performance
Hamming distance is the usual choice for fixed-length windows where only base
substitutions should be considered. Levenshtein distance can also account for
short insertions and deletions. The default radius policy requires a single
compatible target; the optional best policy exists for compatibility with
workflows that select the nearest target.
Indexed candidate generation and native distance kernels make fixed-window assignment practical for large FASTQ inputs. Benchmark results, hardware, commands, and known limitations are kept with the benchmark reports. Those reports cover the tested workloads; they are not a claim that DotMatch replaces general alignment or every demultiplexing workflow.
Documentation
- Getting started
- Command reference
- AssaySpec workflows
- CRISPR count QC
- Barcode panel design
- Output schemas
- Methods and citation
- Packaging notes
Citation
Run dotmatch citation to print the citation for the installed version. The
repository also includes CITATION.cff,
and release archives are deposited with Zenodo.
Development
git clone https://github.com/dnncha/dotmatch.git
cd dotmatch
make
make test
See CONTRIBUTING.md for the development setup and pull-request checks.
License
Apache-2.0. See LICENSE.
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distributions
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file dotmatch-0.2.2.tar.gz.
File metadata
- Download URL: dotmatch-0.2.2.tar.gz
- Upload date:
- Size: 228.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/6.1.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c441aaafb6b29db51560d3fc68c52a8ad01ed0f08158a89544c1d9366f12fce8
|
|
| MD5 |
ae1bececb86f0bc98cee30172d103a38
|
|
| BLAKE2b-256 |
242032b2daeeab01820c5980fa9f22b1f36e3f8d9fd02def955125cab993dd0b
|
Provenance
The following attestation bundles were made for dotmatch-0.2.2.tar.gz:
Publisher:
release.yml on dnncha/dotmatch
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
dotmatch-0.2.2.tar.gz -
Subject digest:
c441aaafb6b29db51560d3fc68c52a8ad01ed0f08158a89544c1d9366f12fce8 - Sigstore transparency entry: 2225843105
- Sigstore integration time:
-
Permalink:
dnncha/dotmatch@38b6cdde23f44d86ef76de16361b414d20961aeb -
Branch / Tag:
refs/tags/v0.2.2 - Owner: https://github.com/dnncha
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@38b6cdde23f44d86ef76de16361b414d20961aeb -
Trigger Event:
push
-
Statement type:
File details
Details for the file dotmatch-0.2.2-py3-none-musllinux_1_2_x86_64.whl.
File metadata
- Download URL: dotmatch-0.2.2-py3-none-musllinux_1_2_x86_64.whl
- Upload date:
- Size: 316.4 kB
- Tags: Python 3, musllinux: musl 1.2+ x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/6.1.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
124648d8856bed8c4f6283f07a55baf8b4ea8d00ace18880b36a3a7638f1c3fc
|
|
| MD5 |
f8372c635b3d1cd9c765cfc7e5208e97
|
|
| BLAKE2b-256 |
b6ff2c3323542d643efdcf6df4d68d1768ce178de0b38fa13b5064c5e3345f42
|
Provenance
The following attestation bundles were made for dotmatch-0.2.2-py3-none-musllinux_1_2_x86_64.whl:
Publisher:
release.yml on dnncha/dotmatch
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
dotmatch-0.2.2-py3-none-musllinux_1_2_x86_64.whl -
Subject digest:
124648d8856bed8c4f6283f07a55baf8b4ea8d00ace18880b36a3a7638f1c3fc - Sigstore transparency entry: 2225843737
- Sigstore integration time:
-
Permalink:
dnncha/dotmatch@38b6cdde23f44d86ef76de16361b414d20961aeb -
Branch / Tag:
refs/tags/v0.2.2 - Owner: https://github.com/dnncha
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@38b6cdde23f44d86ef76de16361b414d20961aeb -
Trigger Event:
push
-
Statement type:
File details
Details for the file dotmatch-0.2.2-py3-none-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl.
File metadata
- Download URL: dotmatch-0.2.2-py3-none-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl
- Upload date:
- Size: 312.1 kB
- Tags: Python 3, manylinux: glibc 2.17+ x86-64, manylinux: glibc 2.28+ x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/6.1.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6748a134c4abb8bab62d42de4018a0e7441ea5841f2f13f5c628ec7234650adf
|
|
| MD5 |
eedd29fbd6f1373b684aac1b3c396b0f
|
|
| BLAKE2b-256 |
029f04b3e7ecab66ef15c0e40d0e690741bbdef0cf6dbeed95f38460e83ac9ea
|
Provenance
The following attestation bundles were made for dotmatch-0.2.2-py3-none-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl:
Publisher:
release.yml on dnncha/dotmatch
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
dotmatch-0.2.2-py3-none-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl -
Subject digest:
6748a134c4abb8bab62d42de4018a0e7441ea5841f2f13f5c628ec7234650adf - Sigstore transparency entry: 2225844477
- Sigstore integration time:
-
Permalink:
dnncha/dotmatch@38b6cdde23f44d86ef76de16361b414d20961aeb -
Branch / Tag:
refs/tags/v0.2.2 - Owner: https://github.com/dnncha
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@38b6cdde23f44d86ef76de16361b414d20961aeb -
Trigger Event:
push
-
Statement type:
File details
Details for the file dotmatch-0.2.2-py3-none-macosx_11_0_universal2.whl.
File metadata
- Download URL: dotmatch-0.2.2-py3-none-macosx_11_0_universal2.whl
- Upload date:
- Size: 422.6 kB
- Tags: Python 3, macOS 11.0+ universal2 (ARM64, x86-64)
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/6.1.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a4780d65c4ef738e0289be770cceda37bbd245057300d035c23a3329c2415494
|
|
| MD5 |
e3973fb7cf4e94a9b69410087acdb0b0
|
|
| BLAKE2b-256 |
7599f11d487007f6464c2ae7ac8ee164a653d8a6a14a914c42f94e7daabeaa8f
|
Provenance
The following attestation bundles were made for dotmatch-0.2.2-py3-none-macosx_11_0_universal2.whl:
Publisher:
release.yml on dnncha/dotmatch
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
dotmatch-0.2.2-py3-none-macosx_11_0_universal2.whl -
Subject digest:
a4780d65c4ef738e0289be770cceda37bbd245057300d035c23a3329c2415494 - Sigstore transparency entry: 2225845039
- Sigstore integration time:
-
Permalink:
dnncha/dotmatch@38b6cdde23f44d86ef76de16361b414d20961aeb -
Branch / Tag:
refs/tags/v0.2.2 - Owner: https://github.com/dnncha
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@38b6cdde23f44d86ef76de16361b414d20961aeb -
Trigger Event:
push
-
Statement type: