This repository is for tutorials of Eos.
Revisión | 00b17156a869ad17ac439f1dc40f7707b02d8ef7 (tree) |
---|---|
Tiempo | 2015-02-16 10:59:47 |
Autor | kinoshita-eos <kinoshita@yasu...> |
Commiter | kinoshita-eos |
Add: PIONE tutorial to repeat for Single Particle Makefile.
modified: SampleCode/PIONE/Advanced4/Anotation.pione
modified: SampleCode/PIONE/Advanced4/Create_3d.pione
modified: SampleCode/PIONE/Advanced4/Create_SampleROI.pione
modified: SampleCode/PIONE/Advanced4/Create_fit_each.pione
modified: SampleCode/PIONE/Advanced4/Create_stack.pione
modified: SampleCode/PIONE/Advanced4/Main.pione
modified: SampleCode/PIONE/Advanced4/Parameter.pione
new file: SampleCode/PIONE/Advanced4/Repeat_3d.pione
@@ -1,5 +1,5 @@ | ||
1 | 1 | .@ PackageName :: "SingleParticle_3DReconstruction" |
2 | 2 | .@ Editor :: "Kinoshita" |
3 | -.@ Tag :: "v0.2.0" | |
3 | +.@ Tag :: "v0.3.0" | |
4 | 4 | # Ref: Makefile in Eos v2.1.16p0093 |
5 | 5 | # $EOS_HOME/Integration/SingleParticle/Makefile-fromKanae |
\ No newline at end of file |
@@ -1,18 +1,19 @@ | ||
1 | 1 | Rule Create_3d |
2 | - input '*.3dinfo'.all | |
3 | - input '*.fit'.all | |
4 | - output '{$filename}.3d' | |
5 | - output '{$filename}.ds6' | |
2 | + input '*.3dinfo-{$count}'.all | |
3 | + input '*.fit-{$count}'.all | |
4 | + output '{$filename}-{$count}.3d' | |
5 | + output '{$filename}-{$count}.ds6' | |
6 | 6 | param $filename |
7 | + param $count | |
7 | 8 | Action |
8 | 9 | # Sum_3dinfo_3dlst |
9 | 10 | for info in {$I[1]} |
10 | 11 | do |
11 | - cat $info >> {$filename}.3dlst | |
12 | + cat $info >> {$filename}-{$count}.3dlst | |
12 | 13 | done |
13 | 14 | |
14 | 15 | # Reconstruct_3dlst_3d |
15 | - mrc2Dto3D -I {$filename}.3dlst -o {$O[1]} -InterpolationMode 2 -Double -DoubleCounter {$filename}.3dcounter -CounterThreshold 0.5 -m 1 -WeightMode 6 | |
16 | + mrc2Dto3D -I {$filename}-{$count}.3dlst -o {$O[1]} -InterpolationMode 2 -Double -DoubleCounter {$filename}-{$count}.3dcounter -CounterThreshold 0.5 -m 1 -WeightMode 6 | |
16 | 17 | |
17 | 18 | # Convert_3d_ds6 |
18 | 19 | mrc2map -i {$O[1]} -o {$O[2]} -m 3 |
@@ -35,3 +35,15 @@ Action | ||
35 | 35 | done |
36 | 36 | done |
37 | 37 | End |
38 | + | |
39 | +Rule Cutout_ROI | |
40 | + input '*.mrc' | |
41 | + output '*.roi'.all | |
42 | + output '*.tiff'.all | |
43 | +Action | |
44 | + Display2 -i {$I[1]} | |
45 | + for data in $(ls *.roi) | |
46 | + do | |
47 | + mrc2tiff -i ${data} -o ${data}.tiff | |
48 | + done | |
49 | +End | |
\ No newline at end of file |
@@ -1,52 +1,52 @@ | ||
1 | 1 | Rule Create_fit_each |
2 | 2 | input '*.pad' |
3 | - input '*.stack' | |
3 | + input '*-*.stack' | |
4 | 4 | if ($Flag_3DWhole or $Flag_3D4S) |
5 | 5 | input '{$I[1][1]}.roi' |
6 | 6 | end |
7 | 7 | if $Flag_3D |
8 | - output '{$I[1][1]}.fit' | |
9 | - output '{$I[1][1]}.3dinfo' | |
8 | + output '{$I[1][1]}.fit-{$I[2][2]}' | |
9 | + output '{$I[1][1]}.3dinfo-{$I[2][2]}' | |
10 | 10 | end |
11 | 11 | if $Flag_3DWhole |
12 | - output '{$I[1][1]}.shift' | |
13 | - output '{$I[1][1]}.3dwholeinfo' | |
12 | + output '{$I[1][1]}.shift-{$I[2][2]}' | |
13 | + output '{$I[1][1]}.3dwholeinfo-{$I[2][2]}' | |
14 | 14 | end |
15 | 15 | if $Flag_3D4S |
16 | - output '{$I[1][1]}.4shift' | |
17 | - output '{$I[1][1]}.3d4sinfo' | |
16 | + output '{$I[1][1]}.4shift-{$I[2][2]}' | |
17 | + output '{$I[1][1]}.3d4sinfo-{$I[2][2]}' | |
18 | 18 | end |
19 | 19 | Action |
20 | 20 | # Create_fit |
21 | - mrcImageAutoRotationCorrelation -i {$I[1]} -r {$I[2]} -fit {$I[1][1]}.fit -O {$I[1][1]}.corinfo \ | |
21 | + mrcImageAutoRotationCorrelation -i {$I[1]} -r {$I[2]} -fit {$I[1][1]}.fit-{$I[2][2]} -O {$I[1][1]}.corinfo-{$I[2][2]} \ | |
22 | 22 | -n {$N_ROT} -m 18 -nRot1 {$N_ROT1} -nRot2 {$N_ROT2} -nRot3 {$N_ROT3} > /dev/null |
23 | 23 | |
24 | 24 | # fit_3dinfo |
25 | 25 | if {$Flag_3D} ; then |
26 | - awk '/Cor/ { print $18,$16,$2,$3,$4,"0.0"}' {$I[1][1]}.corinfo | sort -r | sed -e s/pad/fit/ > {$I[1][1]}.3dinfolst | |
27 | - head -n 1 {$I[1][1]}.3dinfolst | awk ' {print $2,$3,$4,$5,$6,$1'} > {$I[1][1]}.3dinfo | |
26 | + awk '/Cor/ { print $18,$16,$2,$3,$4,"0.0"}' {$I[1][1]}.corinfo-{$I[2][2]} | sort -r | sed -e s/pad/fit-{$I[2][2]}/ > {$I[1][1]}.3dinfolst-{$I[2][2]} | |
27 | + head -n 1 {$I[1][1]}.3dinfolst-{$I[2][2]} | awk ' {print $2,$3,$4,$5,$6,$1'} > {$I[1][1]}.3dinfo-{$I[2][2]} | |
28 | 28 | fi |
29 | 29 | |
30 | 30 | # fit_3dwholeinfo |
31 | 31 | if {$Flag_3DWhole} ; then |
32 | - awk '/Cor/ { print $18,$16,$2,$3,$4,$9,$11,$12}' {$I[1][1]}.corinfo | sort -r | sed -e s/pad/shift/ > {$I[1][1]}.3dwholeinfolst | |
33 | - head -n 1 {$I[1][1]}.3dwholeinfolst | awk ' {print $2,$3,$4,$5,$6,$7,$8,$1'} > {$I[1][1]}.3dwholeinfo | |
34 | - X=`awk '{print -{$SHRINK}*$6; }' {$I[1][1]}.3dwholeinfo`; | |
35 | - Y=`awk '{print -{$SHRINK}*$7; }' {$I[1][1]}.3dwholeinfo`; | |
36 | - echo $X,$Y; mrcImageShift -i {$I[1][1]}.roi -o {$I[1][1]}.shift -x $X -y $Y -z 0 | |
32 | + awk '/Cor/ { print $18,$16,$2,$3,$4,$9,$11,$12}' {$I[1][1]}.corinfo-{$I[2][2]} | sort -r | sed -e s/pad/shift-{$I[2][2]}/ > {$I[1][1]}.3dwholeinfolst-{$I[2][2]} | |
33 | + head -n 1 {$I[1][1]}.3dwholeinfolst-{$I[2][2]} | awk ' {print $2,$3,$4,$5,$6,$7,$8,$1'} > {$I[1][1]}.3dwholeinfo-{$I[2][2]} | |
34 | + X=`awk '{print -{$SHRINK}*$6; }' {$I[1][1]}.3dwholeinfo-{$I[2][2]}`; | |
35 | + Y=`awk '{print -{$SHRINK}*$7; }' {$I[1][1]}.3dwholeinfo-{$I[2][2]}`; | |
36 | + echo $X,$Y; mrcImageShift -i {$I[1][1]}.roi -o {$I[1][1]}.shift-{$I[2][2]} -x $X -y $Y -z 0 | |
37 | 37 | fi |
38 | 38 | |
39 | 39 | # fit_3d4sinfo |
40 | 40 | if {$Flag_3D4S} ; then |
41 | - awk '/Cor/ { print $18,$16,$2,$3,$4,$9,$11,$12}' {$I[1][1]}.corinfo | sort -r | sed -e s/pad/4shift/ > {$I[1][1]}.3d4sinfolst | |
42 | - head -n 1 {$I[1][1]}.3d4sinfolst | awk ' {print $2,$3,$4,$5,$6,$7,$8,$1'} > {$I[1][1]}.3d4sinfo | |
43 | - X=`awk '{print -{$SHRINK4S}*$6; }' {$I[1][1]}.3d4sinfo`; | |
44 | - Y=`awk '{print -{$SHRINK4S}*$7; }' {$I[1][1]}.3d4sinfo`; | |
41 | + awk '/Cor/ { print $18,$16,$2,$3,$4,$9,$11,$12}' {$I[1][1]}.corinfo-{$I[2][2]} | sort -r | sed -e s/pad/4shift-{$I[2][2]}/ > {$I[1][1]}.3d4sinfolst-{$I[2][2]} | |
42 | + head -n 1 {$I[1][1]}.3d4sinfolst-{$I[2][2]} | awk ' {print $2,$3,$4,$5,$6,$7,$8,$1'} > {$I[1][1]}.3d4sinfo-{$I[2][2]} | |
43 | + X=`awk '{print -{$SHRINK4S}*$6; }' {$I[1][1]}.3d4sinfo-{$I[2][2]}`; | |
44 | + Y=`awk '{print -{$SHRINK4S}*$7; }' {$I[1][1]}.3d4sinfo-{$I[2][2]}`; | |
45 | 45 | echo $X,$Y; |
46 | - mrcImageShrink -i {$I[1][1]}.roi -o {$I[1][1]}.4shrink -S {$SHRINK4S} | |
46 | + mrcImageShrink -i {$I[1][1]}.roi -o {$I[1][1]}.4shrink-{$I[2][2]} -S {$SHRINK4S} | |
47 | 47 | width=`expr {$X_SIZE} / {$SHRINK4S}` |
48 | 48 | height=`expr {$Y_SIZE} / {$SHRINK4S}` |
49 | - mrcImagePad -i {$I[1][1]}.4shrink -o {$I[1][1]}.4spad -W ${width} -H ${height} | |
50 | - mrcImageShift -i {$I[1][1]}.4spad -o {$I[1][1]}.4shift -x $X -y $Y -z 0 | |
49 | + mrcImagePad -i {$I[1][1]}.4shrink-{$I[2][2]} -o {$I[1][1]}.4spad-{$I[2][2]} -W ${width} -H ${height} | |
50 | + mrcImageShift -i {$I[1][1]}.4spad-{$I[2][2]} -o {$I[1][1]}.4shift-{$I[2][2]} -x $X -y $Y -z 0 | |
51 | 51 | fi |
52 | 52 | End |
@@ -1,6 +1,6 @@ | ||
1 | 1 | Rule Create_stack |
2 | 2 | input '*.mrc' |
3 | - output '{$I[1][1]}.stack' | |
3 | + output '{$I[1][1]}-1.stack' | |
4 | 4 | Action |
5 | 5 | data=$(mrcInfo -i {$I[1]} | head -1) |
6 | 6 | x_size=$(echo "${data}" | awk '{printf ("%i", $4)}') |
@@ -1,9 +1,9 @@ | ||
1 | 1 | Rule Main |
2 | - if ($Mode_ROI + $Mode_Ref) != 0 | |
2 | + if (($Mode_ROI != 0) or $Flag_Ref) | |
3 | 3 | input '*.mrc' |
4 | 4 | end |
5 | 5 | |
6 | - if $Mode_Ref == 0 | |
6 | + if $Flag_Ref.not() | |
7 | 7 | input '*.stack' |
8 | 8 | end |
9 | 9 |
@@ -12,18 +12,18 @@ Rule Main | ||
12 | 12 | end |
13 | 13 | |
14 | 14 | if $Flag_3D |
15 | - output '{$I[1][1]}.3d' | |
16 | - output '{$I[1][1]}.ds6' | |
15 | + output '{$I[1][1]}-{$Repeat_Count}.3d'.all | |
16 | + output '{$I[1][1]}-{$Repeat_Count}.ds6'.all | |
17 | 17 | end |
18 | 18 | |
19 | 19 | if $Flag_3DWhole |
20 | - output '{$I[1][1]}.3dwhole' | |
21 | - output '{$I[1][1]}.whole.ds6' | |
20 | + output '{$I[1][1]}-{$Repeat_Count}.3dwhole' | |
21 | + output '{$I[1][1]}-{$Repeat_Count}.whole.ds6' | |
22 | 22 | end |
23 | 23 | |
24 | 24 | if $Flag_3D4S |
25 | - output '{$I[1][1]}.3d4s' | |
26 | - output '{$I[1][1]}.4s.ds6' | |
25 | + output '{$I[1][1]}-{$Repeat_Count}.3d4s' | |
26 | + output '{$I[1][1]}-{$Repeat_Count}.4s.ds6' | |
27 | 27 | end |
28 | 28 | |
29 | 29 | if $Mode_ROI != 0 |
@@ -41,9 +41,11 @@ Flow | ||
41 | 41 | when 2 |
42 | 42 | rule Create_Sample3d |
43 | 43 | rule Create_SampleROI_all |
44 | + when 3 | |
45 | + rule Cutout_ROI | |
44 | 46 | end |
45 | 47 | |
46 | - if $Mode_Ref != 0 | |
48 | + if $Flag_Ref | |
47 | 49 | rule Create_stack |
48 | 50 | end |
49 | 51 |
@@ -54,7 +56,8 @@ Flow | ||
54 | 56 | rule Create_fit_each |
55 | 57 | |
56 | 58 | if $Flag_3D |
57 | - rule Create_3d {filename: $I[1][1].str()} | |
59 | + rule Create_3d {filename: $I[1][1].str(), count: 1.upto($Repeat_Count)} | |
60 | + rule Repeat_3d {count: 1.upto($Repeat_Count - 1)} | |
58 | 61 | end |
59 | 62 | |
60 | 63 | if $Flag_3DWhole |
@@ -39,13 +39,17 @@ param $ROI_ROT3_DELTA := 30 | ||
39 | 39 | $roi_rot3_loop := ($ROI_ROT3_END - $ROI_ROT3_START) / $ROI_ROT3_DELTA |
40 | 40 | param $ROI_SN := 1 |
41 | 41 | |
42 | +## For repeat count | |
43 | +param $Repeat_Count := 2 | |
44 | + | |
42 | 45 | # advanced param |
46 | +## Mode 0: do not, 1: each, 2: all, 3: use Display2 | |
47 | +advanced param $Mode_ROI := 1 | |
43 | 48 | ## Mode 0: do not, 1: each, 2: all |
44 | -advanced param $Mode_ROI := 0 | |
45 | -advanced param $Mode_Ref := 0 | |
46 | 49 | advanced param $Mode_3D := 1 |
47 | 50 | ## Flag true: do, false: do not |
51 | +advanced param $Flag_Ref := true | |
48 | 52 | advanced param $Flag_3D := true |
49 | 53 | advanced param $Flag_3DWhole := false |
50 | 54 | advanced param $Flag_3D4S := false |
51 | -advanced param $Flag_Projection := false | |
55 | +advanced param $Flag_Projection := true |
@@ -0,0 +1,10 @@ | ||
1 | +Rule Repeat_3d | |
2 | + input '*-{$count}.3d' | |
3 | + output '{$I[1][1]}-{$count + 1}.stack' | |
4 | + param $count | |
5 | +Action | |
6 | + mrc3Dto2D -i {$I[1]} -o {$O[1]} -m 1 -InterpolationMode 2 -EulerMode {$REF_ROT_MODE} \ | |
7 | + -Rot1 {$REF_ROT1_START} {$REF_ROT1_END} {$REF_ROT1_DELTA} \ | |
8 | + -Rot2 {$REF_ROT2_START} {$REF_ROT2_END} {$REF_ROT2_DELTA} \ | |
9 | + -Rot3 {$REF_ROT3_START} {$REF_ROT3_END} {$REF_ROT3_DELTA} | |
10 | +End |