Metadata-Version: 2.3
Name: cylindra
Version: 1.0.0b1
Classifier: Programming Language :: Rust
Classifier: Programming Language :: Python :: Implementation :: CPython
Classifier: Programming Language :: Python :: Implementation :: PyPy
Classifier: Programming Language :: Python :: 3 :: Only
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Framework :: napari
Requires-Dist: impy-array >=2.4.1
Requires-Dist: acryo >=0.4.7
Requires-Dist: macro-kit >=0.4.6
Requires-Dist: magicgui >=0.8.1
Requires-Dist: magic-class >=0.7.10
Requires-Dist: psygnal >=0.9.1
Requires-Dist: superqt[iconify] >=0.6.1
Requires-Dist: pydantic >=1.10.0
Requires-Dist: pydantic-compat
Requires-Dist: pyqtgraph >=0.12.4
Requires-Dist: pyarrow >=11.0.0
Requires-Dist: numpy >=1.23.0
Requires-Dist: scipy >=1.11.3
Requires-Dist: pandas >=1.5.0
Requires-Dist: polars >=0.20.13
Requires-Dist: scikit-image >=0.21.0
Requires-Dist: napari >=0.4.18
Requires-Dist: qtpy >=2.3.1
Requires-Dist: qt-command-palette >=0.0.7
Requires-Dist: matplotlib >=3.8.1
Requires-Dist: rich >=13.6.0
Requires-Dist: dask <2024
Requires-Dist: pytest ; extra == 'testing'
Requires-Dist: pytest-qt ; extra == 'testing'
Requires-Dist: pytest-cov ; extra == 'testing'
Requires-Dist: pyqt5 ; extra == 'testing'
Requires-Dist: scikit-learn >=1.2.2 ; extra == 'testing'
Requires-Dist: mrcfile >=1.3.0 ; extra == 'testing'
Requires-Dist: tifffile >=2023.2.28 ; extra == 'testing'
Requires-Dist: starfile ; extra == 'testing'
Requires-Dist: imodmodel ; extra == 'testing'
Requires-Dist: maturin >=1.5.0, <2.0.0 ; extra == 'testing'
Requires-Dist: pyqt5 ; extra == 'all'
Requires-Dist: scikit-learn >=1.2.2 ; extra == 'all'
Requires-Dist: mrcfile >=1.3.0 ; extra == 'all'
Requires-Dist: tifffile >=2023.2.28 ; extra == 'all'
Requires-Dist: starfile ; extra == 'all'
Requires-Dist: imodmodel ; extra == 'all'
Requires-Dist: pyqt5 ; extra == 'docs'
Requires-Dist: mkdocs >=1.5.3 ; extra == 'docs'
Requires-Dist: mkdocs-autorefs >=0.5.0 ; extra == 'docs'
Requires-Dist: mkdocs-gen-files >=0.5.0 ; extra == 'docs'
Requires-Dist: mkdocs-material >=9.5.2 ; extra == 'docs'
Requires-Dist: mkdocs-material-extensions >=1.3.1 ; extra == 'docs'
Requires-Dist: mkdocstrings >=0.24.0 ; extra == 'docs'
Requires-Dist: mkdocstrings-python >=1.7.5 ; extra == 'docs'
Requires-Dist: maturin >=1.5.0, <2.0.0 ; extra == 'docs'
Provides-Extra: testing
Provides-Extra: all
Provides-Extra: docs
License-File: LICENSE
Summary: Spectral analysis, simulation and subtomogram averaging of heterogenic cylindrical structures
Keywords: gui,napari,cryo-ET,tomography
Author: Hanjin Liu
Author-email: liuha@med.kobe-u.ac.jp
Requires-Python: >=3.10
Description-Content-Type: text/markdown; charset=UTF-8; variant=GFM

[![BSD 3-Clause License](https://img.shields.io/pypi/l/cylindra.svg?color=green)](https://github.com/hanjinliu/cylindra/blob/main/LICENSE)
[![Python package index download statistics](https://img.shields.io/pypi/dm/cylindra.svg)](https://pypistats.org/packages/cylindra)
[![PyPI version](https://badge.fury.io/py/cylindra.svg)](https://badge.fury.io/py/cylindra)
[![codecov](https://codecov.io/gh/hanjinliu/cylindra/graph/badge.svg?token=X1F259JYT5)](https://codecov.io/gh/hanjinliu/cylindra)

![](https://github.com/hanjinliu/cylindra/blob/main/resources/fig.png)

# cylindra

`cylindra` is a GUI-integrated cryo-ET image analysis tool for cylindric periodic
structures such as microtubules.

### [&rarr; Documentation](https://hanjinliu.github.io/cylindra/)

## Installation

- Use `pip`

```shell
pip install cylindra -U
```

- From source

If you install from the source, you'll need Rust to compile a part of the code.

```shell
git clone git+https://github.com/hanjinliu/cylindra
cd cylindra
pip install .
```

## Usage

#### Launch GUI

- From shell

  ```shell
  cylindra
  ```

- From a Python interpreter

  ```python
  from cylindra import start

  # launch a napari viewer with a cylindra dock widget.
  ui = start()
  ```

#### Command line interface

`cylindra` is implemented with some basic command line interface (CLI).

```shell
cylindra --help
```

## Implemented Functions

- Automatic/manual fitting of splines to cylindrical structures in 3D.
- Analyze lattice structures (such as lattice spacing and skew angle) using Cylindric
  Fourier transformation.
- Automatic determination of polarity, protofilament number etc.
- Monomer mapping along splines for subtomogram averaging and alignment.
- Microtubule seam search with or without binding proteins.
- Subtomogram alignment with 2D constraint.
- Tomogram simulation of cylindric structure.

## Prerequisite and Recommendations

- **Python &ge; 3.10**. This project follows [spec-0000](https://scientific-python.org/specs/spec-0000/).
- **Sufficient memory size**. Most of the intense calculations are done out-of-core
  using `dask`, so that you can even run on 8-GB memory PC in many cases. However,
  larger memory size will make parallel processing more efficient. &ge;32 GB is
  recommended.
- **Images should be loaded from SSD**. Raw image stacks are loaded lazily in most of
  the processes. Loading from HDD will slow down many analyses as well.

## Issues

If you encountered any bugs or have any requests, feel free to
[report an issue](https://github.com/hanjinliu/cylindra/issues/new).
(We'll appreciate if you find some methods are over-fitted to microtubules and do not
work well on other cylindric structures)

For better reproducibility, please copy your environments from `Others > cylindra info`
and the recorded macro from `Others > Macro > Show macro`.

## Citation

If you find `cylindra` useful in your work, please consider citing [our paper](https://www.biorxiv.org/content/10.1101/2024.04.30.591984v1).

```
Heterogeneous local structures of the microtubule lattice revealed by cryo-ET and non-averaging analysis
Hanjin Liu, Hiroshi Yamaguchi, Masahide Kikkawa, Tomohiro Shima
bioRxiv 2024.04.30.591984; doi: https://doi.org/10.1101/2024.04.30.591984
```

