-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathgEMpicker
128 lines (98 loc) · 4.99 KB
/
gEMpicker
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
#!/bin/bash
#coarse and filter mics for gempicker to 20-40A, do the same with references
#for i in `ls aligned_sums/*.mrc | sed 's/aligned_sums//g'`;do e2proc2d.py aligned_sums${i} aligned_sums_c4_f30${i} --meanshrink 4 --process=filter.lowpass.gauss:apix=5.64:cutoff_abs=0.376 --process=normalize.edgemean ;done
#------------------------INPUT PARAMETERS---------------------------
prog="/usr/local/gempicker/bin/gEMpicker"
micrographs="$PWD/img" # only mrc files
refs="$PWD/tpl" # only mrc files
msk="$PWD/msk" # only tif files
output="$PWD/output"
threshold_low="0.1"
threshold_high="0.3"
box="80" #desired box size, px
angle="10" # angular step of template search, degrees
contrast="1" # 1 - both mics and references have the same contrast, otherwise - 0
maxpeaks="50" # max number of particles per micrograph
dist="60" # minimal distance between picked particles, px
#-------------------------------------------------------------------
[ ! -d $res ] && mkdir $res
( [ ! -d $orig ] || [ ! -d $tpl ] || [ ! -d $msk ] ) && ( echo "Some directories was not found!" && exit 1 )
D1=`date +%s`
echo -e "Started on `date`"
for m in `seq 0 1`
do
${prog} --nGPU=1 --nCPU=8 --mode=$m --thresh=${threshold_low} --threshHigh=${threshold_high} --dirSch=${refs} --dirTgt=${micrographs} --dirMskSch=${msk} --dirRes=${output} --angle2D=${angle} --contrast=${contrast} --boxSize=${box} --nPickMax=${maxpeaks} --boxDist=${dist}
done
D2=`date +%s` ; D=$((D2-D1)) ; printf "Job duration = %dhr %dmin %dsec \n" $(($D/3600)) $(($D/60%60)) $(($D%60))
#----------------COMMENTS-------------------------------------------
<<comments
a) Supported mrc file formats: int8, int16, uint16, float32
b) Max size of micrographs is 4096x4096px.
c) Number of masks should be either one (for all references) or equal to the number of references.
d) The coordinates of picked particles are exported in the folder $output/pik_box and $output/pik_coord.
e) The range of correlation values is overlaid on the correlation map exported in TIFF format (see $output/xcorr). TIFF files are in uint8 for visualization purpose only.
USAGE:
gEMpicker --dirTgt=<string> --dirSch=<string> [--dirMskTgt=<string>]
--dirMskSch=<string> --dirRes=<string> --mode=<unsigned int>
--angle2D=<float> --contrast=<bool> --thresh=<float>
[--threshHigh=<float>] [--nPickMax=<unsigned int>]
[--boxSize=<unsigned int>] [--boxDist=<unsigned int>]
[--boxBorder=<unsigned int>] [--nCPU=<unsigned int>]
[--nGPU=<unsigned int>] [--mpiDistTgt=<bool>] [--]
[--version] [-h]
Where:
--dirTgt=<string>
(required) Directory of target images / micrographs (*.mrc)
--dirSch=<string>
(required) Directory of search images / references (*.mrc)
--dirMskTgt=<string>
Directory of masks for target images / micrographs (*.tif)
--dirMskSch=<string>
(required) Directory of masks for search images / references (*.tif)
--dirRes=<string>
(required) Directory for results
--mode=<unsigned int>
(required) Running mode: 0-compute correlation, 1-perform picking
(box only), 2-perform picking
--angle2D=<float>
(required) In-plane rotating angle in degree, (0 = no rotation)
--contrast=<bool>
(required) Micrograph contrast: 0-negative peaks, 1-positive peaks
--thresh=<float>
(required) Threshold value for picking - low limit: [0,1]
--threshHigh=<float>
Threshold value for picking - high limit: [0,1] (default = 1)
--nPickMax=<unsigned int>
Max number of particles picked from each micrograph (default = 0, no
limit)
--boxSize=<unsigned int>
Size of picked images (if not provided or = 0, use reference size)
--boxDist=<unsigned int>
Min distance between peaks (if not provided or = 0, use reference
size)
--boxBorder=<unsigned int>
Min distance from box to micrograph boundary (default = 0)
--nCPU=<unsigned int>
Number of CPU cores / process: (1)
--nGPU=<unsigned int>
Number of GPUs / process: (0)
--mpiDistTgt=<bool>
Distribution of micrographs to processes: (0)-no, 1-yes
--, --ignore_rest
Ignores the rest of the labeled arguments following this flag.
--version
Displays version information and exits.
-h, --help
Displays usage information and exits.
gEMpicker is a template-based, highly parallel GPU-accelerated particle
picking program developed at INRIA Nancy. It runs in multi-thread and
multi-process mode to use all available CPU cores and GPUs in a single
workstation or a multi-node cluster for the correlation computation.
Supported formats: MRC for micrographs and references, TIFF for masks
Copyright: Thai V. Hoang, INRIA
Email: [email protected]
Reference:
T. V. Hoang, X. Cavin, P. Schultz, and D. W. Ritchie, "gEMpicker: A
highly parallel GPU-accelerated tool for electron micrograph particle
picking," BMC Structural Biology, 2013.
comments