flashLocus
Summary-statistic fine-mapping and colocalisation in Rust. flashLocus is a line-by-line port of
susieR 0.14.2 (susie_rss) and coloc 5.2.3 (coloc.bf_bf, as used by coloc.susie), with exact
LD computation from PLINK 1 binary files.
Install
pip install flashlocus # command-line tool + Python module (wheels: Linux x86_64/aarch64, macOS)
From source:
cargo build --release # binary: target/release/flashlocus
cargo test --release # regression tests against susieR, coloc and PLINK conventions
pip install maturin && maturin develop --release # Python module from a checkout
Requires Rust 1.75 or later to build. SIMD kernels: AVX-512 or AVX2 on x86_64 (chosen at run time), NEON on Apple silicon and other aarch64 CPUs. AVX-512 or AVX2 kernels are selected at run time (flashlocus cpu).
Commands
| command | purpose |
|---|---|
rss |
SuSiE-RSS on one locus: z scores, LD matrix (p x p f64), sample size |
batch |
many loci from a manifest, parallel across loci, optional core pinning |
ld |
LD from .bed/.bim/.fam for a region or an ID list (--extract) |
prep |
GWAS windows to allele-aligned z scores and reference genotypes |
atlas |
coloc.susie between GWAS fits and eQTL Catalogue SuSiE lbf files |
sim, compare |
simulation and benchmarking helpers |
Examples:
flashlocus rss --z locus.z --ld locus.ld.bin --n 150000 --out fit/locus
flashlocus batch --manifest loci.tsv --out fits --threads 48 --pin --ld-mode auto
flashlocus ld --bfile ref --chr 11 --start 29700000 --end 30700000 --extract ids.txt --out ld/fshb
flashlocus atlas --loci loci.tsv \
--qtl uterus=QTD000346.lbf_variable.txt.gz,QTD000346.credible_sets.tsv.gz --out atlas
Outputs per fit: .pip, .cs.tsv (effect, size, coverage, purity, members), .lbf_variable.tsv,
.info.tsv. atlas writes one <tissue>.coloc.tsv with PP.H0 to PP.H4 per credible-set pair.
Python
import numpy as np, flashlocus
fit = flashlocus.susie_rss(z, R, n=150000) # z: (p,), R: (p, p); susieR 0.14.2 defaults
fit["pip"], fit["sets"][0]["members"] # members are 0-based
ids, chrom, pos, a1, a2, af, R = flashlocus.ld("ref", 11, 29_700_000, 30_700_000)
pairs = flashlocus.coloc_bf_bf(fit1["lbf_variable"][[0]], ids1, fit2["lbf_variable"][[0]], ids2)
pairs[0]["PP.H4"]
Conventions
- SuSiE defaults follow susieR 0.14.2 (L = 10, coverage 0.95, min_abs_corr 0.5, prior variance optimised with Brent on log V, null check, ELBO tolerance 1e-3).
- coloc defaults follow coloc 5.2.3 (p1 = p2 = 1e-4, p12 = 5e-6, overlap.min 0.5), including its
treatment of the last column in
logbf_to_ppand the column order of the second dataset. - LD: Pearson r of A1 dosages. Without missing calls the sums are exact integers (as in PLINK 1.9);
with missing calls, missing dosages are mean-imputed. On chrX, male calls are haploid as in
PLINK 1.9 (
--x-diploidcodes them 0/2).
Validation summary (details in the accompanying manuscript)
- SuSiE: PIP r = 1.0000 against susieR 0.14.2 on 200 simulated and 396 real loci, maximum PIP difference 6e-8 (simulated) and 3e-5 (real).
- coloc: 27,159 credible-set pairs across 6 GTEx tissues, identical pair set and lead variants, maximum PP.H4 difference 5e-12.
- LD: 396 windows (1000 Genomes EUR), maximum difference 4.4e-16 against PLINK 1.9 and PLINK 2 on autosomes and against PLINK 1.9 on chrX.
License
MIT
Metadata
Release files for flashlocus 0.3.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| flashlocus-0.3.1.tar.gz | 819.9 kB | With provenance | Details for flashlocus-0.3.1.tar.gz |
Built distributions (wheels)
| File | Actions Reset | |||
|---|---|---|---|---|
| flashlocus-0.3.1-cp39-abi3-manylinux2014_x86_64.manylinux_2_17_x86_64.whl | CPython 3.9 | abi3 | Linux glibc 2.17+ x86-64 | Details for flashlocus-0.3.1-cp39-abi3-manylinux2014_x86_64.manylinux_2_17_x86_64.whl |
| flashlocus-0.3.1-cp39-abi3-manylinux2014_aarch64.manylinux_2_17_aarch64.whl | CPython 3.9 | abi3 | Linux glibc 2.17+ ARM64 | Details for flashlocus-0.3.1-cp39-abi3-manylinux2014_aarch64.manylinux_2_17_aarch64.whl |
| flashlocus-0.3.1-cp39-abi3-macosx_11_0_arm64.whl | CPython 3.9 | abi3 | macOS 11.0+ ARM64 | Details for flashlocus-0.3.1-cp39-abi3-macosx_11_0_arm64.whl |
| flashlocus-0.3.1-cp39-abi3-macosx_10_12_x86_64.whl | CPython 3.9 | abi3 | macOS 10.12+ x86-64 | Details for flashlocus-0.3.1-cp39-abi3-macosx_10_12_x86_64.whl |
Total release size: 3.5 MB
Release files / flashlocus-0.3.1.tar.gz
| Download URL | flashlocus-0.3.1.tar.gz |
|---|---|
| Size | 819.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
c69df8d5be0c7c4a70a15353708d789b2aa7d258a95972c61369b5bc5b00a2e3
|
|
BLAKE2b-256 checksum How to use checksums |
7ae333e6c77ed57a1ae03e018908010750aa78afd372631475249dcfcba7e291
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 31, 2026.
Transparency logRelease files / flashlocus-0.3.1-cp39-abi3-manylinux2014_x86_64.manylinux_2_17_x86_64.whl
| Download URL | flashlocus-0.3.1-cp39-abi3-manylinux2014_x86_64.manylinux_2_17_x86_64.whl |
|---|---|
| Size | 681.5 kB |
| Tags | CPython 3.9 Linux glibc 2.17+ x86-64 abi3 |
|
SHA-256 checksum How to use checksums |
f54568bb558ce0e4374ed8c67f7122989796332eebfe7834e093a338faf8b2d2
|
|
BLAKE2b-256 checksum How to use checksums |
8894846d6f4e7bb1829cde2334414b5d7f001ba9e819722b930bf4b921cf8747
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 31, 2026.
Transparency logRelease files / flashlocus-0.3.1-cp39-abi3-manylinux2014_aarch64.manylinux_2_17_aarch64.whl
| Download URL | flashlocus-0.3.1-cp39-abi3-manylinux2014_aarch64.manylinux_2_17_aarch64.whl |
|---|---|
| Size | 634.5 kB |
| Tags | CPython 3.9 Linux glibc 2.17+ ARM64 abi3 |
|
SHA-256 checksum How to use checksums |
c596e1f9af65c66da4e18151c31c75fecedb4e1f42ce1e9986f796bbaa3e88a5
|
|
BLAKE2b-256 checksum How to use checksums |
a332ed9be2e45d37d1d457652fcb3c1ac38a7518eae4fa8b7914de55276e6ec0
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 31, 2026.
Transparency logRelease files / flashlocus-0.3.1-cp39-abi3-macosx_11_0_arm64.whl
| Download URL | flashlocus-0.3.1-cp39-abi3-macosx_11_0_arm64.whl |
|---|---|
| Size | 657.4 kB |
| Tags | CPython 3.9 abi3 macOS 11.0+ ARM64 |
|
SHA-256 checksum How to use checksums |
856fbbba6ae8bc398911971c3d058cbb49318f789fd9c6e6f6b8825ff8c1d6f5
|
|
BLAKE2b-256 checksum How to use checksums |
b61cf6fa26c31dc8b374ed3a2ed9ecad4cfb6ef377fc2867c0fa82fcef4080f6
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 31, 2026.
Transparency logRelease files / flashlocus-0.3.1-cp39-abi3-macosx_10_12_x86_64.whl
| Download URL | flashlocus-0.3.1-cp39-abi3-macosx_10_12_x86_64.whl |
|---|---|
| Size | 686.6 kB |
| Tags | CPython 3.9 abi3 macOS 10.12+ x86-64 |
|
SHA-256 checksum How to use checksums |
91e6aa878e74966fa03d808d873b1c30c9bac6ec186c4ea19791f7c783f899f4
|
|
BLAKE2b-256 checksum How to use checksums |
4cefcb6787f33c6382ababc74f5c049d24df96f1f2aa34d5b11b9f1124809a92
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 31, 2026.
Transparency logSecurity for flashlocus 0.3.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
Full provenance
All 5 files in this release have been uploaded with provenance metadata.
Attestation for flashlocus-0.3.1.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 31, 2026.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.