comparison flanking_features.xml @ 0:e928e029f6eb draft

Imported from capsule None
author devteam
date Tue, 01 Apr 2014 09:13:13 -0400
parents
children 94248d5b9b8b
comparison
equal deleted inserted replaced
-1:000000000000 0:e928e029f6eb
1 <tool id="flanking_features_1" name="Fetch closest non-overlapping feature" version="4.0.1">
2 <description> for every interval</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">
8 flanking_features.py $input1 $input2 $out_file1 $direction
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 </command>
22 <inputs>
23 <param format="interval,gff" name="input1" type="data" label="For every interval in"/>
24 <param format="interval,gff" name="input2" type="data" label="Fetch closest feature(s) from"/>
25 <param name="direction" type="select" label="Located">
26 <option value="Either">Either Upstream or Downstream</option>
27 <option value="Both">Both Upstream and Downstream</option>
28 <option value="Upstream">Upstream</option>
29 <option value="Downstream">Downstream</option>
30 </param>
31 </inputs>
32 <outputs>
33 <data format="input" name="out_file1" metadata_source="input1"/>
34 </outputs>
35 <tests>
36 <test>
37 <param name="input1" value="4_windows.bed"/>
38 <param name="input2" value="4_windows_2.bed"/>
39 <param name="direction" value="Either"/>
40 <output name="out_file1" file="closest_features_either.interval"/>
41 </test>
42 <test>
43 <param name="input1" value="4_windows.bed"/>
44 <param name="input2" value="4_windows_2.bed"/>
45 <param name="direction" value="Both"/>
46 <output name="out_file1" file="closest_features.interval"/>
47 </test>
48 <test>
49 <param name="input1" value="4_windows.bed"/>
50 <param name="input2" value="4_windows_2.bed"/>
51 <param name="direction" value="Upstream"/>
52 <output name="out_file1" file="closest_features_up.interval"/>
53 </test>
54 <test>
55 <param name="input1" value="4_windows.bed"/>
56 <param name="input2" value="4_windows_2.bed"/>
57 <param name="direction" value="Downstream"/>
58 <output name="out_file1" file="closest_features_down.interval"/>
59 </test>
60 <test>
61 <param name="input1" value="4_windows.bed"/>
62 <param name="input2" value="4_windows_3.bed"/>
63 <param name="direction" value="Both"/>
64 <output name="out_file1" file="closest_features_both.interval"/>
65 </test>
66 <!-- Tests for GFF functionality. -->
67
68 <test>
69 <param name="input1" value="4_windows.bed"/>
70 <param name="input2" value="4_windows_2.gff"/>
71 <param name="direction" value="Either"/>
72 <output name="out_file1" file="closest_features_both.gff"/>
73 </test>
74 <test>
75 <param name="input1" value="4_windows.gff"/>
76 <param name="input2" value="4_windows_2.gff"/>
77 <param name="direction" value="Either"/>
78 <output name="out_file1" file="closest_features_both2.gff"/>
79 </test>
80
81 </tests>
82 <help>
83
84 .. class:: infomark
85
86 **What it does**
87
88 For every interval in the **interval** dataset, this tool fetches the **closest non-overlapping** upstream and / or downstream features from the **features** dataset.
89
90 -----
91
92 .. class:: warningmark
93
94 **Note:**
95
96 Every line should contain at least 3 columns: chromosome number, start and stop coordinates. If any of these columns is missing or if start and stop coordinates are not numerical, the lines will be treated as invalid and skipped. The number of skipped lines is documented in the resulting history item as a "data issue".
97
98 If the strand column is missing from your input interval dataset, the intervals will be considered to be on positive strand. You can add a strand column to your input dataset by using the *Text Manipulation->Add column* tool.
99
100 For GFF files, features are added as a GTF-style attribute at the end of the line.
101
102 -----
103
104 **Example**
105
106 If the **intervals** are::
107
108 chr1 10 100 Query1.1
109 chr1 500 1000 Query1.2
110 chr1 1100 1250 Query1.3
111
112 and the **features** are::
113
114 chr1 120 180 Query2.1
115 chr1 140 200 Query2.2
116 chr1 580 1050 Query2.3
117 chr1 2000 2204 Query2.4
118 chr1 2500 3000 Query2.5
119
120 Running this tool for **Both Upstream and Downstream** will return::
121
122 chr1 10 100 Query1.1 chr1 120 180 Query2.1
123 chr1 500 1000 Query1.2 chr1 140 200 Query2.2
124 chr1 500 1000 Query1.2 chr1 2000 2204 Query2.4
125 chr1 1100 1250 Query1.3 chr1 580 1050 Query2.3
126 chr1 1100 1250 Query1.3 chr1 2000 2204 Query2.4
127
128 </help>
129
130
131 </tool>