OSDN Git Service

Add: tutorial for PIONE-PNML v2.0.2p0054
authorkinoshita-eos <kinoshita@yasunaga-lab.bio.kyutech.ac.jp>
Tue, 4 Nov 2014 06:28:18 +0000 (15:28 +0900)
committerkinoshita-eos <kinoshita@yasunaga-lab.bio.kyutech.ac.jp>
Tue, 4 Nov 2014 06:28:18 +0000 (15:28 +0900)
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 [new file with mode: 0644]
SampleCode/PIONE-PNML/Basic1/HelloWorld.pnml [new file with mode: 0644]
SampleCode/PIONE-PNML/Basic2/Serial2.md [new file with mode: 0644]
SampleCode/PIONE-PNML/Basic2/Serial2.pnml [new file with mode: 0644]
SampleCode/PIONE-PNML/Basic2/SerialInput/test1.in [new file with mode: 0644]
SampleCode/PIONE-PNML/Basic2/SerialInput/test2.in [new file with mode: 0644]
SampleCode/PIONE-PNML/Basic2/SerialInput/test3.in [new file with mode: 0644]
SampleCode/PIONE-PNML/Basic2/SerialInput/test4.in [new file with mode: 0644]
SampleCode/PIONE-PNML/Basic2/SerialInput/test5.in [new file with mode: 0644]
SampleCode/PIONE/Advanced1/CenterGet.pione [new file with mode: 0644]

