acryo
acryo
is an extensible cryo-EM/ET toolkit for Python.
The purpose of this library is to make data analysis of cryo-EM/ET safer, efficient, reproducible and customizable for everyone.
Scientists can avoid the error-prone CLI-based data handling, such as writing out the results to the files every time and manage all the result just by the file names.
📘 Documentation
Install
Use pip
pip install acryo -U
From source
git clone git+https://github.com/hanjinliu/acryo.git
cd acryo
pip install -e .
Features
- Out-of-core and parallel processing during subtomogram averaging/alignment to make full use of CPU.
- Extensible and ready-to-use alignment models.
- Manage subtomogram loading tasks from single or multiple tomograms in the same API.
- Tomogram and tilt series simulation.
- Masked PCA clustering.
Code Snippet
import polars as pl
from acryo import SubtomogramLoader, Molecules
from acryo.tilt import single_axis
from acryo.pipe import soft_otsu
loader = SubtomogramLoader.imread(
"path/to/tomogram.mrc",
molecules=Molecules.from_csv("path/to/molecules.csv"),
)
loader_filt = loader.filter(pl.col("score") > 0.7)
avg = loader_filt.average(output_shape=(48, 48, 48))
aligned_loader = loader.align(
template=avg,
mask=soft_otsu(sigma=2, radius=2),
tilt=single_axis((-45, 45), axis="y"),
cutoff=0.5,
max_shifts=(4, 4, 4),
)