comparison subtract.xml @ 0:5bc2dacbe729

Imported from capsule None
author devteam
date Tue, 01 Apr 2014 10:52:51 -0400
parents
children 7bf44b9d7a8b
comparison
equal deleted inserted replaced
-1:000000000000 0:5bc2dacbe729
1 <tool id="gops_subtract_1" name="Subtract" version="0.0.1">
2 <description>the intervals of two datasets</description>
3 <requirements>
4 <requirement type="package" version="0.7.1">bx-python</requirement>
5 <requirement type="package" version="1.0.0">galaxy-ops</requirement>
6 </requirements>
7 <command interpreter="python">gops_subtract.py
8 $input1 $input2 $output
9
10 #if isinstance( $input1.datatype, $__app__.datatypes_registry.get_datatype_by_extension('gff').__class__):
11 -1 1,4,5,7 --gff1
12 #else:
13 -1 ${input1.metadata.chromCol},${input1.metadata.startCol},${input1.metadata.endCol},${input1.metadata.strandCol}
14 #end if
15
16 #if isinstance( $input2.datatype, $__app__.datatypes_registry.get_datatype_by_extension('gff').__class__):
17 -2 1,4,5,7 --gff2
18 #else:
19 -2 ${input2.metadata.chromCol},${input2.metadata.startCol},${input2.metadata.endCol},${input2.metadata.strandCol}
20 #end if
21
22 -m $min $returntype
23 </command>
24 <inputs>
25 <param format="interval,gff" name="input2" type="data" help="Second dataset">
26 <label>Subtract</label>
27 </param>
28
29 <param format="interval,gff" name="input1" type="data" help="First dataset">
30 <label>from</label>
31 </param>
32
33 <param name="returntype" type="select" label="Return" help="of the first dataset (see figure below)">
34 <option value="">Intervals with no overlap</option>
35 <option value="-p">Non-overlapping pieces of intervals</option>
36 </param>
37
38 <param name="min" size="4" type="integer" value="1" min="1" help="(bp)">
39 <label>where minimal overlap is</label>
40 </param>
41 </inputs>
42 <outputs>
43 <data format="input" name="output" metadata_source="input1"/>
44 </outputs>
45 <code file="operation_filter.py"/>
46 <trackster_conf/>
47 <tests>
48 <test>
49 <param name="input1" value="1.bed" />
50 <param name="input2" value="2.bed" />
51 <param name="min" value="1" />
52 <param name="returntype" value="" />
53 <output name="output" file="gops-subtract.dat" />
54 </test>
55 <test>
56 <param name="input1" value="1.bed" />
57 <param name="input2" value="2_mod.bed" ftype="interval"/>
58 <param name="min" value="1" />
59 <param name="returntype" value="" />
60 <output name="output" file="gops_subtract_diffCols.dat" />
61 </test>
62 <test>
63 <param name="input1" value="gops_subtract_bigint.bed" />
64 <param name="input2" value="2.bed" />
65 <param name="min" value="1" />
66 <param name="returntype" value="" />
67 <output name="output" file="gops-subtract.dat" />
68 </test>
69 <test>
70 <param name="input1" value="1.bed" />
71 <param name="input2" value="2.bed" />
72 <param name="min" value="10" />
73 <param name="returntype" value="Non-overlapping pieces of intervals" />
74 <output name="output" file="gops-subtract-p.dat" />
75 </test>
76 <!-- Subtract two GFF files. -->
77 <test>
78 <param name="input1" value="gops_subtract_in1.gff" />
79 <param name="input2" value="gops_subtract_in2.gff" />
80 <param name="min" value="1" />
81 <param name="returntype" value="" />
82 <output name="output" file="gops_subtract_out1.gff" />
83 </test>
84 <!-- Subtract BED file from GFF file. -->
85 <test>
86 <param name="input1" value="gops_subtract_in1.gff" />
87 <param name="input2" value="gops_subtract_in2.bed" />
88 <param name="min" value="1" />
89 <param name="returntype" value="" />
90 <output name="output" file="gops_subtract_out1.gff" />
91 </test>
92 </tests>
93 <help>
94
95 .. class:: infomark
96
97 **TIP:** If your dataset does not appear in the pulldown menu, it means that it is not in interval format. Use "edit attributes" to set chromosome, start, end, and strand columns.
98
99 -----
100
101 **Screencasts!**
102
103 See Galaxy Interval Operation Screencasts_ (right click to open this link in another window).
104
105 .. _Screencasts: http://wiki.g2.bx.psu.edu/Learn/Interval%20Operations
106
107 -----
108
109 **Syntax**
110
111 - **Where overlap is at least** sets the minimum length (in base pairs) of overlap between elements of the two datasets.
112 - **Intervals with no overlap** returns entire intervals from the first dataset that do not overlap the second dataset. The returned intervals are completely unchanged, and this option only filters out intervals that overlap with the second dataset.
113 - **Non-overlapping pieces of intervals** returns intervals from the first dataset that have the intervals from the second dataset removed. Any overlapping base pairs are removed from the range of the interval. All fields besides start and end are guaranteed to remain unchanged.
114
115 -----
116
117 **Example**
118
119 Intervals with no overlap:
120
121 .. image:: ${static_path}/operation_icons/gops_subtractOverlappingIntervals.gif
122
123 Non-overlapping pieces of intervals:
124
125 .. image:: ${static_path}/operation_icons/gops_subtractOverlappingPieces.gif
126
127 </help>
128 </tool>