diff --git a/SampleCode/PIONE-PNML/Basic1/HelloWorld.md b/SampleCode/PIONE-PNML/Basic1/HelloWorld.md
new file mode 100644 (file)
index 0000000..c44221c
--- /dev/null
@@ -0,0 +1 @@
+# HelloWorld.pione\r\r## Hello\rHere, you can write Comment.\r\r\r```\recho "Hello PIONE world !" > {$O[1]}\r```\r
\ 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 (file)
index 0000000..5d94e55
--- /dev/null
@@ -0,0 +1,63 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--PLEASE DO NOT EDIT THIS FILE
+Created with Workflow PetriNet Designer Version 3.2.0 (woped.org)-->
+<pnml>
+  <net type="http://www.informatik.hu-berlin.de/top/pntd/ptNetb" id="noID">
+    <place id="p3">
+      <name>
+        <text>>'message.txt'</text>
+        <graphics>
+          <offset x="400" y="90"/>
+        </graphics>
+      </name>
+      <graphics>
+        <position x="420" y="50"/>
+        <dimension x="40" y="40"/>
+      </graphics>
+    </place>
+    <transition id="t2">
+      <name>
+        <text>Hello</text>
+        <graphics>
+          <offset x="270" y="90"/>
+        </graphics>
+      </name>
+      <graphics>
+        <position x="270" y="50"/>
+        <dimension x="40" y="40"/>
+      </graphics>
+      <toolspecific tool="WoPeD" version="1.0">
+        <time>0</time>
+        <timeUnit>1</timeUnit>
+        <orientation>1</orientation>
+      </toolspecific>
+    </transition>
+    <arc id="a3" source="t2" target="p3">
+      <inscription>
+        <text>1</text>
+      </inscription>
+      <graphics/>
+      <toolspecific tool="WoPeD" version="1.0">
+        <probability>1.0</probability>
+        <displayProbabilityOn>false</displayProbabilityOn>
+        <displayProbabilityPosition x="500.0" y="0.0"/>
+      </toolspecific>
+    </arc>
+    <toolspecific tool="WoPeD" version="1.0">
+      <bounds>
+        <position x="11" y="33"/>
+        <dimension x="755" y="474"/>
+      </bounds>
+      <scale>100</scale>
+      <treeWidthRight>597</treeWidthRight>
+      <overviewPanelVisible>true</overviewPanelVisible>
+      <treeHeightOverview>100</treeHeightOverview>
+      <treePanelVisible>true</treePanelVisible>
+      <verticalLayout>false</verticalLayout>
+      <resources/>
+      <simulations/>
+      <partnerLinks/>
+      <variables/>
+    </toolspecific>
+  </net>
+</pnml>
\ 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 (file)
index 0000000..e961928
--- /dev/null
@@ -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 (file)
index 0000000..8345a94
--- /dev/null
@@ -0,0 +1,239 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--PLEASE DO NOT EDIT THIS FILE
+Created with Workflow PetriNet Designer Version 3.2.0 (woped.org)-->
+<pnml>
+  <net type="http://www.informatik.hu-berlin.de/top/pntd/ptNetb" id="noID">
+    <place id="p1">
+      <name>
+        <text>&lt;'*.in'</text>
+        <graphics>
+          <offset x="10" y="60"/>
+        </graphics>
+      </name>
+      <graphics>
+        <position x="10" y="20"/>
+        <dimension x="40" y="40"/>
+      </graphics>
+    </place>
+    <place id="p3">
+      <name>
+        <text>'{$*}.out'</text>
+        <graphics>
+          <offset x="410" y="60"/>
+        </graphics>
+      </name>
+      <graphics>
+        <position x="410" y="20"/>
+        <dimension x="40" y="40"/>
+      </graphics>
+    </place>
+    <place id="p4">
+      <name>
+        <text>'*.route'</text>
+        <graphics>
+          <offset x="260" y="60"/>
+        </graphics>
+      </name>
+      <graphics>
+        <position x="270" y="20"/>
+        <dimension x="40" y="40"/>
+      </graphics>
+    </place>
+    <place id="p5">
+      <name>
+        <text>'{$*}.route'</text>
+        <graphics>
+          <offset x="130" y="60"/>
+        </graphics>
+      </name>
+      <graphics>
+        <position x="140" y="20"/>
+        <dimension x="40" y="40"/>
+      </graphics>
+    </place>
+    <place id="p6">
+      <name>
+        <text>>'*.out'</text>
+        <graphics>
+          <offset x="530" y="60"/>
+        </graphics>
+      </name>
+      <graphics>
+        <position x="530" y="20"/>
+        <dimension x="40" y="40"/>
+      </graphics>
+    </place>
+    <transition id="t6">
+      <name>
+        <text/>
+        <graphics>
+          <offset x="200" y="60"/>
+        </graphics>
+      </name>
+      <graphics>
+        <position x="200" y="20"/>
+        <dimension x="40" y="40"/>
+      </graphics>
+      <toolspecific tool="WoPeD" version="1.0">
+        <time>0</time>
+        <timeUnit>1</timeUnit>
+        <orientation>1</orientation>
+      </toolspecific>
+    </transition>
+    <transition id="t7">
+      <name>
+        <text/>
+        <graphics>
+          <offset x="470" y="60"/>
+        </graphics>
+      </name>
+      <graphics>
+        <position x="470" y="20"/>
+        <dimension x="40" y="40"/>
+      </graphics>
+      <toolspecific tool="WoPeD" version="1.0">
+        <time>0</time>
+        <timeUnit>1</timeUnit>
+        <orientation>1</orientation>
+      </toolspecific>
+    </transition>
+    <transition id="t1">
+      <name>
+        <text>First</text>
+        <graphics>
+          <offset x="80" y="60"/>
+        </graphics>
+      </name>
+      <graphics>
+        <position x="80" y="20"/>
+        <dimension x="40" y="40"/>
+      </graphics>
+      <toolspecific tool="WoPeD" version="1.0">
+        <time>0</time>
+        <timeUnit>1</timeUnit>
+        <orientation>1</orientation>
+      </toolspecific>
+    </transition>
+    <transition id="t2">
+      <name>
+        <text>Second</text>
+        <graphics>
+          <offset x="340" y="60"/>
+        </graphics>
+      </name>
+      <graphics>
+        <position x="340" y="20"/>
+        <dimension x="40" y="40"/>
+      </graphics>
+      <toolspecific tool="WoPeD" version="1.0">
+        <time>0</time>
+        <timeUnit>1</timeUnit>
+        <orientation>1</orientation>
+      </toolspecific>
+    </transition>
+    <arc id="a1" source="p1" target="t1">
+      <inscription>
+        <text>1</text>
+      </inscription>
+      <graphics/>
+      <toolspecific tool="WoPeD" version="1.0">
+        <probability>1.0</probability>
+        <displayProbabilityOn>false</displayProbabilityOn>
+        <displayProbabilityPosition x="500.0" y="0.0"/>
+      </toolspecific>
+    </arc>
+    <arc id="a11" source="t6" target="p4">
+      <inscription>
+        <text>1</text>
+      </inscription>
+      <graphics/>
+      <toolspecific tool="WoPeD" version="1.0">
+        <probability>1.0</probability>
+        <displayProbabilityOn>false</displayProbabilityOn>
+        <displayProbabilityPosition x="500.0" y="0.0"/>
+      </toolspecific>
+    </arc>
+    <arc id="a10" source="p5" target="t6">
+      <inscription>
+        <text>1</text>
+      </inscription>
+      <graphics/>
+      <toolspecific tool="WoPeD" version="1.0">
+        <probability>1.0</probability>
+        <displayProbabilityOn>false</displayProbabilityOn>
+        <displayProbabilityPosition x="500.0" y="0.0"/>
+      </toolspecific>
+    </arc>
+    <arc id="a3" source="t2" target="p3">
+      <inscription>
+        <text>1</text>
+      </inscription>
+      <graphics/>
+      <toolspecific tool="WoPeD" version="1.0">
+        <probability>1.0</probability>
+        <displayProbabilityOn>false</displayProbabilityOn>
+        <displayProbabilityPosition x="500.0" y="0.0"/>
+      </toolspecific>
+    </arc>
+    <arc id="a13" source="t7" target="p6">
+      <inscription>
+        <text>1</text>
+      </inscription>
+      <graphics/>
+      <toolspecific tool="WoPeD" version="1.0">
+        <probability>1.0</probability>
+        <displayProbabilityOn>false</displayProbabilityOn>
+        <displayProbabilityPosition x="500.0" y="0.0"/>
+      </toolspecific>
+    </arc>
+    <arc id="a12" source="p3" target="t7">
+      <inscription>
+        <text>1</text>
+      </inscription>
+      <graphics/>
+      <toolspecific tool="WoPeD" version="1.0">
+        <probability>1.0</probability>
+        <displayProbabilityOn>false</displayProbabilityOn>
+        <displayProbabilityPosition x="500.0" y="0.0"/>
+      </toolspecific>
+    </arc>
+    <arc id="a6" source="p4" target="t2">
+      <inscription>
+        <text>1</text>
+      </inscription>
+      <graphics/>
+      <toolspecific tool="WoPeD" version="1.0">
+        <probability>1.0</probability>
+        <displayProbabilityOn>false</displayProbabilityOn>
+        <displayProbabilityPosition x="500.0" y="0.0"/>
+      </toolspecific>
+    </arc>
+    <arc id="a9" source="t1" target="p5">
+      <inscription>
+        <text>1</text>
+      </inscription>
+      <graphics/>
+      <toolspecific tool="WoPeD" version="1.0">
+        <probability>1.0</probability>
+        <displayProbabilityOn>false</displayProbabilityOn>
+        <displayProbabilityPosition x="500.0" y="0.0"/>
+      </toolspecific>
+    </arc>
+    <toolspecific tool="WoPeD" version="1.0">
+      <bounds>
+        <position x="11" y="33"/>
+        <dimension x="755" y="474"/>
+      </bounds>
+      <scale>100</scale>
+      <treeWidthRight>597</treeWidthRight>
+      <overviewPanelVisible>true</overviewPanelVisible>
+      <treeHeightOverview>100</treeHeightOverview>
+      <treePanelVisible>true</treePanelVisible>
+      <verticalLayout>false</verticalLayout>
+      <resources/>
+      <simulations/>
+      <partnerLinks/>
+      <variables/>
+    </toolspecific>
+  </net>
+</pnml>
\ 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 (file)
index 0000000..7ee0007
--- /dev/null
@@ -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 (file)
index 0000000..da7f847
--- /dev/null
@@ -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 (file)
index 0000000..107b687
--- /dev/null
@@ -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 (file)
index 0000000..94c6da4
--- /dev/null
@@ -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 (file)
index 0000000..0719398
--- /dev/null
@@ -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 (file)
index 0000000..8ca2fbe
--- /dev/null
@@ -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