annotate tools/new_operations/subtract_query.xml @ 1:cdcb0ce84a1b

Uploaded
author xuebing
date Fri, 09 Mar 2012 19:45:15 -0500
parents 9071e359b9a3
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
0
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
1 <tool id="subtract_query1" name="Subtract Whole Dataset">
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
2 <description>from another dataset</description>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
3 <command interpreter="python">subtract_query.py $input1 $input2 $begin_col $end_col $output</command>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
4 <inputs>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
5 <param format="txt" name="input2" type="data" label="Subtract" help="Second dataset" />
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
6 <param format="txt" name="input1" type="data" label="from" help="First dataset" />
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
7 <param name="begin_col" type="data_column" data_ref="input1" force_select="False" label="Restrict subtraction between 'begin column'" />
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
8 <param name="end_col" type="data_column" data_ref="input1" force_select="False" label="and 'end column'" help="Specifying columns for restricting subtraction is available only for tabular formatted datasets" />
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
9 </inputs>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
10 <outputs>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
11 <data format="input" name="output" metadata_source="input1" />
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
12 </outputs>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
13 <tests>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
14 <!-- Subtract 2 non-tabular files with no column restrictions. -->
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
15 <!-- Cannot figure out why this test won't pass, it works in real time...
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
16 <test>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
17 <param name="input1" value="1.txt" />
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
18 <param name="input2" value="2.txt" />
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
19 <param name="begin_col" value="None" />
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
20 <param name="end_col" value="None" />
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
21 <output name="output" file="subtract-query-1.dat" />
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
22 </test>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
23 -->
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
24 <!-- Subtract 2 tabular files with no column restrictions. -->
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
25 <test>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
26 <param name="input1" value="eq-showbeginning.dat" />
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
27 <param name="input2" value="eq-showtail.dat" />
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
28 <param name="begin_col" value="None" />
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
29 <param name="end_col" value="None" />
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
30 <output name="output" file="subtract-query-2.dat" />
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
31 </test>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
32 <!-- Subtract 2 tabular files with column restrictions. -->
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
33 <test>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
34 <param name="input1" value="eq-showbeginning.dat" />
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
35 <param name="input2" value="eq-removebeginning.dat" />
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
36 <param name="begin_col" value="c1" />
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
37 <param name="end_col" value="c3" />
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
38 <output name="output" file="subtract-query-3.dat" />
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
39 </test>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
40 <!-- Subtract a non-tabular file from a tabular file with no column restrictions. -->
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
41 <test>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
42 <param name="input1" value="eq-showbeginning.dat" />
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
43 <param name="input2" value="2.txt" />
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
44 <param name="begin_col" value="None" />
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
45 <param name="end_col" value="None" />
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
46 <output name="output" file="subtract-query-4.dat" />
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
47 </test>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
48 </tests>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
49 <help>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
50
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
51 .. class:: infomark
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
52
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
53 **TIP:** This tool complements the tool in the **Operate on Genomic Intervals** tool set which subtracts the intervals of two datasets.
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
54
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
55
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
56 -----
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
57
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
58 **Syntax**
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
59
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
60 This tool subtracts an entire dataset from another dataset.
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
61
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
62 - Any text format is valid.
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
63 - If both dataset formats are tabular, you may restrict the subtraction to specific columns **contained in both datasets** and the resulting dataset will include only the columns specified.
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
64 - The begin column must be less than or equal to the end column. If it is not, begin column is switched with end column.
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
65 - If begin column is specified but end column is not, end column will default to begin_column (and vice versa).
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
66 - All blank and comment lines are skipped and not included in the resulting dataset (comment lines are lines beginning with a # character).
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
67 - Duplicate lines are eliminated from both dataset prior to subtraction. If any duplicate lines were eliminated from the first dataset, the number is displayed in the resulting history item.
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
68
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
69 -----
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
70
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
71 **Example**
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
72
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
73 If this is the **First dataset**::
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
74
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
75 chr1 4225 19670
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
76 chr10 6 8
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
77 chr1 24417 24420
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
78 chr6_hla_hap2 0 150
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
79 chr2 1 5
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
80 chr10 2 10
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
81 chr1 30 55
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
82 chrY 1 20
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
83 chr1 1225979 42287290
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
84 chr10 7 8
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
85
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
86 and this is the **Second dataset**::
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
87
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
88 chr1 4225 19670
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
89 chr10 6 8
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
90 chr1 24417 24420
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
91 chr6_hla_hap2 0 150
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
92 chr2 1 5
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
93 chr1 30 55
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
94 chrY 1 20
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
95 chr1 1225979 42287290
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
96
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
97 Subtracting the **Second dataset** from the **First dataset** (including all columns) will yield::
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
98
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
99 chr10 7 8
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
100 chr10 2 10
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
101
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
102 Conversely, subtracting the **First dataset** from the **Second dataset** (including all columns) will result in an empty dataset.
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
103
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
104 Subtracting the **Second dataset** from the **First dataset** (restricting to columns c1 and c2) will yield::
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
105
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
106 chr10 7
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
107 chr10 2
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
108
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
109 </help>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
110 </tool>