annotate flanking_features.xml @ 0:e928e029f6eb draft

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