Skip to main content

Sarcomere Analysis Multitool for structural and functional analysis of sarcomeres in microscopy images and movies

Project description

SarcAsM logo

A Python package for comprehensive analysis of sarcomere structure and function in cardiomyocytes

Supported Python versions Python package index bioRxiv Preprint

Overview

SarcAsM (Sarcomere Analysis Multitool) is an AI-powered Python package for cardiomyocyte sarcomere analysis. It enables precise multilevel structural and functional assessment of sarcomeres in microscopy images and movies, making it suitable for drug screening, disease phenotyping, and biomechanical studies.

For details, check out our preprint:

Daniel Haertter, Lara Hauke, Til Driehorst, Kengo Nishi, Jaden Long, Malte Tiburcy, Branimir Berecic, et al. 2025. “SarcAsM: AI-Based Multiscale Analysis of Sarcomere Organization and Contractility in Cardiomyocytes.” bioRxiv. https://doi.org/10.1101/2025.04.29.650605.

Table of Contents

Features

  • Robust AI-based sarcomere feature detection in microscopy images
  • Comprehensive multilevel analysis of sarcomere structure
    • Z-bands morphometrics and lateral alignment
    • Sarcomere lengths and orientations (sarcomere 'vectors')
    • Myofibril lengths and shape
    • Cell-level myofibril domains
  • High-precision tracking of individual and average sarcomere motion with ~20 nm accuracy
  • Functional analysis of sarcomere contraction dynamics
  • Interactive Graphical User Interface (GUI)
  • Comprehensive Python API for integration into custom workflows
  • Batch processing capabilities for high-throughput analysis

Graphical abstract

Summary of SarcAsM workflow and analyzed features

Installation

Option 1: Installation via PyPI (Recommended)

The easiest way to install SarcAsM is via pip:

pip install sarc-asm

Option 2: Installation from GitHub

For the latest development version:

pip install git+https://github.com/danihae/sarcasm.git

Setting up a dedicated environment (Recommended)

We strongly recommend creating a dedicated conda environment to avoid dependency conflicts:

conda create -y -n sarcasm-env python=3.10
conda activate sarcasm-env
pip install sarc-asm

Note: The full installation usually takes less than 5 minutes, depending on your internet connection. For computers equipped with an NVIDIA GPU, ensure the installed PyTorch and CUDA toolkit versions are compatible. See PyTorch installation instructions for details.

Usage

Python Package

After installation, SarcAsM can be imported and used in your Python scripts or Jupyter notebooks:

# Example workflow for structural analysis
from sarcasm import Structure, Export

# Load an image or movie
sarc = Structure("path/to/your/image_or_movie.tif")

# Detect sarcomeres
sarc.detect_sarcomeres()

# Analyze sarcomere length and orientations (sarcomere 'vectors')
sarc.analyze_sarcomere_vectors()

# Analyze Z-bands
sarc.analyze_z_bands()

# Analyze myofibrils
sarc.analyze_myofibrils()

# Analyze domains
sarc.analyze_sarcomere_domains()

# Export data to xlsx file (summary statistics of each frame, full data stored as json in file base directory)
Export.export_structure_data('/path/to/xlsx/file.xlsx', sarc_obj)

Check out quickstart_demo.ipynb in the repository root or our documentation for a practical introduction to SarcAsM's functionalities.

Graphical User Interface

SarcAsM GUI Screenshot

The SarcAsM application provides an intuitive GUI built with Napari as image viewer for easy analysis:

# After activating your environment (e.g., conda activate sarcasm-env)
python -m sarcasm_app

Alternatively, you can run ./sarcasm_app/__main__.py directly from the SarcAsM root directory if the necessary dependencies are in your PYTHONPATH.

Documentation

Detailed documentation, including tutorials, API reference, and usage examples, can be found at:

https://sarcasm.readthedocs.io/

Additional resources:

Support

If you encounter any issues, have questions, or want to suggest improvements:

  • Please check the online documentation first.
  • If the issue persists, open an issue on our GitHub repository. Provide as much detail as possible, including steps to reproduce the problem, error messages, and your operating system/environment details.

Citation

If you use SarcAsM in your research, please cite our preprint for now (peer-reviewed publication will follow):

Daniel Haertter, Lara Hauke, Til Driehorst, Kengo Nishi, Jaden Long, Malte Tiburcy, Branimir Berecic, et al. 2025. “SarcAsM: AI-Based Multiscale Analysis of Sarcomere Organization and Contractility in Cardiomyocytes.” bioRxiv. https://doi.org/10.1101/2025.04.29.650605.

License

This software is patent pending (Patent Application No. DE 10 2024 112 939.5, Priority Date: 8.5.2024).

Academic and Non-Commercial Use

This software is free for academic and non-commercial use. Users are granted a non-exclusive, non-transferable license to use the software for research, educational, and other non-commercial purposes.

Commercial Use Restrictions

Commercial use of this software is strictly prohibited without obtaining a separate license agreement. This includes but is not limited to:

  • Using the software in a commercial product or service
  • Using the software to provide services to third parties
  • Reselling or redistributing the software

For commercial licensing inquiries, please contact:

MBM ScienceBridge GmbH, Hans-Adolf-Krebs-Weg 1, 37077 Göttingen, Germany, https://sciencebridge.de/en/

All rights not expressly granted are reserved. Unauthorized use may result in legal action.

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

sarc_asm-0.1.1.tar.gz (295.6 kB view details)

Uploaded Source

Built Distribution

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

sarc_asm-0.1.1-py3-none-any.whl (179.1 kB view details)

Uploaded Python 3

File details

Details for the file sarc_asm-0.1.1.tar.gz.

File metadata

  • Download URL: sarc_asm-0.1.1.tar.gz
  • Upload date:
  • Size: 295.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.8.3 CPython/3.12.4 Darwin/24.4.0

File hashes

Hashes for sarc_asm-0.1.1.tar.gz
Algorithm Hash digest
SHA256 94b925013329ec208ca20066910ded1f077abcec6b88bea4b33c2011f48f9a35
MD5 cc35d62c1a6812ff4271dabb1155898c
BLAKE2b-256 01338ed866eb671032a07ec2fea2774ecc76a7d9143d201cc0029698bd693240

See more details on using hashes here.

File details

Details for the file sarc_asm-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: sarc_asm-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 179.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.8.3 CPython/3.12.4 Darwin/24.4.0

File hashes

Hashes for sarc_asm-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 717c62e91524a9f1e1e69a102a9b7990cb69f6859276002c3762653a8c2a962f
MD5 88d4d5abc6b2e225f9f8c8b5128acca0
BLAKE2b-256 e823e602e6aea64996bd7673df8bdd08af138c66b0809f29c1aed7b31b12233a

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