comparison flanking_features.xml @ 2:a09d13b108fd draft

planemo upload for repository https://github.com/galaxyproject/tools-devteam/tree/master/tool_collections/gops/flanking_features commit cae3e05d02e60f595bb8b6d77a84f030e9bd1689
author devteam
date Thu, 22 Jun 2017 18:41:16 -0400
parents 90100b587723
children
comparison
equal deleted inserted replaced
1:8307665c4b6c 2:a09d13b108fd
1 <tool id="flanking_features_1" name="Fetch closest non-overlapping feature" version="4.0.1"> 1 <tool id="flanking_features_1" name="Fetch closest non-overlapping feature" version="4.0.1">
2 <description> for every interval</description> 2 <description>for every interval</description>
3 <requirements> 3 <macros>
4 <requirement type="package" version="0.7.1">bx-python</requirement> 4 <import>macros.xml</import>
5 <requirement type="package" version="1.0.0">galaxy-ops</requirement> 5 </macros>
6 </requirements> 6 <expand macro="requirements" />
7 <command interpreter="python"> 7 <command><![CDATA[
8 flanking_features.py $input1 $input2 $out_file1 $direction 8 python '$__tool_directory__/flanking_features.py'
9 9 '$input1'
10 #if isinstance( $input1.datatype, $__app__.datatypes_registry.get_datatype_by_extension('gff').__class__): 10 '$input2'
11 -1 1,4,5,7 --gff1 11 '$out_file1'
12 #else: 12 $direction
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 13
68 <test> 14 #if $input1.is_of_type('gff')
69 <param name="input1" value="4_windows.bed"/> 15 -1 1,4,5,7 --gff1
70 <param name="input2" value="4_windows_2.gff"/> 16 #else:
71 <param name="direction" value="Either"/> 17 -1 ${input1.metadata.chromCol},${input1.metadata.startCol},${input1.metadata.endCol},${input1.metadata.strandCol}
72 <output name="out_file1" file="closest_features_both.gff"/> 18 #end if
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 19
20 #if $input2.is_of_type('gff')
21 -2 1,4,5,7 --gff2
22 #else:
23 -2 ${input2.metadata.chromCol},${input2.metadata.startCol},${input2.metadata.endCol},${input2.metadata.strandCol}
24 #end if
25 ]]></command>
26 <inputs>
27 <param name="input1" type="data" format="interval,gff" label="For every interval in"/>
28 <param name="input2" type="data" format="interval,gff" label="Fetch closest feature(s) from"/>
29 <param name="direction" type="select" label="Located">
30 <option value="Either">Either Upstream or Downstream</option>
31 <option value="Both">Both Upstream and Downstream</option>
32 <option value="Upstream">Upstream</option>
33 <option value="Downstream">Downstream</option>
34 </param>
35 </inputs>
36 <outputs>
37 <data name="out_file1" format_source="input1" metadata_source="input1"/>
38 </outputs>
39 <tests>
40 <test>
41 <param name="input1" value="4_windows.bed"/>
42 <param name="input2" value="4_windows_2.bed"/>
43 <param name="direction" value="Either"/>
44 <output name="out_file1" file="closest_features_either.interval"/>
45 </test>
46 <test>
47 <param name="input1" value="4_windows.bed"/>
48 <param name="input2" value="4_windows_2.bed"/>
49 <param name="direction" value="Both"/>
50 <output name="out_file1" file="closest_features.interval"/>
51 </test>
52 <test>
53 <param name="input1" value="4_windows.bed"/>
54 <param name="input2" value="4_windows_2.bed"/>
55 <param name="direction" value="Upstream"/>
56 <output name="out_file1" file="closest_features_up.interval"/>
57 </test>
58 <test>
59 <param name="input1" value="4_windows.bed"/>
60 <param name="input2" value="4_windows_2.bed"/>
61 <param name="direction" value="Downstream"/>
62 <output name="out_file1" file="closest_features_down.interval"/>
63 </test>
64 <test>
65 <param name="input1" value="4_windows.bed"/>
66 <param name="input2" value="4_windows_3.bed"/>
67 <param name="direction" value="Both"/>
68 <output name="out_file1" file="closest_features_both.interval"/>
69 </test>
70 <!-- Tests for GFF functionality. -->
71 <test>
72 <param name="input1" value="4_windows.bed"/>
73 <param name="input2" value="4_windows_2.gff" ftype="gff" />
74 <param name="direction" value="Either"/>
75 <output name="out_file1" file="closest_features_both.gff"/>
76 </test>
77 <test>
78 <param name="input1" value="4_windows.gff" ftype="gff" />
79 <param name="input2" value="4_windows_2.gff" ftype="gff" />
80 <param name="direction" value="Either"/>
81 <output name="out_file1" file="closest_features_both2.gff"/>
82 </test>
83 </tests>
84 <help><![CDATA[
84 .. class:: infomark 85 .. class:: infomark
85 86
86 **What it does** 87 **What it does**
87 88
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 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
90 ----- 91 -----
91 92
92 .. class:: warningmark 93 .. class:: warningmark
93 94
94 **Note:** 95 **Note:**
95 96
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 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
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 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
122 chr1 10 100 Query1.1 chr1 120 180 Query2.1 123 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 140 200 Query2.2
124 chr1 500 1000 Query1.2 chr1 2000 2204 Query2.4 125 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 580 1050 Query2.3
126 chr1 1100 1250 Query1.3 chr1 2000 2204 Query2.4 127 chr1 1100 1250 Query1.3 chr1 2000 2204 Query2.4
127 128 ]]></help>
128 </help>
129
130
131 </tool> 129 </tool>