Half-map QC and local reliability scores for cryo-EM density maps
Project description
cryoem-halfmap-qc
Half-map reproducibility and local reliability scores for cryo-EM density maps: density features, windowed half-map correlation, reliability_score, and build / caution / omit zones.
Install the halfmap-qc command:
pip install cryoem-halfmap-qc
halfmap-qc --version
From source:
pip install "git+https://github.com/sarthaktexas/cryoem-halfmap-qc.git@v0.3.3"
# or: git clone … && pip install -e .
Quick start
Run from a working directory with your maps (and optionally cohort/manifest.csv for batch mode).
Interactive menu (terminal):
halfmap-qc
halfmap-qc help
Single map — features:
halfmap-qc features map.mrc --out features.npz --float32
Half-map analysis + reliability export:
halfmap-qc analyze \
--features features.npz \
--half1 half1.map --half2 half2.map \
--reference deposited.map --contour 0.116 \
--out-dir outputs/analysis
halfmap-qc reliability --emd-id 49450 --contour 0.116 \
--features features.npz \
--halfmap-npz outputs/analysis/halfmap_metrics.npz
Cohort batch (uses cohort/manifest.csv + local data/ paths):
halfmap-qc cohort --pending
halfmap-qc cohort --emd-id 49450
halfmap-qc cohort-ids # EMDB IDs for SLURM array jobs
CLI
| Command | Purpose |
|---|---|
halfmap-qc |
Interactive menu (TTY) |
halfmap-qc help |
Command reference |
halfmap-qc features |
Local density / multiscale features → .npz |
halfmap-qc analyze |
Windowed half-map CC + feature correlations |
halfmap-qc reliability |
Reliability score, build zones, MRC export |
halfmap-qc cohort |
Batch pipeline from manifest |
halfmap-qc cohort-ids |
List cohort EMDB IDs |
Per-command flags: halfmap-qc cohort --help, etc.
Data layout
Maps are not stored in this repository. Typical layout:
data/emd_<ID>-<label>/ # deposited map + half-maps
outputs/emd_<ID>/ # pipeline outputs (created by halfmap-qc)
cohort/manifest.csv # optional batch manifest
Download maps from EMDB. Use each entry's depositor-recommended contour in the manifest.
Python API
from cryoem_mrc import load_full_and_half_maps, run_pipeline, half_map_local_metrics
from cryoem_mrc.reliability import compute_reliability_maps, classify_build_zones
bundle = load_full_and_half_maps(
"deposited.map", "half1.map", "half2.map",
dtype="float32", resample_if_needed=True,
)
metrics = half_map_local_metrics(bundle.half1.data, bundle.half2.data, window=5)
features = run_pipeline("avg.map", use_float32=True)
delta = bundle.half1.data - bundle.half2.data
rel = compute_reliability_maps(
features["density_normalized"], delta, window=5, mask=contour_mask
)
zones = classify_build_zones(rel["reliability_score"], contour_mask)
Main modules: io, map_grid, local_stats, half_map_repro, reliability, analysis.
What the scores mean
- Windowed half-map correlation — local Pearson correlation between half-maps in a sliding window (fast reproducibility proxy).
- reliability_score — in-mask percentile rank of the constraint term V (gradient-based smoothness vs half-map disagreement); higher = more reliable for modeling.
- Build zones — tercile labels inside the density contour: omit / caution / build.
External local-resolution maps (BlocRes, ResMap) are optional comparison inputs, not required to run the pipeline.
Tests
python -m unittest discover -s tests -q
Citation
@software{mohanty2026cryoem_halfmap_qc,
author = {Mohanty, Sarthak},
title = {cryoem-halfmap-qc: local map reliability from cryo-EM density and half-maps},
year = {2026},
doi = {10.5281/zenodo.20618526},
url = {https://doi.org/10.5281/zenodo.20618526},
version = {0.3.3}
}
See also CITATION.cff for GitHub's Cite this repository button.
License
MIT — see LICENSE.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
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 cryoem_halfmap_qc-0.3.3.tar.gz.
File metadata
- Download URL: cryoem_halfmap_qc-0.3.3.tar.gz
- Upload date:
- Size: 155.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2cff8c23c7e7ef4741b3669540794e66852ec145dad49bc4c3654a94b04ac723
|
|
| MD5 |
b8b40314e506a9c8bb81bcccba107900
|
|
| BLAKE2b-256 |
c41af5dbcd319f5bf75f93d03b05a2ebe7225ec5963faa3d4412f31ecaf3e43d
|
Provenance
The following attestation bundles were made for cryoem_halfmap_qc-0.3.3.tar.gz:
Publisher:
publish.yml on sarthaktexas/cryoem-halfmap-qc
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
cryoem_halfmap_qc-0.3.3.tar.gz -
Subject digest:
2cff8c23c7e7ef4741b3669540794e66852ec145dad49bc4c3654a94b04ac723 - Sigstore transparency entry: 1969339706
- Sigstore integration time:
-
Permalink:
sarthaktexas/cryoem-halfmap-qc@e9b831df3e48a82fe012c78360be7774ba67202d -
Branch / Tag:
refs/tags/v0.3.3 - Owner: https://github.com/sarthaktexas
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@e9b831df3e48a82fe012c78360be7774ba67202d -
Trigger Event:
release
-
Statement type:
File details
Details for the file cryoem_halfmap_qc-0.3.3-py3-none-any.whl.
File metadata
- Download URL: cryoem_halfmap_qc-0.3.3-py3-none-any.whl
- Upload date:
- Size: 162.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b1406f1ead6e61c96a5c5f754e4e15ac47f14a61b5f74790ccede05f831525f3
|
|
| MD5 |
28ef07662328c44a9a947bb359740b1b
|
|
| BLAKE2b-256 |
c1365ca0ce9f2ba84adaf83042eff4fdf7e56784ebf5d93105adaf037562ecfc
|
Provenance
The following attestation bundles were made for cryoem_halfmap_qc-0.3.3-py3-none-any.whl:
Publisher:
publish.yml on sarthaktexas/cryoem-halfmap-qc
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
cryoem_halfmap_qc-0.3.3-py3-none-any.whl -
Subject digest:
b1406f1ead6e61c96a5c5f754e4e15ac47f14a61b5f74790ccede05f831525f3 - Sigstore transparency entry: 1969339858
- Sigstore integration time:
-
Permalink:
sarthaktexas/cryoem-halfmap-qc@e9b831df3e48a82fe012c78360be7774ba67202d -
Branch / Tag:
refs/tags/v0.3.3 - Owner: https://github.com/sarthaktexas
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@e9b831df3e48a82fe012c78360be7774ba67202d -
Trigger Event:
release
-
Statement type: