Skip to content

Picker: CASSPER

Seb Seager edited this page Apr 15, 2023 · 3 revisions

Authors: Christopher JF Cameron, David Peng

Summary

CASSPER (Cryo-EM Automatic Semantic Segmentation based Particle pickER) is available from the authors' repo. The CASSPER paper can be found here.

Installation

First, clone the DeepPicker repo into pickers/cassper/ using

git clone https://github.com/airis4d/CASSPER.git pickers/deeppicker

Create a new conda environment with Python version 3.6 to install the required dependencies.

conda create --name cassper python=3.6
conda activate cassper
conda install -c anaconda pip joblib
pip install -r pickers/cassper/requirements.txt

Usage

For now, please refer to the original repo for usage instructions. Our guide is incomplete for now.

# ensure CUDA is available on your system, if needed
module load cuDNN/6.0-CUDA-8.0.61
module load CUDA/8.0.61

##
#   Pre-trained model [incomplete]
##

# 1) download model weights and predicted labels from link in https://github.com/airis4d/CASSPER readme
# 2) place directories in pickers/cassper/Train_and_Predict/Protein1/

# predict coordinates
# note - GUI closes on it's own after choosing a radius and moving cursor off window (slow to process images)
mv pickers/cassper/Train_and_Predict/Protein1/labels pickers/cassper/Train_and_Predict/Protein1/Predict_labels
python pickers/cassper/Train_and_Predict/extract_coordinates_from_labels.py --input pickers/cassper/Train_and_Predict/Protein1/Predict_labels --output pickers/cassper/Train_and_Predict/Protein1/star_coordinates

# predict coordinates
# note - GUI closes on it's own after choosing a radius and moving cursor off window (slow to process images)

##
#   Train model from scratch [incomplete]
##

# comment out line 5: import CASS_scale as sw
# non-harmful tensorflow warning thrown (ignore)
python pickers/cassper/Train_and_Predict/predict_coordinates.py -h

##
#   Predict labels on new micrographs (using pretrained or already trained model) [incomplete]
##

# 1) place mrc files into pickers/cassper/Train_and_Predict/mrc_files (ensure they are not movies)
# 2) edit predict_labels.sh and comment out the 2nd line (source ...) since we already loaded requirements

# give script execute permissions if necessary
chmod +x pickers/cassper/Train_and_Predict/predict_labels.sh

# make sure to include the trailing /
pickers/cassper/Train_and_Predict/predict_labels.sh pickers/cassper/Train_and_Predict/Protein1/

# labels are now saved in Protein1/Predict_labels
# you can now run extract_coordinates_from_labels.py as before to extract STAR coordinates
Clone this wiki locally