Skip to main content

An extensible cryo-EM/ET toolkit for Python.

Project description

Python package index download statistics PyPI version

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

  1. Out-of-core and parallel processing during subtomogram averaging/alignment to make full use of CPU.
  2. Extensible and ready-to-use alignment models.
  3. Manage subtomogram loading tasks from single or multiple tomograms in the same API.
  4. Tomogram and tilt series simulation.
  5. 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
)

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

acryo-0.6.1.tar.gz (76.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

acryo-0.6.1-py3-none-any.whl (100.2 kB view details)

Uploaded Python 3

File details

Details for the file acryo-0.6.1.tar.gz.

File metadata

  • Download URL: acryo-0.6.1.tar.gz
  • Upload date:
  • Size: 76.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: python-httpx/0.27.2

File hashes

Hashes for acryo-0.6.1.tar.gz
Algorithm Hash digest
SHA256 8ec94a9d24ea74eaeb89145f1d49a8371d426974e6f25a99b419b38f35f3789c
MD5 696c2d085d9ba3873f052fbc8d892362
BLAKE2b-256 998d22c3bf039f2cad25c2a5bcaaeff9d084370ef6b9eab38f92e0e9d689999a

See more details on using hashes here.

File details

Details for the file acryo-0.6.1-py3-none-any.whl.

File metadata

  • Download URL: acryo-0.6.1-py3-none-any.whl
  • Upload date:
  • Size: 100.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: python-httpx/0.27.2

File hashes

Hashes for acryo-0.6.1-py3-none-any.whl
Algorithm Hash digest
SHA256 352869de57c930f22456a0cf0b0509312298f4f74bd0b24d501d87434d6b6026
MD5 46a402ef96e1b93cae383c6697fb1eb3
BLAKE2b-256 8c9dc8fcb18a9943eedc6f12f7006d3d7fc5d537ef8e123a7e531a4e512ed6af

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page