Skip to content
Permalink
Newer
Older
100644 68 lines (68 sloc) 2.71 KB
1
<?xml version="1.0"?>
2
<process>
3
<name>EXAMPLE</name>
4
<version>1</version>
5
<author>
6
<name>John Doe</name>
7
<email>john@doe.org</email>
8
</author>
9
<description>
10
This file illustrates the basic specification of a process. The example analysis in this process counts - in a rather complicated way - the number
11
of lines in an input file that contain two specified words and checks if this number is equal to the number of lines in a reference file. The output file generated by an analysis run of this process contains a yes/no answer.
12
This process describes an analysis that can be executed on most computers running a common Linux installation such as Debian. All command lines listed below can be tested in a shell.
13
</description>
14
<inputs>
15
<filetype>
16
<identifier>input_file</identifier>
17
<format>txt</format>
18
<quantity>single</quantity>
19
<comment>The input file can be of arbitrary length.</comment>
20
</filetype>
21
</inputs>
22
<references>
23
<filetype>
24
<identifier>ref_file</identifier>
25
<format>txt</format>
26
<quantity>single</quantity>
27
<comment>The reference file can be of arbitrary length.</comment>
28
</filetype>
29
</references>
30
<outputs>
31
<filetype>
32
<identifier>result_file</identifier>
33
<format>txt</format>
34
<quantity>single</quantity>
35
<comment>The result file contains only yes or no.</comment>
36
</filetype>
37
</outputs>
38
<software>
39
<tool>
40
<name>grep</name>
41
<version>2.12</version>
42
<command_line><![CDATA[ grep {word1} {input_file} > temp_file ]]></command_line>
43
<loop></loop>
44
<comment>All lines having a match for the first word are saved to a temporary file.</comment>
45
</tool>
46
<tool>
47
<name>grep</name>
48
<version>2.12</version>
49
<command_line><![CDATA[ grep {word2} temp_file > temp_file2 ]]></command_line>
50
<loop></loop>
51
<comment>All lines having a match for both words are saved to a temporary file.</comment>
52
</tool>
53
<tool>
54
<name>wc, cut</name>
55
<version>8.13, 8.13</version>
56
<command_line><![CDATA[ wc -l temp_file2 | cut -d " " -f 1 > temp_file3 ]]></command_line>
57
<loop></loop>
58
<comment>wc outputs the number of lines and the corresponding filename; we reduce the output to just the number using cut</comment>
59
</tool>
60
<tool>
61
<name>wc, cut, cat</name>
62
<version>8.13, 8.13, 8.13</version>
63
<command_line><![CDATA[ if [ `cat temp_file3` -eq `wc -l {ref_file} | cut -d " " -f 1` ]; then echo "yes" > {result_file}; else echo "no" > {result_file}; fi; ]]></command_line>
64
<loop></loop>
65
<comment>Since this command line contains some bash syntax, the process author should state the precise version of the shell environment: GNU bash ver. 4.2.37</comment>
66
</tool>
67
</software>
68
</process>