Project

General

Profile

First-time autoscreening setup » History » Version 10

Anchi Cheng, 03/15/2022 02:53 PM

1 1 Anchi Cheng
h1. Smart-leginon multi-grid autoscreening
2
3
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.
4
5
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.
6
7
* 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.
8
9 5 Anchi Cheng
h2. Install Ptolemy and setup shell scripts to use its cli for [[Setup Ptolemy CLI shell script|grid square finding]] and [[Setup Ptolemy CLI for exposure targeting|exposure target hole finding]]
10 3 Anchi Cheng
11 4 Anchi Cheng
h2. Upload MSI-Ptolemy application into leginon database
12 2 Anchi Cheng
13
Follow the instruction in [[Applications|web application tools]]
14
* Note: If your system needs two Leginon client opened, each on a different pc, use MSi-Ptolemy2.xml
15
16 1 Anchi Cheng
If you have your own application you can do the following replacement by [[Use_the_Application_Editor_to_create_Leginon_applications|editing your application]] :
17 2 Anchi Cheng
18 1 Anchi Cheng
Square Targeting Node : MosaicClickTargetFinder class => MosaicScoreTargetFinder
19 2 Anchi Cheng
Exposure Targeting Node: JAHCFinder => ScoreTargetFinder
20 1 Anchi Cheng
21 10 Anchi Cheng
h2. First-time Leginon setup
22 1 Anchi Cheng
23 10 Anchi Cheng
Run MSi-Ptolemy and start a new session. This session can be used for setting up and as the example session that the autoscreen base its settings and stage z height on.
24 1 Anchi Cheng
25 10 Anchi Cheng
# Start the session as usual.
26
# Set z to the height that is typical for this scope's eucentric height.
27
# Acquire a grid atlas for the next step.
28
29 6 Anchi Cheng
h2. Setup Square Targeting Node
30 4 Anchi Cheng
31
h3. Set, in Blobs Settings, the script to run as */path_to/sq_finder.sh*
32
33
h3. Define target area size sampling  in the settings next to "acquisition" target panel.
34
35
Enter
36 1 Anchi Cheng
# Maximal number of squares to select
37
# Number of target group to sample
38
39
For example, total of 12 squares selected in 3 groups means the program divided out all blob squares with valid area range into 3 size group (small, medium,and large).  It then choose 4 blob squares in each group with highest score given by Ptolemy as the output square targets.  High score in Ptolemy result means it is more likely to be a good square.
40
41 4 Anchi Cheng
h3. Set the limits of the square area range in "Thresholded" settings.
42 2 Anchi Cheng
43 4 Anchi Cheng
You can set it directly.  However, it is easier to select a number of examples targets including the smallest and the largest grid square you will choose and then click on the auto square finding tool on the toolbar.  Leginon will use the example targets to set the limits of the square area.
44 2 Anchi Cheng
45 4 Anchi Cheng
!Square_FindingGUI.png!
46
47
h3.  Activate auto finding in the main settings dialog.
48
49
Shortest path can be applied in ordering the resulting targets as well.
50 1 Anchi Cheng
51 6 Anchi Cheng
!ProcessingSettings.png!
52 1 Anchi Cheng
53 6 Anchi Cheng
h2. Setup Exposure Targeting Node
54
55 10 Anchi Cheng
h3. Define Hole Settings
56 6 Anchi Cheng
57
* the script to run as */path_to/hl_finder.sh* or whatever path your shell script is located.
58
* the json key for threshold the result.  For Ptolemy, this should be "score"
59
* the minimal key value to accept.  For Ptolemy, the probability score range is 0-1.  We tend to use a very small number to only rule out the obvious bad holes. 0.01, for example.
60 9 Anchi Cheng
!score_finder.png!
61 6 Anchi Cheng
62
h3. Define Ice thickness thresholding
63
64
Like JAHC template hole finder, you can narrow the selection in Leginon with hole statistics calculation and create template for convolution.  The interface is similar to JAHC hole finder.
65
66
h3. Define target sampling
67
68 1 Anchi Cheng
For screening, you may not want all targets found to be acquired.  Use Acquisition Target Sampling section to achieve this:
69
70
{{include(Settings for Target Sampling)}}
71 10 Anchi Cheng
72
h2. (Optional) Specify and setup auto aperture selection for nodes that need to be specified.
73
74
If you want objective aperture to be retracted only during Grid imaging, set in its advanced settings to
75
76
!aperture_settings.png!
77
78
79
h2. Setup grid loading list text file
80
81
Autoscreen reads a *tab-separated* text file that contains the slot number and the session comment to setup the sequence of grid loading and screening.  The grids will be screened in the order or the list.
82
83
Currently, all grids needs to be in the same project as the example session.  We will expand that in the future.
84
85
An example file is attached in this wiki called grid.list
86
87
<pre>
88
3    best test grid
89
2    second best test grid
90
</pre>