Skip to content

ShravyaRS/qscore-mapq

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

qscore-mapq

Pure Python Q-score implementation that reproduces MapQ (Pintilie et al., Nature Methods 2020) without requiring UCSF Chimera.

Validation

Validated against MapQ on 28 EMDB entries (1.84–4.2 Å resolution):

Metric Value
Mean difference +0.0002
Max difference
Pearson r 0.999997
Entries within ±0.1% 28/28

Full comparison: qscore-validation

Installation

pip install -e .

Usage

# Command line
python -m qscore_mapq model.cif map.mrc --sigma 0.4 --verbose

# Python API
from qscore_mapq import compute_qscores, read_structure, read_map
coords, is_water, _, _ = read_structure("model.cif")
grid, origin, voxel_size = read_map("map.mrc")
result = compute_qscores(coords, grid, origin, voxel_size, is_water=is_water)
print(f"Q = {result.q_mean:.4f}")

Algorithm

Matches MapQ exactly (verified against gregdp/mapq/qscores.py):

  • Saff-Kuijlaars spiral for deterministic sphere sampling
  • 0.9×R neighbor exclusion threshold
  • Retry loop (50 attempts, +2 points each)
  • All valid points from successful attempt kept
  • Pearson correlation without epsilon stabilization
  • All non-H, non-water atoms included

Citation

Pintilie et al. (2020). Measurement of atom resolvability in cryo-EM maps with Q-scores. Nature Methods, 17(3), 328–334.

About

Pure Python Q-score implementation matching MapQ (Pintilie et al. 2020). Validated on 28 EMDB entries: r = 0.999997. No Chimera dependency.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages