Project

General

Profile

Actions

First-time autoscreening setup » History » Revision 1

Revision 1/17 | Next »
Anchi Cheng, 02/28/2022 08:24 PM


Smart-leginon multi-grid autoscreening

Automated square and hole finders are added to leginon to use Ptolemy (https://arxiv.org/abs/2112.01534) to determine optimal targets using computer vision algorithm and Convolutional Neural Network trained on user target selections accumulated at Simons Electron Microscopy Center at New York Biology Center (SEMC@NYSBC.

This implementation requires Ptolemy which has a separate license. For this release, the communication is through command line interface and rely on shared file system.

  • At SEMC@NYSBC, Ptolemy, which was tested on python 3.9, runs in anaconda environment on the same CentOS7 computer where the main leginon process is.

Square finding (localization and classification)

  • Within Leginon MosaicExternalScoreFinder instance defines, for each incoming gr image:
    • the shell script to run Ptolemy (user set it in settings)
    • the mrc file path of the gr image leginon is currently processing as ptolemy input (leginon decides this for you)
    • the output json file path leginon will later look for the result. (leginon decision)

Here is an example how we write this shell script sq_finding.sh

#!/bin/sh -f
# Local runs
source /usr/local/anaconda3/etc/profile.d/conda.sh
conda activate /opt/condaenvs/ptolemy_env
# variable 1 is the outputname without json extension.
# variable 2 is the input mrc path
echo $1
echo $2
mrc_path=$2
python /home/your_name/site-packages/ptolemy/lowmag_cli.py -f json $2 > $1
conda deactivate
# mv the result to leginon session rawdata directory
mv $1 ${mrc_path%%rawdata/*}rawdata/$1.json
echo ${mrc_path%%rawdata/*}rawdata/$1.json

Updated by Anchi Cheng almost 3 years ago · 1 revisions