annotate subtract_query.xml @ 0:8a3448727cec draft

Imported from capsule None
author devteam
date Tue, 01 Apr 2014 09:12:49 -0400
parents
children f58ba0382c26
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
0
8a3448727cec Imported from capsule None
devteam
parents:
diff changeset
1 <tool id="subtract_query1" name="Subtract Whole Dataset" version="0.1">
8a3448727cec Imported from capsule None
devteam
parents:
diff changeset
2 <description>from another dataset</description>
8a3448727cec Imported from capsule None
devteam
parents:
diff changeset
3 <requirements>
8a3448727cec Imported from capsule None
devteam
parents:
diff changeset
4 <requirement type="package" version="0.7.1">bx-python</requirement>
8a3448727cec Imported from capsule None
devteam
parents:
diff changeset
5 <requirement type="package" version="1.0.0">galaxy-ops</requirement>
8a3448727cec Imported from capsule None
devteam
parents:
diff changeset
6 </requirements>
8a3448727cec Imported from capsule None
devteam
parents:
diff changeset
7 <command interpreter="python">
8a3448727cec Imported from capsule None
devteam
parents:
diff changeset
8 subtract_query.py $input1 $input2 $begin_col $end_col $output
8a3448727cec Imported from capsule None
devteam
parents:
diff changeset
9 #if str($ignore_empty_end_cols) == 'true':
8a3448727cec Imported from capsule None
devteam
parents:
diff changeset
10 --ignore-empty-end-cols
8a3448727cec Imported from capsule None
devteam
parents:
diff changeset
11 #end if
8a3448727cec Imported from capsule None
devteam
parents:
diff changeset
12
8a3448727cec Imported from capsule None
devteam
parents:
diff changeset
13 </command>
8a3448727cec Imported from capsule None
devteam
parents:
diff changeset
14 <inputs>
8a3448727cec Imported from capsule None
devteam
parents:
diff changeset
15 <param format="txt" name="input2" type="data" label="Subtract" help="Second dataset" />
8a3448727cec Imported from capsule None
devteam
parents:
diff changeset
16 <param format="txt" name="input1" type="data" label="from" help="First dataset" />
8a3448727cec Imported from capsule None
devteam
parents:
diff changeset
17 <param name="begin_col" type="data_column" data_ref="input1" force_select="False" label="Restrict subtraction between 'begin column'" />
8a3448727cec Imported from capsule None
devteam
parents:
diff changeset
18 <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" />
8a3448727cec Imported from capsule None
devteam
parents:
diff changeset
19 <param name="ignore_empty_end_cols" type="boolean" label="Ignore empty columns and whitespace at end of line when subtracting"/>
8a3448727cec Imported from capsule None
devteam
parents:
diff changeset
20 </inputs>
8a3448727cec Imported from capsule None
devteam
parents:
diff changeset
21 <outputs>
8a3448727cec Imported from capsule None
devteam
parents:
diff changeset
22 <data format="input" name="output" metadata_source="input1" />
8a3448727cec Imported from capsule None
devteam
parents:
diff changeset
23 </outputs>
8a3448727cec Imported from capsule None
devteam
parents:
diff changeset
24 <tests>
8a3448727cec Imported from capsule None
devteam
parents:
diff changeset
25 <!-- Subtract 2 non-tabular files with no column restrictions. -->
8a3448727cec Imported from capsule None
devteam
parents:
diff changeset
26 <!-- Cannot figure out why this test won't pass, it works in real time... -->
8a3448727cec Imported from capsule None
devteam
parents:
diff changeset
27 <!--
8a3448727cec Imported from capsule None
devteam
parents:
diff changeset
28 <test>
8a3448727cec Imported from capsule None
devteam
parents:
diff changeset
29 <param name="input1" value="1.txt" />
8a3448727cec Imported from capsule None
devteam
parents:
diff changeset
30 <param name="input2" value="2.txt" />
8a3448727cec Imported from capsule None
devteam
parents:
diff changeset
31 <param name="begin_col" value="None" />
8a3448727cec Imported from capsule None
devteam
parents:
diff changeset
32 <param name="end_col" value="None" />
8a3448727cec Imported from capsule None
devteam
parents:
diff changeset
33 <output name="output" file="subtract-query-1.dat" />
8a3448727cec Imported from capsule None
devteam
parents:
diff changeset
34 </test>
8a3448727cec Imported from capsule None
devteam
parents:
diff changeset
35 -->
8a3448727cec Imported from capsule None
devteam
parents:
diff changeset
36 <!-- Subtract 2 tabular files with no column restrictions. -->
8a3448727cec Imported from capsule None
devteam
parents:
diff changeset
37 <test>
8a3448727cec Imported from capsule None
devteam
parents:
diff changeset
38 <param name="input1" value="eq-showbeginning.dat" />
8a3448727cec Imported from capsule None
devteam
parents:
diff changeset
39 <param name="input2" value="eq-showtail.dat" />
8a3448727cec Imported from capsule None
devteam
parents:
diff changeset
40 <param name="begin_col" value="None" />
8a3448727cec Imported from capsule None
devteam
parents:
diff changeset
41 <param name="end_col" value="None" />
8a3448727cec Imported from capsule None
devteam
parents:
diff changeset
42 <output name="output" file="subtract-query-2.dat" />
8a3448727cec Imported from capsule None
devteam
parents:
diff changeset
43 </test>
8a3448727cec Imported from capsule None
devteam
parents:
diff changeset
44 <!-- Subtract 2 tabular files with column restrictions. -->
8a3448727cec Imported from capsule None
devteam
parents:
diff changeset
45 <test>
8a3448727cec Imported from capsule None
devteam
parents:
diff changeset
46 <param name="input1" value="eq-showbeginning.dat" />
8a3448727cec Imported from capsule None
devteam
parents:
diff changeset
47 <param name="input2" value="eq-removebeginning.dat" />
8a3448727cec Imported from capsule None
devteam
parents:
diff changeset
48 <param name="begin_col" value="c1" />
8a3448727cec Imported from capsule None
devteam
parents:
diff changeset
49 <param name="end_col" value="c3" />
8a3448727cec Imported from capsule None
devteam
parents:
diff changeset
50 <output name="output" file="subtract-query-3.dat" />
8a3448727cec Imported from capsule None
devteam
parents:
diff changeset
51 </test>
8a3448727cec Imported from capsule None
devteam
parents:
diff changeset
52 <!-- Subtract a non-tabular file from a tabular file with no column restrictions. -->
8a3448727cec Imported from capsule None
devteam
parents:
diff changeset
53 <test>
8a3448727cec Imported from capsule None
devteam
parents:
diff changeset
54 <param name="input1" value="eq-showbeginning.dat" />
8a3448727cec Imported from capsule None
devteam
parents:
diff changeset
55 <param name="input2" value="2.txt" />
8a3448727cec Imported from capsule None
devteam
parents:
diff changeset
56 <param name="begin_col" value="None" />
8a3448727cec Imported from capsule None
devteam
parents:
diff changeset
57 <param name="end_col" value="None" />
8a3448727cec Imported from capsule None
devteam
parents:
diff changeset
58 <output name="output" file="subtract-query-4.dat" />
8a3448727cec Imported from capsule None
devteam
parents:
diff changeset
59 </test>
8a3448727cec Imported from capsule None
devteam
parents:
diff changeset
60 <!-- Subtract 2 tabular files with no column restrictions, ignoring empty end columns. -->
8a3448727cec Imported from capsule None
devteam
parents:
diff changeset
61 <test>
8a3448727cec Imported from capsule None
devteam
parents:
diff changeset
62 <param name="input1" value="eq-showbeginning_e.dat" />
8a3448727cec Imported from capsule None
devteam
parents:
diff changeset
63 <param name="input2" value="eq-showtail.dat" />
8a3448727cec Imported from capsule None
devteam
parents:
diff changeset
64 <param name="begin_col" value="None" />
8a3448727cec Imported from capsule None
devteam
parents:
diff changeset
65 <param name="end_col" value="None" />
8a3448727cec Imported from capsule None
devteam
parents:
diff changeset
66 <param name="ignore_empty_end_cols" value="true" />
8a3448727cec Imported from capsule None
devteam
parents:
diff changeset
67 <output name="output" file="subtract-query-2.dat" />
8a3448727cec Imported from capsule None
devteam
parents:
diff changeset
68 </test>
8a3448727cec Imported from capsule None
devteam
parents:
diff changeset
69 </tests>
8a3448727cec Imported from capsule None
devteam
parents:
diff changeset
70 <help>
8a3448727cec Imported from capsule None
devteam
parents:
diff changeset
71
8a3448727cec Imported from capsule None
devteam
parents:
diff changeset
72 .. class:: infomark
8a3448727cec Imported from capsule None
devteam
parents:
diff changeset
73
8a3448727cec Imported from capsule None
devteam
parents:
diff changeset
74 **TIP:** This tool complements the tool in the **Operate on Genomic Intervals** tool set which subtracts the intervals of two datasets.
8a3448727cec Imported from capsule None
devteam
parents:
diff changeset
75
8a3448727cec Imported from capsule None
devteam
parents:
diff changeset
76
8a3448727cec Imported from capsule None
devteam
parents:
diff changeset
77 -----
8a3448727cec Imported from capsule None
devteam
parents:
diff changeset
78
8a3448727cec Imported from capsule None
devteam
parents:
diff changeset
79 **Syntax**
8a3448727cec Imported from capsule None
devteam
parents:
diff changeset
80
8a3448727cec Imported from capsule None
devteam
parents:
diff changeset
81 This tool subtracts an entire dataset from another dataset.
8a3448727cec Imported from capsule None
devteam
parents:
diff changeset
82
8a3448727cec Imported from capsule None
devteam
parents:
diff changeset
83 - Any text format is valid.
8a3448727cec Imported from capsule None
devteam
parents:
diff changeset
84 - 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.
8a3448727cec Imported from capsule None
devteam
parents:
diff changeset
85 - The begin column must be less than or equal to the end column. If it is not, begin column is switched with end column.
8a3448727cec Imported from capsule None
devteam
parents:
diff changeset
86 - If begin column is specified but end column is not, end column will default to begin_column (and vice versa).
8a3448727cec Imported from capsule None
devteam
parents:
diff changeset
87 - All blank and comment lines are skipped and not included in the resulting dataset (comment lines are lines beginning with a # character).
8a3448727cec Imported from capsule None
devteam
parents:
diff changeset
88 - 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.
8a3448727cec Imported from capsule None
devteam
parents:
diff changeset
89
8a3448727cec Imported from capsule None
devteam
parents:
diff changeset
90 -----
8a3448727cec Imported from capsule None
devteam
parents:
diff changeset
91
8a3448727cec Imported from capsule None
devteam
parents:
diff changeset
92 **Example**
8a3448727cec Imported from capsule None
devteam
parents:
diff changeset
93
8a3448727cec Imported from capsule None
devteam
parents:
diff changeset
94 If this is the **First dataset**::
8a3448727cec Imported from capsule None
devteam
parents:
diff changeset
95
8a3448727cec Imported from capsule None
devteam
parents:
diff changeset
96 chr1 4225 19670
8a3448727cec Imported from capsule None
devteam
parents:
diff changeset
97 chr10 6 8
8a3448727cec Imported from capsule None
devteam
parents:
diff changeset
98 chr1 24417 24420
8a3448727cec Imported from capsule None
devteam
parents:
diff changeset
99 chr6_hla_hap2 0 150
8a3448727cec Imported from capsule None
devteam
parents:
diff changeset
100 chr2 1 5
8a3448727cec Imported from capsule None
devteam
parents:
diff changeset
101 chr10 2 10
8a3448727cec Imported from capsule None
devteam
parents:
diff changeset
102 chr1 30 55
8a3448727cec Imported from capsule None
devteam
parents:
diff changeset
103 chrY 1 20
8a3448727cec Imported from capsule None
devteam
parents:
diff changeset
104 chr1 1225979 42287290
8a3448727cec Imported from capsule None
devteam
parents:
diff changeset
105 chr10 7 8
8a3448727cec Imported from capsule None
devteam
parents:
diff changeset
106
8a3448727cec Imported from capsule None
devteam
parents:
diff changeset
107 and this is the **Second dataset**::
8a3448727cec Imported from capsule None
devteam
parents:
diff changeset
108
8a3448727cec Imported from capsule None
devteam
parents:
diff changeset
109 chr1 4225 19670
8a3448727cec Imported from capsule None
devteam
parents:
diff changeset
110 chr10 6 8
8a3448727cec Imported from capsule None
devteam
parents:
diff changeset
111 chr1 24417 24420
8a3448727cec Imported from capsule None
devteam
parents:
diff changeset
112 chr6_hla_hap2 0 150
8a3448727cec Imported from capsule None
devteam
parents:
diff changeset
113 chr2 1 5
8a3448727cec Imported from capsule None
devteam
parents:
diff changeset
114 chr1 30 55
8a3448727cec Imported from capsule None
devteam
parents:
diff changeset
115 chrY 1 20
8a3448727cec Imported from capsule None
devteam
parents:
diff changeset
116 chr1 1225979 42287290
8a3448727cec Imported from capsule None
devteam
parents:
diff changeset
117
8a3448727cec Imported from capsule None
devteam
parents:
diff changeset
118 Subtracting the **Second dataset** from the **First dataset** (including all columns) will yield::
8a3448727cec Imported from capsule None
devteam
parents:
diff changeset
119
8a3448727cec Imported from capsule None
devteam
parents:
diff changeset
120 chr10 7 8
8a3448727cec Imported from capsule None
devteam
parents:
diff changeset
121 chr10 2 10
8a3448727cec Imported from capsule None
devteam
parents:
diff changeset
122
8a3448727cec Imported from capsule None
devteam
parents:
diff changeset
123 Conversely, subtracting the **First dataset** from the **Second dataset** (including all columns) will result in an empty dataset.
8a3448727cec Imported from capsule None
devteam
parents:
diff changeset
124
8a3448727cec Imported from capsule None
devteam
parents:
diff changeset
125 Subtracting the **Second dataset** from the **First dataset** (restricting to columns c1 and c2) will yield::
8a3448727cec Imported from capsule None
devteam
parents:
diff changeset
126
8a3448727cec Imported from capsule None
devteam
parents:
diff changeset
127 chr10 7
8a3448727cec Imported from capsule None
devteam
parents:
diff changeset
128 chr10 2
8a3448727cec Imported from capsule None
devteam
parents:
diff changeset
129
8a3448727cec Imported from capsule None
devteam
parents:
diff changeset
130 </help>
8a3448727cec Imported from capsule None
devteam
parents:
diff changeset
131 </tool>