Mercurial > repos > iuc > bedtools
comparison unionBedGraphs.xml @ 1:82aac94b06c3 draft
Uploaded
author | iuc |
---|---|
date | Thu, 08 Jan 2015 14:25:51 -0500 |
parents | b8348686a0b9 |
children | 607c0576c6ab |
comparison
equal
deleted
inserted
replaced
0:b8348686a0b9 | 1:82aac94b06c3 |
---|---|
1 <tool id="bedtools_mergebedgraph" name="Merge BedGraph files" version="@WRAPPER_VERSION@.0"> | 1 <tool id="bedtools_unionbedgraph" name="Merge BedGraph files" version="@WRAPPER_VERSION@.0"> |
2 <description></description> | 2 <description></description> |
3 <macros> | 3 <macros> |
4 <import>macros.xml</import> | 4 <import>macros.xml</import> |
5 </macros> | 5 </macros> |
6 <expand macro="requirements" /> | 6 <expand macro="requirements" /> |
7 <expand macro="stdio" /> | 7 <expand macro="stdio" /> |
8 <command>unionBedGraphs | 8 <command> |
9 <![CDATA[ | |
10 unionBedGraphs | |
9 $header | 11 $header |
10 -filler '$filler' | 12 -filler "${filler}" |
11 #if $zero.value == True: | 13 #if $zero.value == True: |
12 -empty | 14 -empty |
13 -g ${chromInfo} | 15 -g $genome |
14 #end if | 16 #end if |
15 | 17 |
16 -i '$input1' | 18 #if str($tag.tag_select) == "tag": |
17 '$input2' | 19 #set files = '" "'.join( [ str( $file ) for $file in $tag.inputs ] ) |
18 #for $q in $bedgraphs | 20 -i "${files}" |
19 '${q.input}' | 21 #else: |
20 #end for | 22 -i |
21 | 23 #for $bg in $tag.bedgraphs: |
22 -names | 24 "${bg.input}" |
23 #if $name1.choice == "tag": | 25 #end for |
24 '${input1.name}' | 26 -names |
25 #else | 27 #for $bg in $tag.bedgraphs: |
26 '${name1.custom_name}' | 28 "${bg.custom_name}" |
29 #end for | |
27 #end if | 30 #end if |
28 | 31 > "${output}" |
29 #if $name2.choice == "tag": | 32 ]]> |
30 '${input2.name}' | |
31 #else | |
32 '${name2.custom_name}' | |
33 #end if | |
34 | |
35 #for $q in $bedgraphs | |
36 #if $q.name.choice == "tag": | |
37 '${q.input.name}' | |
38 #else | |
39 '${q.input.custom_name}' | |
40 #end if | |
41 #end for | |
42 > '$output' | |
43 </command> | 33 </command> |
44 <inputs> | 34 <inputs> |
45 <!-- Make it easy for the user, first two input files are always shown --> | 35 <conditional name="tag"> |
46 <!-- INPUT 1 --> | 36 <param name="tag_select" type="select" label="Sample name"> |
47 <param name="input1" format="bedgraph" type="data" label="First BedGraph file" /> | |
48 | |
49 <conditional name="name1"> | |
50 <param name="choice" type="select" label="Sample name"> | |
51 <option value="tag" selected="true">Use input's tag</option> | 37 <option value="tag" selected="true">Use input's tag</option> |
52 <option value="custom">Enter custom table name</option> | 38 <option value="custom">Enter custom name per file</option> |
53 </param> | 39 </param> |
54 <when value="tag"> | 40 <when value="tag"> |
41 <param name="inputs" format="bedgraph" type="data" multiple="True" label="BedGraph files" /> | |
55 </when> | 42 </when> |
56 <when value="custom"> | 43 <when value="custom"> |
57 <param name="custom_name" type="text" area="false" label="Custom sample name"/> | 44 <repeat name="bedgraphs" title="Add BedGraph files" min="2" > |
45 <param name="input" format="bedgraph" type="data" multiple="True" label="BedGraph file" /> | |
46 <param name="custom_name" type="text" area="false" label="Custom sample name"/> | |
47 </repeat> | |
58 </when> | 48 </when> |
59 </conditional> | 49 </conditional> |
60 | 50 <expand macro="genome" /> |
61 <!-- INPUT 2 --> | 51 <param name="zero" type="boolean" checked="true" |
62 <param name="input2" format="bedgraph" type="data" label="Second BedGraph file" /> | 52 label="Report regions with zero coverage" |
63 | 53 help="If set, regions without any coverage will also be reported. Requires a valid organism key for all input datasets" /> |
64 <conditional name="name2"> | 54 <param name="filler" type="text" value="N/A" |
65 <param name="choice" type="select" label="Sample name"> | 55 label="Text to use for no-coverage value" |
66 <option value="tag" selected="true">Use input's tag</option> | 56 help="Can be 0.0, N/A, - or any other value. (-filler)" /> |
67 <option value="custom">Enter custom table name</option> | 57 <expand macro="print_header" /> |
68 </param> | |
69 <when value="tag"> | |
70 </when> | |
71 <when value="custom"> | |
72 <param name="custom_name" type="text" area="false" label="Custom sample name"/> | |
73 </when> | |
74 </conditional> | |
75 | |
76 <!-- Additional files, if the user needs more --> | |
77 <repeat name="bedgraphs" title="Add'l BedGraph files" > | |
78 <param name="input" format="bedgraph" type="data" label="BedGraph file" /> | |
79 <conditional name="name"> | |
80 <param name="choice" type="select" label="Sample name"> | |
81 <option value="tag" selected="true">Use input's tag</option> | |
82 <option value="custom">Enter custom table name</option> | |
83 </param> | |
84 <when value="tag"> | |
85 </when> | |
86 <when value="custom"> | |
87 <param name="custom_name" type="text" area="false" label="Custom sample name"/> | |
88 </when> | |
89 </conditional> | |
90 </repeat> | |
91 | |
92 <param name="header" type="boolean" checked="true" truevalue="-header" falsevalue="" label="Print header line" help="The first line will include the name of each sample." /> | |
93 | |
94 <param name="zero" type="boolean" checked="true" label="Report regions with zero coverage" help="If set, regions without any coverage will also be reported. Requires a valid organism key for all input datasets" /> | |
95 | |
96 <param name="filler" type="text" value="0" label="Text to use for no-coverage value" help="Can be 0.0, N/A, - or any other value." /> | |
97 </inputs> | 58 </inputs> |
98 | |
99 <outputs> | 59 <outputs> |
100 <data format="tabular" name="output" metadata_source="input1" label="Merged BedGraphs of ${input1.name}, ${input2.name} and so on." /> | 60 <data name="output" format="bedgraph" /> |
101 </outputs> | 61 </outputs> |
62 <tests> | |
63 <test> | |
64 <param name="tag_select" value="tag"/> | |
65 <param name="inputs" value="unionBedGraphs1.bg,unionBedGraphs2.bg,unionBedGraphs3.bg" ftype="bedgraph" /> | |
66 <param name="zero" value="False"/> | |
67 <output name="output" file="unionBedGraphs_result1.bg" ftype="bedgraph" /> | |
68 </test> | |
69 <test> | |
70 <param name="tag_select" value="tag"/> | |
71 <param name="inputs" value="unionBedGraphs1.bg,unionBedGraphs2.bg,unionBedGraphs3.bg" ftype="bedgraph" /> | |
72 <param name="header" value="True"/> | |
73 <param name="zero" value="False"/> | |
74 <output name="output" file="unionBedGraphs_result2.bg" ftype="bedgraph" /> | |
75 </test> | |
76 <test> | |
77 <param name="tag_select" value="tag"/> | |
78 <param name="inputs" value="unionBedGraphs1.bg,unionBedGraphs2.bg,unionBedGraphs3.bg" ftype="bedgraph" /> | |
79 <param name="zero" value="True"/> | |
80 <param name="genome" value="unionBedGraphs1.len"/> | |
81 <output name="output" file="unionBedGraphs_result3.bg" ftype="bedgraph" /> | |
82 </test> | |
83 <test> | |
84 <param name="tag_select" value="custom"/> | |
85 <repeat name="bedgraphs"> | |
86 <param name="input" value="unionBedGraphs1.bg" /> | |
87 <param name="custom_name" value="first" /> | |
88 </repeat> | |
89 <repeat name="bedgraphs"> | |
90 <param name="input" value="unionBedGraphs2.bg" /> | |
91 <param name="custom_name" value="second" /> | |
92 </repeat> | |
93 <repeat name="bedgraphs"> | |
94 <param name="input" value="unionBedGraphs3.bg" /> | |
95 <param name="custom_name" value="third" /> | |
96 </repeat> | |
97 <param name="zero" value="True"/> | |
98 <param name="genome" value="unionBedGraphs1.len"/> | |
99 <output name="output" file="unionBedGraphs_result4.bg" ftype="bedgraph" /> | |
100 </test> | |
101 </tests> | |
102 <help> | 102 <help> |
103 | 103 <![CDATA[ |
104 **What it does** | 104 **What it does** |
105 | 105 |
106 This tool merges multiple BedGraph files, allowing direct and fine-scale coverage comparisons among many samples/files. The BedGraph files need not represent the same intervals; the tool will identify both common and file-specific intervals. In addition, the BedGraph values need not be numeric: one can use any text as the BedGraph value and the tool will compare the values from multiple files. | 106 This tool merges multiple BedGraph files, allowing direct and fine-scale coverage comparisons among many samples/files. The BedGraph files need not represent the same intervals; the tool will identify both common and file-specific intervals. In addition, the BedGraph values need not be numeric: one can use any text as the BedGraph value and the tool will compare the values from multiple files. |
107 | 107 |
108 .. image:: http://people.virginia.edu/~arq5x/files/bedtools-galaxy/ubg.png | 108 .. image:: http://people.virginia.edu/~arq5x/files/bedtools-galaxy/ubg.png |
224 chr1 450 530 0 0.43 | 224 chr1 450 530 0 0.43 |
225 chr1 530 600 Sample2 0.43 | 225 chr1 530 600 Sample2 0.43 |
226 chr1 600 700 0 0.43 | 226 chr1 600 700 0 0.43 |
227 | 227 |
228 @REFERENCES@ | 228 @REFERENCES@ |
229 | 229 ]]> |
230 </help> | 230 </help> |
231 <expand macro="citations" /> | 231 <expand macro="citations" /> |
232 </tool> | 232 </tool> |