• R/O
  • HTTP
  • SSH
  • HTTPS

tutorial: Commit

This repository is for tutorials of Eos.


Commit MetaInfo

Revisión00b17156a869ad17ac439f1dc40f7707b02d8ef7 (tree)
Tiempo2015-02-16 10:59:47
Autorkinoshita-eos <kinoshita@yasu...>
Commiterkinoshita-eos

Log Message

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

Cambiar Resumen

Diferencia incremental

--- a/SampleCode/PIONE/Advanced4/Anotation.pione
+++ b/SampleCode/PIONE/Advanced4/Anotation.pione
@@ -1,5 +1,5 @@
11 .@ PackageName :: "SingleParticle_3DReconstruction"
22 .@ Editor :: "Kinoshita"
3-.@ Tag :: "v0.2.0"
3+.@ Tag :: "v0.3.0"
44 # Ref: Makefile in Eos v2.1.16p0093
55 # $EOS_HOME/Integration/SingleParticle/Makefile-fromKanae
\ No newline at end of file
--- a/SampleCode/PIONE/Advanced4/Create_3d.pione
+++ b/SampleCode/PIONE/Advanced4/Create_3d.pione
@@ -1,18 +1,19 @@
11 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'
66 param $filename
7+ param $count
78 Action
89 # Sum_3dinfo_3dlst
910 for info in {$I[1]}
1011 do
11- cat $info >> {$filename}.3dlst
12+ cat $info >> {$filename}-{$count}.3dlst
1213 done
1314
1415 # 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
1617
1718 # Convert_3d_ds6
1819 mrc2map -i {$O[1]} -o {$O[2]} -m 3
--- a/SampleCode/PIONE/Advanced4/Create_SampleROI.pione
+++ b/SampleCode/PIONE/Advanced4/Create_SampleROI.pione
@@ -35,3 +35,15 @@ Action
3535 done
3636 done
3737 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
--- a/SampleCode/PIONE/Advanced4/Create_fit_each.pione
+++ b/SampleCode/PIONE/Advanced4/Create_fit_each.pione
@@ -1,52 +1,52 @@
11 Rule Create_fit_each
22 input '*.pad'
3- input '*.stack'
3+ input '*-*.stack'
44 if ($Flag_3DWhole or $Flag_3D4S)
55 input '{$I[1][1]}.roi'
66 end
77 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]}'
1010 end
1111 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]}'
1414 end
1515 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]}'
1818 end
1919 Action
2020 # 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]} \
2222 -n {$N_ROT} -m 18 -nRot1 {$N_ROT1} -nRot2 {$N_ROT2} -nRot3 {$N_ROT3} > /dev/null
2323
2424 # fit_3dinfo
2525 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]}
2828 fi
2929
3030 # fit_3dwholeinfo
3131 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
3737 fi
3838
3939 # fit_3d4sinfo
4040 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]}`;
4545 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}
4747 width=`expr {$X_SIZE} / {$SHRINK4S}`
4848 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
5151 fi
5252 End
--- a/SampleCode/PIONE/Advanced4/Create_stack.pione
+++ b/SampleCode/PIONE/Advanced4/Create_stack.pione
@@ -1,6 +1,6 @@
11 Rule Create_stack
22 input '*.mrc'
3- output '{$I[1][1]}.stack'
3+ output '{$I[1][1]}-1.stack'
44 Action
55 data=$(mrcInfo -i {$I[1]} | head -1)
66 x_size=$(echo "${data}" | awk '{printf ("%i", $4)}')
--- a/SampleCode/PIONE/Advanced4/Main.pione
+++ b/SampleCode/PIONE/Advanced4/Main.pione
@@ -1,9 +1,9 @@
11 Rule Main
2- if ($Mode_ROI + $Mode_Ref) != 0
2+ if (($Mode_ROI != 0) or $Flag_Ref)
33 input '*.mrc'
44 end
55
6- if $Mode_Ref == 0
6+ if $Flag_Ref.not()
77 input '*.stack'
88 end
99
@@ -12,18 +12,18 @@ Rule Main
1212 end
1313
1414 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
1717 end
1818
1919 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'
2222 end
2323
2424 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'
2727 end
2828
2929 if $Mode_ROI != 0
@@ -41,9 +41,11 @@ Flow
4141 when 2
4242 rule Create_Sample3d
4343 rule Create_SampleROI_all
44+ when 3
45+ rule Cutout_ROI
4446 end
4547
46- if $Mode_Ref != 0
48+ if $Flag_Ref
4749 rule Create_stack
4850 end
4951
@@ -54,7 +56,8 @@ Flow
5456 rule Create_fit_each
5557
5658 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)}
5861 end
5962
6063 if $Flag_3DWhole
--- a/SampleCode/PIONE/Advanced4/Parameter.pione
+++ b/SampleCode/PIONE/Advanced4/Parameter.pione
@@ -39,13 +39,17 @@ param $ROI_ROT3_DELTA := 30
3939 $roi_rot3_loop := ($ROI_ROT3_END - $ROI_ROT3_START) / $ROI_ROT3_DELTA
4040 param $ROI_SN := 1
4141
42+## For repeat count
43+param $Repeat_Count := 2
44+
4245 # advanced param
46+## Mode 0: do not, 1: each, 2: all, 3: use Display2
47+advanced param $Mode_ROI := 1
4348 ## Mode 0: do not, 1: each, 2: all
44-advanced param $Mode_ROI := 0
45-advanced param $Mode_Ref := 0
4649 advanced param $Mode_3D := 1
4750 ## Flag true: do, false: do not
51+advanced param $Flag_Ref := true
4852 advanced param $Flag_3D := true
4953 advanced param $Flag_3DWhole := false
5054 advanced param $Flag_3D4S := false
51-advanced param $Flag_Projection := false
55+advanced param $Flag_Projection := true
--- /dev/null
+++ b/SampleCode/PIONE/Advanced4/Repeat_3d.pione
@@ -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
Show on old repository browser