From 34c3378beb409e2d86fd188e798a5b5660974b28 Mon Sep 17 00:00:00 2001 From: kinoshita-eos Date: Tue, 4 Nov 2014 15:28:18 +0900 Subject: [PATCH] Add: tutorial for PIONE-PNML new file: SampleCode/PIONE-PNML/Basic1/HelloWorld.md new file: SampleCode/PIONE-PNML/Basic1/HelloWorld.pnml new file: SampleCode/PIONE-PNML/Basic2/Serial2.md new file: SampleCode/PIONE-PNML/Basic2/Serial2.pnml new file: SampleCode/PIONE-PNML/Basic2/SerialInput/test1.in new file: SampleCode/PIONE-PNML/Basic2/SerialInput/test2.in new file: SampleCode/PIONE-PNML/Basic2/SerialInput/test3.in new file: SampleCode/PIONE-PNML/Basic2/SerialInput/test4.in new file: SampleCode/PIONE-PNML/Basic2/SerialInput/test5.in Add: tutorial for PIONE new file: SampleCode/PIONE/Advanced1/CenterGet.pione --- SampleCode/PIONE-PNML/Basic1/HelloWorld.md | 1 + SampleCode/PIONE-PNML/Basic1/HelloWorld.pnml | 63 ++++++ SampleCode/PIONE-PNML/Basic2/Serial2.md | 15 ++ SampleCode/PIONE-PNML/Basic2/Serial2.pnml | 239 ++++++++++++++++++++++ SampleCode/PIONE-PNML/Basic2/SerialInput/test1.in | 2 + SampleCode/PIONE-PNML/Basic2/SerialInput/test2.in | 2 + SampleCode/PIONE-PNML/Basic2/SerialInput/test3.in | 2 + SampleCode/PIONE-PNML/Basic2/SerialInput/test4.in | 3 + SampleCode/PIONE-PNML/Basic2/SerialInput/test5.in | 9 + SampleCode/PIONE/Advanced1/CenterGet.pione | 67 ++++++ 10 files changed, 403 insertions(+) create mode 100644 SampleCode/PIONE-PNML/Basic1/HelloWorld.md create mode 100644 SampleCode/PIONE-PNML/Basic1/HelloWorld.pnml create mode 100644 SampleCode/PIONE-PNML/Basic2/Serial2.md create mode 100644 SampleCode/PIONE-PNML/Basic2/Serial2.pnml create mode 100644 SampleCode/PIONE-PNML/Basic2/SerialInput/test1.in create mode 100644 SampleCode/PIONE-PNML/Basic2/SerialInput/test2.in create mode 100644 SampleCode/PIONE-PNML/Basic2/SerialInput/test3.in create mode 100644 SampleCode/PIONE-PNML/Basic2/SerialInput/test4.in create mode 100644 SampleCode/PIONE-PNML/Basic2/SerialInput/test5.in create mode 100644 SampleCode/PIONE/Advanced1/CenterGet.pione diff --git a/SampleCode/PIONE-PNML/Basic1/HelloWorld.md b/SampleCode/PIONE-PNML/Basic1/HelloWorld.md new file mode 100644 index 0000000..c44221c --- /dev/null +++ b/SampleCode/PIONE-PNML/Basic1/HelloWorld.md @@ -0,0 +1 @@ +# HelloWorld.pione ## Hello Here, you can write Comment. ``` echo "Hello PIONE world !" > {$O[1]} ``` \ No newline at end of file diff --git a/SampleCode/PIONE-PNML/Basic1/HelloWorld.pnml b/SampleCode/PIONE-PNML/Basic1/HelloWorld.pnml new file mode 100644 index 0000000..5d94e55 --- /dev/null +++ b/SampleCode/PIONE-PNML/Basic1/HelloWorld.pnml @@ -0,0 +1,63 @@ + + + + + + + >'message.txt' + + + + + + + + + + + + Hello + + + + + + + + + + + 1 + 1 + + + + + 1 + + + + 1.0 + false + + + + + + + + + 100 + 597 + true + 100 + true + false + + + + + + + \ No newline at end of file diff --git a/SampleCode/PIONE-PNML/Basic2/Serial2.md b/SampleCode/PIONE-PNML/Basic2/Serial2.md new file mode 100644 index 0000000..e961928 --- /dev/null +++ b/SampleCode/PIONE-PNML/Basic2/Serial2.md @@ -0,0 +1,15 @@ +# Serial2.pione + +## First +Multiply 2 to all input data. + +``` +awk '{print $1*2}' {$I[1]} > {$O[1]} +``` + +## Second +Add 1 to all input data. + +``` +awk '{print $1+1}' {$I[1]} > {$O[1]} +``` diff --git a/SampleCode/PIONE-PNML/Basic2/Serial2.pnml b/SampleCode/PIONE-PNML/Basic2/Serial2.pnml new file mode 100644 index 0000000..8345a94 --- /dev/null +++ b/SampleCode/PIONE-PNML/Basic2/Serial2.pnml @@ -0,0 +1,239 @@ + + + + + + + <'*.in' + + + + + + + + + + + + '{$*}.out' + + + + + + + + + + + + '*.route' + + + + + + + + + + + + '{$*}.route' + + + + + + + + + + + + >'*.out' + + + + + + + + + + + + + + + + + + + + + + + 1 + 1 + + + + + + + + + + + + + + + + 1 + 1 + + + + + First + + + + + + + + + + + 1 + 1 + + + + + Second + + + + + + + + + + + 1 + 1 + + + + + 1 + + + + 1.0 + false + + + + + + 1 + + + + 1.0 + false + + + + + + 1 + + + + 1.0 + false + + + + + + 1 + + + + 1.0 + false + + + + + + 1 + + + + 1.0 + false + + + + + + 1 + + + + 1.0 + false + + + + + + 1 + + + + 1.0 + false + + + + + + 1 + + + + 1.0 + false + + + + + + + + + 100 + 597 + true + 100 + true + false + + + + + + + \ No newline at end of file diff --git a/SampleCode/PIONE-PNML/Basic2/SerialInput/test1.in b/SampleCode/PIONE-PNML/Basic2/SerialInput/test1.in new file mode 100644 index 0000000..7ee0007 --- /dev/null +++ b/SampleCode/PIONE-PNML/Basic2/SerialInput/test1.in @@ -0,0 +1,2 @@ +3 +5 diff --git a/SampleCode/PIONE-PNML/Basic2/SerialInput/test2.in b/SampleCode/PIONE-PNML/Basic2/SerialInput/test2.in new file mode 100644 index 0000000..da7f847 --- /dev/null +++ b/SampleCode/PIONE-PNML/Basic2/SerialInput/test2.in @@ -0,0 +1,2 @@ +2 +4 diff --git a/SampleCode/PIONE-PNML/Basic2/SerialInput/test3.in b/SampleCode/PIONE-PNML/Basic2/SerialInput/test3.in new file mode 100644 index 0000000..107b687 --- /dev/null +++ b/SampleCode/PIONE-PNML/Basic2/SerialInput/test3.in @@ -0,0 +1,2 @@ +7 +1 diff --git a/SampleCode/PIONE-PNML/Basic2/SerialInput/test4.in b/SampleCode/PIONE-PNML/Basic2/SerialInput/test4.in new file mode 100644 index 0000000..94c6da4 --- /dev/null +++ b/SampleCode/PIONE-PNML/Basic2/SerialInput/test4.in @@ -0,0 +1,3 @@ +8 +9 +6 diff --git a/SampleCode/PIONE-PNML/Basic2/SerialInput/test5.in b/SampleCode/PIONE-PNML/Basic2/SerialInput/test5.in new file mode 100644 index 0000000..0719398 --- /dev/null +++ b/SampleCode/PIONE-PNML/Basic2/SerialInput/test5.in @@ -0,0 +1,9 @@ +1 +2 +3 +4 +5 +6 +7 +8 +9 diff --git a/SampleCode/PIONE/Advanced1/CenterGet.pione b/SampleCode/PIONE/Advanced1/CenterGet.pione new file mode 100644 index 0000000..8ca2fbe --- /dev/null +++ b/SampleCode/PIONE/Advanced1/CenterGet.pione @@ -0,0 +1,67 @@ +Rule Main + input '*.mrc'.all + input '*.parameters'.all + output '*.roi'.all + output '*.tiff'.all +Flow +# rule Initial + rule First + rule Second + rule Final +End + +Rule Initial + input '${EOS_HOME}/tutorial/SampleData/1VOM.mrc' + input '${EOS_HOME}/tutorial/SampleData/1VOM-N.mrc' + output '1VOM.mrc' + output '1VOM-N.mrc' +Action + ln -s {$I[1]} {$O[1]} + ln -s {$I[2]} {$O[2]} +End + +Rule First + input '*.mrc' + output '{$I[1]}.info' +Action + mrcImageInfo -I -i {$I[1]} \ + | head -2 | tail -1 \ + | awk '{printf("%s %s %s", $3, $4, $5)}' \ + | tr -c '[0-9]' ' ' \ + > {$O[1]} +End + +Rule Second + input '*.mrc' + input '*.info' + input '{$I[1][1]}.parameters' + output '{$I[1][1]}.roi' +Action + Center_x=$(awk '{printf("%s\n", $1)}' {$I[2]}) + Center_y=$(awk '{printf("%s\n", $2)}' {$I[2]}) + Center_z=$(awk '{printf("%s\n", $3)}' {$I[2]}) + N_x=$(awk '{printf("%s\n", $1)}' {$I[3]}) + N_y=$(awk '{printf("%s\n", $2)}' {$I[3]}) + N_z=$(awk '{printf("%s\n", $3)}' {$I[3]}) + mrcImageCenterGet -i {$I[1]} -o {$O[1]} \ + -Cx $Center_x -Cy $Center_y -Cz $Center_z \ + -Nx $N_x -Ny $N_y -Nz $N_z +End + +Rule Final + input '*.mrc' + input '*.roi' + output '{$I[1]}-1.tiff' + output '{$I[2]}-1.tiff' + output '{$I[1]}-2.tiff' + output '{$I[2]}-2.tiff' +Action + mrcImageProjection -i {$I[1]} -o {$I[1]}.2d + mrc2tiff -i {$I[1]}.2d -o {$O[1]} + mrcImageProjection -i {$I[1]} -o {$I[1]}.2d1 -m 1 + mrc2tiff -i {$I[1]}.2d1 -o {$O[3]} + mrcImageProjection -i {$I[2]} -o {$I[2]}.2d + mrc2tiff -i {$I[2]}.2d -o {$O[2]} + mrcImageProjection -i {$I[2]} -o {$I[2]}.2d1 -m 1 + mrc2tiff -i {$I[2]}.2d1 -o {$O[4]} +End -- 2.11.0