root/galaxy-central/tools/new_operations/intersect.xml

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

import galaxy-central

行番号 
1<tool id="gops_intersect_1" name="Intersect">
2  <description>the intervals of two queries</description>
3  <command interpreter="python">gops_intersect.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 name="returntype" type="select" label="Return" help="(see figure below)">
22          <option value="">Overlapping Intervals</option>
23          <option value="-p">Overlapping pieces of Intervals</option>
24      </param>
25      <param format="interval,gff" name="input1" type="data" help="First query">
26          <label>of</label>
27      </param>
28      <param format="interval,gff" name="input2" type="data" help="Second query">
29          <label>that intersect</label>
30      </param>
31      <param name="min" size="4" type="integer" value="1" help="(bp)">
32          <label>for at least</label>
33      </param>
34  </inputs>
35  <outputs>
36      <data format="input" name="output" metadata_source="input1"/>
37  </outputs>
38  <code file="operation_filter.py"/>
39  <tests>
40    <test>
41      <param name="type" value="Interval"/>
42      <param name="input1" value="1.bed" />
43      <param name="input2" value="2.bed" />
44      <param name="min" value="1" />
45      <param name="returntype" value="" />
46      <output name="output" file="gops_intersect_out.bed" />
47    </test>
48    <test>
49      <param name="type" value="Interval"/> 
50      <param name="input1" value="1.bed" />
51      <param name="input2" value="2_mod.bed" ftype="interval"/>
52      <param name="min" value="1" />
53      <param name="returntype" value="" />
54      <output name="output" file="gops_intersect_diffCols.bed" />
55    </test>
56    <test>
57      <param name="input1" value="1.bed" />
58      <param name="input2" value="2_mod.bed" ftype="interval"/>
59      <param name="min" value="1" />
60      <param name="returntype" value="Overlapping pieces of Intervals" />
61      <output name="output" file="gops_intersect_p_diffCols.bed" />
62    </test>
63    <test>
64      <param name="input1" value="1.bed" />
65      <param name="input2" value="2.bed" />
66      <param name="min" value="10" />
67      <param name="returntype" value="Overlapping pieces of Intervals" />
68      <output name="output" file="gops_intersect_p_out.bed" />     
69    </test>
70    <test>
71      <param name="input1" value="gops_bigint.interval" ftype="interval" />
72      <param name="input2" value="gops_bigint2.interval" ftype="interval" />
73      <param name="min" value="1" />
74      <param name="returntype" value="" />
75      <output name="output" file="gops_intersect_bigint_out.interval" />     
76    </test>
77    <test>
78      <param name="input1" value="gops_bigint2.interval" ftype="interval" />
79      <param name="input2" value="gops_bigint.interval" ftype="interval" />
80      <param name="min" value="1" />
81      <param name="returntype" value="" />
82      <output name="output" file="gops_intersect_bigint_out.interval" />     
83    </test>
84    <test>
85      <param name="input1" value="12.bed" ftype="bed" />
86      <param name="input2" value="1.bed" ftype="bed" />
87      <param name="min" value="1" />
88      <param name="returntype" value="" />
89      <output name="output" file="gops_intersect_no_strand_out.bed" />     
90    </test>
91    <!-- Intersect two GFF files. -->
92    <test>
93        <param name="input1" value="gops_subtract_in1.gff" />
94        <param name="input2" value="gops_subtract_in2.gff" />
95        <param name="min" value="1" />
96        <param name="returntype" value="" />
97        <output name="output" file="gops_intersect_out2.gff" />       
98    </test>
99    <!-- Intersect GFF file and bed file. -->
100    <test>
101        <param name="input1" value="gops_subtract_in1.gff" />
102        <param name="input2" value="gops_subtract_in2.bed" />
103        <param name="min" value="1" />
104        <param name="returntype" value="" />
105        <output name="output" file="gops_intersect_out2.gff" />       
106    </test>
107   
108  </tests>
109  <help>
110
111.. class:: infomark
112
113**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.
114
115-----
116
117**Screencasts!**
118
119See Galaxy Interval Operation Screencasts_ (right click to open this link in another window).
120
121.. _Screencasts: http://bitbucket.org/galaxy/galaxy-central/wiki/GopsDesc
122
123-----
124
125**Syntax**
126
127- **Where overlap is at least** sets the minimum length (in base pairs) of overlap between elements of the two queries
128- **Overlapping Intervals** returns entire intervals from the first query  that overlap the second query.  The returned intervals are completely unchanged, and this option only filters out intervals that do not overlap with the second query.
129- **Overlapping pieces of Intervals** returns intervals that indicate the exact base pair overlap between the first query and the second query.  The intervals returned are from the first query, and all fields besides start and end are guaranteed to remain unchanged.
130
131-----
132
133**Example**
134
135.. image:: ../static/operation_icons/gops_intersect.gif
136
137</help>
138</tool>
Note: リポジトリブラウザについてのヘルプは TracBrowser を参照してください。