root/galaxy-central/tools/new_operations/subtract.xml @ 2

リビジョン 2, 4.4 KB (コミッタ: hatakeyama, 14 年 前)

import galaxy-central

行番号 
1<tool id="gops_subtract_1" name="Subtract">
2  <description>the intervals of two queries</description>
3  <command interpreter="python">gops_subtract.py
4      $input1 $input2 $output
5
6      #if isinstance( $input1.datatype, $__app__.datatypes_registry.get_datatype_by_extension('gff').__class__):
7        -1 1,4,5,7 --gff1
8      #else:
9        -1 ${input1.metadata.chromCol},${input1.metadata.startCol},${input1.metadata.endCol},${input1.metadata.strandCol}
10      #end if
11
12      #if isinstance( $input2.datatype, $__app__.datatypes_registry.get_datatype_by_extension('gff').__class__):
13        -2 1,4,5,7 --gff2
14      #else:
15          -2 ${input2.metadata.chromCol},${input2.metadata.startCol},${input2.metadata.endCol},${input2.metadata.strandCol}
16      #end if
17
18      -m $min $returntype
19  </command>
20  <inputs>
21    <param format="interval,gff" name="input2" type="data" help="Second query">
22      <label>Subtract</label>
23    </param>
24
25    <param format="interval,gff" name="input1" type="data" help="First query">
26      <label>from</label>
27    </param>
28
29    <param name="returntype" type="select" label="Return" help="of the first query (see figure below)">
30      <option value="">Intervals with no overlap</option>
31      <option value="-p">Non-overlapping pieces of intervals</option>
32    </param>
33   
34    <param name="min" size="4" type="integer" value="1" help="(bp)">
35      <label>where minimal overlap is</label>
36    </param>
37   </inputs>
38  <outputs>
39    <data format="input" name="output" metadata_source="input1"/>
40  </outputs>
41  <code file="operation_filter.py"/>
42  <tests>
43    <test>
44      <param name="input1" value="1.bed" />
45      <param name="input2" value="2.bed" />
46      <param name="min" value="1" />
47      <param name="returntype" value="" />
48      <output name="output" file="gops-subtract.dat" />
49    </test>
50    <test>
51      <param name="input1" value="1.bed" />
52      <param name="input2" value="2_mod.bed" ftype="interval"/>
53      <param name="min" value="1" />
54      <param name="returntype" value="" />
55      <output name="output" file="gops_subtract_diffCols.dat" />
56    </test>
57    <test>
58      <param name="input1" value="gops_subtract_bigint.bed" />
59      <param name="input2" value="2.bed" />
60      <param name="min" value="1" />
61      <param name="returntype" value="" />
62      <output name="output" file="gops-subtract.dat" />
63    </test>
64    <test>
65      <param name="input1" value="1.bed" />
66      <param name="input2" value="2.bed" />
67      <param name="min" value="10" />
68      <param name="returntype" value="Non-overlapping pieces of intervals" />
69      <output name="output" file="gops-subtract-p.dat" />     
70    </test>
71    <!-- Subtract two GFF files. -->
72    <test>
73        <param name="input1" value="gops_subtract_in1.gff" />
74        <param name="input2" value="gops_subtract_in2.gff" />
75        <param name="min" value="1" />
76        <param name="returntype" value="" />
77        <output name="output" file="gops_subtract_out1.gff" />
78    </test>
79    <!-- Subtract BED file from GFF file. -->
80    <test>
81        <param name="input1" value="gops_subtract_in1.gff" />
82        <param name="input2" value="gops_subtract_in2.bed" />
83        <param name="min" value="1" />
84        <param name="returntype" value="" />
85        <output name="output" file="gops_subtract_out1.gff" />
86    </test>
87   
88  </tests>
89  <help>
90
91.. class:: infomark
92
93**TIP:** If your query 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.
94
95-----
96
97**Screencasts!**
98
99See Galaxy Interval Operation Screencasts_ (right click to open this link in another window).
100
101.. _Screencasts: http://bitbucket.org/galaxy/galaxy-central/wiki/GopsDesc
102
103-----
104
105**Syntax**
106
107- **Where overlap is at least** sets the minimum length (in base pairs) of overlap between elements of the two queries.
108- **Intervals with no overlap** returns entire intervals from the first query that do not overlap the second query.  The returned intervals are completely unchanged, and this option only filters out intervals that overlap with the second query.
109- **Non-overlapping pieces of intervals** returns intervals from the first query that have the intervals from the second query removed.  Any overlapping base pairs are removed from the range of the interval.  All fields besides start and end are guaranteed to remain unchanged.
110
111-----
112
113**Example**
114
115.. image:: ../static/operation_icons/gops_subtract.gif
116
117</help>
118</tool>
Note: リポジトリブラウザについてのヘルプは TracBrowser を参照してください。