annotate tools/new_operations/tables_arithmetic_operations.xml @ 0:9071e359b9a3

Uploaded
author xuebing
date Fri, 09 Mar 2012 19:37:19 -0500
parents
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
0
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
1 <tool id="tables_arithmetic_operations" name="Arithmetic Operations " version="1.0.0">
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
2 <description>on tables</description>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
3
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
4 <command interpreter="perl">
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
5 tables_arithmetic_operations.pl $inputFile1 $inputFile2 $inputArithmeticOperation3 $outputFile1
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
6 </command>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
7
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
8 <inputs>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
9 <param format="tabular" name="inputFile1" type="data" label="Select the first input tabular file"/>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
10 <param format="tabular" name="inputFile2" type="data" label="Select the second input tabular file"/>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
11
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
12 <param name="inputArithmeticOperation3" type="select" label="Choose the arithmetic operation:">
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
13 <option value="Addition">Addition</option>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
14 <option value="Subtraction">Subtraction</option>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
15 <option value="Multiplication">Multiplication</option>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
16 <option value="Division">Division</option>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
17 </param>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
18 </inputs>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
19
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
20 <outputs>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
21 <data format="tabular" name="outputFile1"/>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
22 </outputs>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
23
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
24 <tests>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
25 <test>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
26 <param name="inputFile1" value="numericalTable1.tabular" />
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
27 <param name="inputFile2" value="numericalTable1.tabular" />
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
28 <param name="inputArithmeticOperation3" value="Addition" />
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
29 <output name="outputFile1" file="table_addition_result.tabular" />
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
30 </test>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
31
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
32 <test>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
33 <param name="inputFile1" value="numericalTable1.tabular" />
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
34 <param name="inputFile2" value="numericalTable1.tabular" />
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
35 <param name="inputArithmeticOperation3" value="Subtraction" />
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
36 <output name="outputFile1" file="table_subtraction_result.tabular" />
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
37 </test>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
38
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
39 <test>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
40 <param name="inputFile1" value="numericalTable1.tabular" />
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
41 <param name="inputFile2" value="numericalTable1.tabular" />
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
42 <param name="inputArithmeticOperation3" value="Multiplication" />
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
43 <output name="outputFile1" file="table_multiplication_result.tabular" />
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
44 </test>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
45
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
46 <test>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
47 <param name="inputFile1" value="numericalTable1.tabular" />
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
48 <param name="inputFile2" value="numericalTable1.tabular" />
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
49 <param name="inputArithmeticOperation3" value="Division" />
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
50 <output name="outputFile1" file="table_division_result.tabular" />
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
51 </test>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
52
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
53 </tests>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
54
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
55
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
56 <help>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
57
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
58 .. class:: infomark
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
59
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
60 **What it does**
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
61
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
62 This program implements arithmetic operations on tabular files data. The program takes three inputs:
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
63
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
64 - The first input is a TABULAR format file containing numbers only.
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
65 - The second input is a TABULAR format file containing numbers only.
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
66 - The third input is an arithmetic operation: +, -, x, or / for addition, subtraction, multiplication, or division, respectively.
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
67 - The output file is a TABULAR format file containing the result of implementing the arithmetic operation on both input files.
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
68
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
69
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
70 Notes:
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
71
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
72 - The two files must have the same number of columns and the same number of rows.
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
73 - The output file has the same number of columns and the same number of rows as each of the two input files.
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
74 - In case of division, none of the values in the second input file could be 0, otherwise the program will stop and report an error.
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
75
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
76 **Example**
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
77
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
78 Let us have the first input file as follows::
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
79
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
80 5 4 0
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
81 10 11 12
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
82 1 3 1
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
83 1 2 1
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
84 2 0 4
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
85
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
86 And the second input file as follows::
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
87
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
88 5 4 4
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
89 2 5 8
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
90 1 2 1
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
91 3 2 5
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
92 2 4 4
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
93
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
94 Running the program and choosing "Addition" as an arithmetic operation will give the following output::
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
95
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
96 10 8 4
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
97 12 16 20
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
98 2 5 2
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
99 4 4 6
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
100 4 4 8
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
101
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
102
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
103 </help>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
104
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
105 </tool>