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.
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 # acryo objects
from acryo.tilt import single_axis # missing wedge model
from acryo.pipe import soft_otsu # data input pipelines
# construct a loader
loader = SubtomogramLoader.imread(
"path/to/tomogram.mrc",
molecules=Molecules.from_csv("path/to/molecules.csv"),
tilt=single_axis((-45, 45), axis="y"), # range of tilt series degrees.
)
# filter out bad alignment in polars way
loader_filt = loader.filter(pl.col("score") > 0.7)
# averaging
avg = loader_filt.average(output_shape=(48, 48, 48))
# alignment
aligned_loader = loader.align(
template=avg, # use the average as template
mask=soft_otsu(sigma=2, radius=2), # apply soft-Otsu to template to make the mask
cutoff=0.5, # lowpass filtering cutoff
max_shifts=(4, 4, 4), # search space limits
)
Metadata
Release files for acryo 0.8.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| acryo-0.8.0.tar.gz | 85.7 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| acryo-0.8.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 196.1 kB
Release files / acryo-0.8.0.tar.gz
| Download URL | acryo-0.8.0.tar.gz |
|---|---|
| Size | 85.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
51fa941220ef1f43af17fd9ece1145853f895a54a1dda505a5897e7105a5865f
|
|
BLAKE2b-256 checksum How to use checksums |
41e3221c172a59429aac9af421814b1bf6c71a0e0bd30d7d84898f576185d7f7
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
Hatch/1.18.1 {"ci":null,"cpu":"AMD64","implementation":{"name":"CPython","version":"3.10.14"},"installer":{"name":"hatch","version":"1.18.1"},"openssl_version":"OpenSSL 3.4.0 22 Oct 2024","python":"3.10.14","system":{"name":"Windows","release":"10"}} HTTPX2/2.13.1
|
Release files / acryo-0.8.0-py3-none-any.whl
| Download URL | acryo-0.8.0-py3-none-any.whl |
|---|---|
| Size | 110.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
80bbdd5be97878e0b1be106861b19882e6b3fc9daa0f5cd44ebca342b00a7285
|
|
BLAKE2b-256 checksum How to use checksums |
51aa4beedb2881d2818892396877986a2845c28389b964eea061877da9a97d13
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
Hatch/1.18.1 {"ci":null,"cpu":"AMD64","implementation":{"name":"CPython","version":"3.10.14"},"installer":{"name":"hatch","version":"1.18.1"},"openssl_version":"OpenSSL 3.4.0 22 Oct 2024","python":"3.10.14","system":{"name":"Windows","release":"10"}} HTTPX2/2.13.1
|