Git Product home page Git Product logo

susan's Introduction

SUbStack ANalysis (SUSAN): High performance Subtomogram Averaging

(Personal/Development version)

Contents

Description

SUSAN is a low-level/mid-level framework for fast Subtomogram Averaging (StA) for CryoEM. It uses susbtacks instead of subtomograms that are cropped on-the-fly from the aligned stacks to reduce the computational complexity and to increase the overall performace of the StA pipeline.

SUSAN was designed to be modular, flexible and fast. It is conformed by two layers:

  • Low-level layer: Set of executables that perform the demanding computations. They were written in C++ using a minimal set of dependencies: Eigen, as a header-only mathemetical engine, CUDA for GPU acceleration, and PThreads for lightweight multi-threading. Optionally, they can be built with MPI support to run in multi-node environments.
  • Mid-level layer: Set of wrappers to the previous layer that simplify its use and provides a set of non time-critical operations. It is used to create the workflows or pipelines as scripts with wrappers for Matlab and for Python. The Matlab one was designed to complement DYNAMO, while the Python one is provided to enable integration to other pipelines based on this language.

About

I started the development of SUSAN at the Independent Research Group (Sofja Kovaleskaja) of Dr. Misha Kudryashev at the Department of Structural Biology Max Planck Institute of Biophysics (MPIBP) in Frankfurt am Main, Germany. Currently, I am an ARISE fellow at the Kreshuk group at the European Molecular Biology Laboratory (EMBL) in Heidelberg, Germany. Dr. Misha Kudryashev has a new group at the Max Delbrück Center of Molecular Medicine (MDCMM) in Berlin, Germany.

SUSAN is an Open Source project (AGPLv3.0)

Building and setup instructions

Dependencies

  • CUDA.
  • gcc.
  • cmake.
  • git.

Optional

  • OpenMPI, or equivalent, for multi-node support
  • Matlab

Initial setup and compilation

We assume that SUSAN will be installed in the LOCAL_SUSAN_PATH folder (LOCAL_SUSAN_PATH can be /home/user/Software/, for example)

  1. Install the desired dependencies.
  2. Clone SUSAN to LOCAL_SUSAN_PATH:
    cd LOCAL_SUSAN_PATH
    git clone https://github.com/rkms86/SUSAN
    
  3. Compile SUSAN:
    mkdir bin
    cd bin
    cmake ../
    make -j
    
    Note: The cmake procedure detects the availabilty of OpenMPI and Matlab and compiles their functionalities accordingly.

Python setup

Dependencies

Besides the standard libraries, the SUSAN module for Python has only two dependencies: NumPy and Numba. Install them if needed:

  • Using conda (or equivalent):
    conda install numpy numba
    
  • Using pip
    pip install numpy numba
    

Option 1: Using susan without installation

LOCAL_SUSAN_PATH must be added to path first and then the susan module can be imported. On the Python command line, or on a Python script:

import sys
sys.path.insert(1,'LOCAL_SUSAN_PATH')
import susan

Option 2: Install susan in the current Python environment

After executing the optional steps for the Python module, it can be installed using pip and the provided setup.py file. In the LOCAL_SUSAN_PATH execute:

pip install .

After this step, the module susan should be available to be imported.

Matlab setup

LOCAL_SUSAN_PATH must be added to path. On the Matlab command line, or on a Matlab script:

addpath LOCAL_SUSAN_PATH

Installing SUSAN in a conda environment (for Python)

SUSAN can be built and installed inside a conda environment:

  • (Optional) Create a new conda environment and activate it:
    conda create -n susan_env
    conda activate susan_env
    
  1. Install the basic packages needed for building and using SUSAN
    conda install -c conda-forge git cmake make cudatoolkit-dev=11 gxx=10 numpy numba
    
  • (Optional) Install openmpi:
    conda install -c conda-forge openmpi
    
  • (Optional) Install packages to run the examples and tutorials:
    conda install -c conda-forge jupyter scipy matplotlib scikit-image
    
  1. Go to the directory LOCAL_SUSAN_PATH, where SUSAN will be compiled. For example, LOCAL_SUSAN_PATH can be ~/Software/:
    cd LOCAL_SUSAN_PATH
    
  2. Clone SUSAN, compile it and install it:
    git clone https://github.com/rkms86/SUSAN
    mkdir SUSAN/bin
    cd SUSAN/bin
    cmake ../
    make -j
    pip install ../
    

After these step the module susan should be available on the current environment.

Tutorial

A tutorial is available for Python and Matlab for the mixedCTEM dataset from the EMPIAR-10064. It is assumed that the wget and gunzip commands and the IMOD framework are installed in the system.

Preparing the data

  1. Download the dataset (uses wget):
    cd LOCAL_SUSAN_PATH/tutorials/empiar_10064/data
    ./download_data.sh
    
  2. Create the aligned stacks (uses IMOD):
    ./create_binned_aligned_stacks.sh
    
  3. Uncompress the initial reference (uses gunzip):
    cd LOCAL_SUSAN_PATH/tutorials/empiar_10064
    gunzip emd_3420_b4.mrc.gz
    

Running the Tutorial

Depending on the system setup:

susan's People

Contributors

rkms86 avatar reddismorr avatar

Stargazers

Spencer J Rothfuss avatar Valentyna Chernova avatar Frosina Stojanovska avatar  avatar  avatar Grigory Sharov avatar Benjamin Barad avatar Xhark avatar N1kt0 avatar

Watchers

Grigory Sharov avatar  avatar

susan's Issues

python tutorial questions

I though I'd make a separate issue for my questions.

  1. why duplicating particle set for MRA is necessary? because you want to preserve original particle stack? but the project does output particles for each iteration.
  2. in the tutorial in the very first project the prj_001_mra.ptclsraw is bin8, while everything else is bin4. It does run, so the binning does not have to match between particles and ref/masks?
  3. initial reconstruction is not used in the project, I guess it's calculated only for demonstration?
  4. I found that my tomo_size didnt match binned stacks size so I had to replace 3710//2 by math.ceil(3710/2)

import_dynamo_table missing in python api

Hi,

I'm trying to follow the tutorial with Python API. I could not find prj_001.ptclsraw anywhere and wanted to convert picked_bin2.tbl, but then I couldn't find the python function to do this. In matlab api I can see import_dynamo_table. I dont have matlab installed. Can I get around this?

cmake FindCUDAToolkit - failed

I installed SUSAN on an Ubuntu 20.04 workstation running CUDA 11.4. During cmake, I got the following error:
########################################
CMake Warning at CMakeLists.txt:27 (find_package):
By not providing "FindCUDAToolkit.cmake" in CMAKE_MODULE_PATH this project
has asked CMake to find a package configuration file provided by
"CUDAToolkit", but CMake did not find one.

Could not find a package configuration file provided by "CUDAToolkit" with
any of the following names:

CUDAToolkitConfig.cmake
cudatoolkit-config.cmake

Add the installation prefix of "CUDAToolkit" to CMAKE_PREFIX_PATH or set
"CUDAToolkit_DIR" to a directory containing one of the above files. If
"CUDAToolkit" provides a separate development package or SDK, be sure it
has been installed.

CMake Error at CMakeLists.txt:43 (message):
SUSAN does not support your CUDA toolkit version.

-- Configuring incomplete, errors occurred!
###########################################

I solved this by specifying the cuda path in CMakeLists.txt and removing the rest of the Configure CUDA section

set(CMAKE_PREFIX_PATH /usr/local/cuda)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.