annotate flanking_features.xml @ 0:90100b587723 draft

Imported from capsule None
author devteam
date Tue, 01 Apr 2014 10:52:59 -0400
parents
children a09d13b108fd
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
0
90100b587723 Imported from capsule None
devteam
parents:
diff changeset
1 <tool id="flanking_features_1" name="Fetch closest non-overlapping feature" version="4.0.1">
90100b587723 Imported from capsule None
devteam
parents:
diff changeset
2 <description> for every interval</description>
90100b587723 Imported from capsule None
devteam
parents:
diff changeset
3 <requirements>
90100b587723 Imported from capsule None
devteam
parents:
diff changeset
4 <requirement type="package" version="0.7.1">bx-python</requirement>
90100b587723 Imported from capsule None
devteam
parents:
diff changeset
5 <requirement type="package" version="1.0.0">galaxy-ops</requirement>
90100b587723 Imported from capsule None
devteam
parents:
diff changeset
6 </requirements>
90100b587723 Imported from capsule None
devteam
parents:
diff changeset
7 <command interpreter="python">
90100b587723 Imported from capsule None
devteam
parents:
diff changeset
8 flanking_features.py $input1 $input2 $out_file1 $direction
90100b587723 Imported from capsule None
devteam
parents:
diff changeset
9
90100b587723 Imported from capsule None
devteam
parents:
diff changeset
10 #if isinstance( $input1.datatype, $__app__.datatypes_registry.get_datatype_by_extension('gff').__class__):
90100b587723 Imported from capsule None
devteam
parents:
diff changeset
11 -1 1,4,5,7 --gff1
90100b587723 Imported from capsule None
devteam
parents:
diff changeset
12 #else:
90100b587723 Imported from capsule None
devteam
parents:
diff changeset
13 -1 ${input1.metadata.chromCol},${input1.metadata.startCol},${input1.metadata.endCol},${input1.metadata.strandCol}
90100b587723 Imported from capsule None
devteam
parents:
diff changeset
14 #end if
90100b587723 Imported from capsule None
devteam
parents:
diff changeset
15
90100b587723 Imported from capsule None
devteam
parents:
diff changeset
16 #if isinstance( $input2.datatype, $__app__.datatypes_registry.get_datatype_by_extension('gff').__class__):
90100b587723 Imported from capsule None
devteam
parents:
diff changeset
17 -2 1,4,5,7 --gff2
90100b587723 Imported from capsule None
devteam
parents:
diff changeset
18 #else:
90100b587723 Imported from capsule None
devteam
parents:
diff changeset
19 -2 ${input2.metadata.chromCol},${input2.metadata.startCol},${input2.metadata.endCol},${input2.metadata.strandCol}
90100b587723 Imported from capsule None
devteam
parents:
diff changeset
20 #end if
90100b587723 Imported from capsule None
devteam
parents:
diff changeset
21 </command>
90100b587723 Imported from capsule None
devteam
parents:
diff changeset
22 <inputs>
90100b587723 Imported from capsule None
devteam
parents:
diff changeset
23 <param format="interval,gff" name="input1" type="data" label="For every interval in"/>
90100b587723 Imported from capsule None
devteam
parents:
diff changeset
24 <param format="interval,gff" name="input2" type="data" label="Fetch closest feature(s) from"/>
90100b587723 Imported from capsule None
devteam
parents:
diff changeset
25 <param name="direction" type="select" label="Located">
90100b587723 Imported from capsule None
devteam
parents:
diff changeset
26 <option value="Either">Either Upstream or Downstream</option>
90100b587723 Imported from capsule None
devteam
parents:
diff changeset
27 <option value="Both">Both Upstream and Downstream</option>
90100b587723 Imported from capsule None
devteam
parents:
diff changeset
28 <option value="Upstream">Upstream</option>
90100b587723 Imported from capsule None
devteam
parents:
diff changeset
29 <option value="Downstream">Downstream</option>
90100b587723 Imported from capsule None
devteam
parents:
diff changeset
30 </param>
90100b587723 Imported from capsule None
devteam
parents:
diff changeset
31 </inputs>
90100b587723 Imported from capsule None
devteam
parents:
diff changeset
32 <outputs>
90100b587723 Imported from capsule None
devteam
parents:
diff changeset
33 <data format="input" name="out_file1" metadata_source="input1"/>
90100b587723 Imported from capsule None
devteam
parents:
diff changeset
34 </outputs>
90100b587723 Imported from capsule None
devteam
parents:
diff changeset
35 <tests>
90100b587723 Imported from capsule None
devteam
parents:
diff changeset
36 <test>
90100b587723 Imported from capsule None
devteam
parents:
diff changeset
37 <param name="input1" value="4_windows.bed"/>
90100b587723 Imported from capsule None
devteam
parents:
diff changeset
38 <param name="input2" value="4_windows_2.bed"/>
90100b587723 Imported from capsule None
devteam
parents:
diff changeset
39 <param name="direction" value="Either"/>
90100b587723 Imported from capsule None
devteam
parents:
diff changeset
40 <output name="out_file1" file="closest_features_either.interval"/>
90100b587723 Imported from capsule None
devteam
parents:
diff changeset
41 </test>
90100b587723 Imported from capsule None
devteam
parents:
diff changeset
42 <test>
90100b587723 Imported from capsule None
devteam
parents:
diff changeset
43 <param name="input1" value="4_windows.bed"/>
90100b587723 Imported from capsule None
devteam
parents:
diff changeset
44 <param name="input2" value="4_windows_2.bed"/>
90100b587723 Imported from capsule None
devteam
parents:
diff changeset
45 <param name="direction" value="Both"/>
90100b587723 Imported from capsule None
devteam
parents:
diff changeset
46 <output name="out_file1" file="closest_features.interval"/>
90100b587723 Imported from capsule None
devteam
parents:
diff changeset
47 </test>
90100b587723 Imported from capsule None
devteam
parents:
diff changeset
48 <test>
90100b587723 Imported from capsule None
devteam
parents:
diff changeset
49 <param name="input1" value="4_windows.bed"/>
90100b587723 Imported from capsule None
devteam
parents:
diff changeset
50 <param name="input2" value="4_windows_2.bed"/>
90100b587723 Imported from capsule None
devteam
parents:
diff changeset
51 <param name="direction" value="Upstream"/>
90100b587723 Imported from capsule None
devteam
parents:
diff changeset
52 <output name="out_file1" file="closest_features_up.interval"/>
90100b587723 Imported from capsule None
devteam
parents:
diff changeset
53 </test>
90100b587723 Imported from capsule None
devteam
parents:
diff changeset
54 <test>
90100b587723 Imported from capsule None
devteam
parents:
diff changeset
55 <param name="input1" value="4_windows.bed"/>
90100b587723 Imported from capsule None
devteam
parents:
diff changeset
56 <param name="input2" value="4_windows_2.bed"/>
90100b587723 Imported from capsule None
devteam
parents:
diff changeset
57 <param name="direction" value="Downstream"/>
90100b587723 Imported from capsule None
devteam
parents:
diff changeset
58 <output name="out_file1" file="closest_features_down.interval"/>
90100b587723 Imported from capsule None
devteam
parents:
diff changeset
59 </test>
90100b587723 Imported from capsule None
devteam
parents:
diff changeset
60 <test>
90100b587723 Imported from capsule None
devteam
parents:
diff changeset
61 <param name="input1" value="4_windows.bed"/>
90100b587723 Imported from capsule None
devteam
parents:
diff changeset
62 <param name="input2" value="4_windows_3.bed"/>
90100b587723 Imported from capsule None
devteam
parents:
diff changeset
63 <param name="direction" value="Both"/>
90100b587723 Imported from capsule None
devteam
parents:
diff changeset
64 <output name="out_file1" file="closest_features_both.interval"/>
90100b587723 Imported from capsule None
devteam
parents:
diff changeset
65 </test>
90100b587723 Imported from capsule None
devteam
parents:
diff changeset
66 <!-- Tests for GFF functionality. -->
90100b587723 Imported from capsule None
devteam
parents:
diff changeset
67
90100b587723 Imported from capsule None
devteam
parents:
diff changeset
68 <test>
90100b587723 Imported from capsule None
devteam
parents:
diff changeset
69 <param name="input1" value="4_windows.bed"/>
90100b587723 Imported from capsule None
devteam
parents:
diff changeset
70 <param name="input2" value="4_windows_2.gff"/>
90100b587723 Imported from capsule None
devteam
parents:
diff changeset
71 <param name="direction" value="Either"/>
90100b587723 Imported from capsule None
devteam
parents:
diff changeset
72 <output name="out_file1" file="closest_features_both.gff"/>
90100b587723 Imported from capsule None
devteam
parents:
diff changeset
73 </test>
90100b587723 Imported from capsule None
devteam
parents:
diff changeset
74 <test>
90100b587723 Imported from capsule None
devteam
parents:
diff changeset
75 <param name="input1" value="4_windows.gff"/>
90100b587723 Imported from capsule None
devteam
parents:
diff changeset
76 <param name="input2" value="4_windows_2.gff"/>
90100b587723 Imported from capsule None
devteam
parents:
diff changeset
77 <param name="direction" value="Either"/>
90100b587723 Imported from capsule None
devteam
parents:
diff changeset
78 <output name="out_file1" file="closest_features_both2.gff"/>
90100b587723 Imported from capsule None
devteam
parents:
diff changeset
79 </test>
90100b587723 Imported from capsule None
devteam
parents:
diff changeset
80
90100b587723 Imported from capsule None
devteam
parents:
diff changeset
81 </tests>
90100b587723 Imported from capsule None
devteam
parents:
diff changeset
82 <help>
90100b587723 Imported from capsule None
devteam
parents:
diff changeset
83
90100b587723 Imported from capsule None
devteam
parents:
diff changeset
84 .. class:: infomark
90100b587723 Imported from capsule None
devteam
parents:
diff changeset
85
90100b587723 Imported from capsule None
devteam
parents:
diff changeset
86 **What it does**
90100b587723 Imported from capsule None
devteam
parents:
diff changeset
87
90100b587723 Imported from capsule None
devteam
parents:
diff changeset
88 For every interval in the **interval** dataset, this tool fetches the **closest non-overlapping** upstream and / or downstream features from the **features** dataset.
90100b587723 Imported from capsule None
devteam
parents:
diff changeset
89
90100b587723 Imported from capsule None
devteam
parents:
diff changeset
90 -----
90100b587723 Imported from capsule None
devteam
parents:
diff changeset
91
90100b587723 Imported from capsule None
devteam
parents:
diff changeset
92 .. class:: warningmark
90100b587723 Imported from capsule None
devteam
parents:
diff changeset
93
90100b587723 Imported from capsule None
devteam
parents:
diff changeset
94 **Note:**
90100b587723 Imported from capsule None
devteam
parents:
diff changeset
95
90100b587723 Imported from capsule None
devteam
parents:
diff changeset
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".
90100b587723 Imported from capsule None
devteam
parents:
diff changeset
97
90100b587723 Imported from capsule None
devteam
parents:
diff changeset
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.
90100b587723 Imported from capsule None
devteam
parents:
diff changeset
99
90100b587723 Imported from capsule None
devteam
parents:
diff changeset
100 For GFF files, features are added as a GTF-style attribute at the end of the line.
90100b587723 Imported from capsule None
devteam
parents:
diff changeset
101
90100b587723 Imported from capsule None
devteam
parents:
diff changeset
102 -----
90100b587723 Imported from capsule None
devteam
parents:
diff changeset
103
90100b587723 Imported from capsule None
devteam
parents:
diff changeset
104 **Example**
90100b587723 Imported from capsule None
devteam
parents:
diff changeset
105
90100b587723 Imported from capsule None
devteam
parents:
diff changeset
106 If the **intervals** are::
90100b587723 Imported from capsule None
devteam
parents:
diff changeset
107
90100b587723 Imported from capsule None
devteam
parents:
diff changeset
108 chr1 10 100 Query1.1
90100b587723 Imported from capsule None
devteam
parents:
diff changeset
109 chr1 500 1000 Query1.2
90100b587723 Imported from capsule None
devteam
parents:
diff changeset
110 chr1 1100 1250 Query1.3
90100b587723 Imported from capsule None
devteam
parents:
diff changeset
111
90100b587723 Imported from capsule None
devteam
parents:
diff changeset
112 and the **features** are::
90100b587723 Imported from capsule None
devteam
parents:
diff changeset
113
90100b587723 Imported from capsule None
devteam
parents:
diff changeset
114 chr1 120 180 Query2.1
90100b587723 Imported from capsule None
devteam
parents:
diff changeset
115 chr1 140 200 Query2.2
90100b587723 Imported from capsule None
devteam
parents:
diff changeset
116 chr1 580 1050 Query2.3
90100b587723 Imported from capsule None
devteam
parents:
diff changeset
117 chr1 2000 2204 Query2.4
90100b587723 Imported from capsule None
devteam
parents:
diff changeset
118 chr1 2500 3000 Query2.5
90100b587723 Imported from capsule None
devteam
parents:
diff changeset
119
90100b587723 Imported from capsule None
devteam
parents:
diff changeset
120 Running this tool for **Both Upstream and Downstream** will return::
90100b587723 Imported from capsule None
devteam
parents:
diff changeset
121
90100b587723 Imported from capsule None
devteam
parents:
diff changeset
122 chr1 10 100 Query1.1 chr1 120 180 Query2.1
90100b587723 Imported from capsule None
devteam
parents:
diff changeset
123 chr1 500 1000 Query1.2 chr1 140 200 Query2.2
90100b587723 Imported from capsule None
devteam
parents:
diff changeset
124 chr1 500 1000 Query1.2 chr1 2000 2204 Query2.4
90100b587723 Imported from capsule None
devteam
parents:
diff changeset
125 chr1 1100 1250 Query1.3 chr1 580 1050 Query2.3
90100b587723 Imported from capsule None
devteam
parents:
diff changeset
126 chr1 1100 1250 Query1.3 chr1 2000 2204 Query2.4
90100b587723 Imported from capsule None
devteam
parents:
diff changeset
127
90100b587723 Imported from capsule None
devteam
parents:
diff changeset
128 </help>
90100b587723 Imported from capsule None
devteam
parents:
diff changeset
129
90100b587723 Imported from capsule None
devteam
parents:
diff changeset
130
90100b587723 Imported from capsule None
devteam
parents:
diff changeset
131 </tool>