comparison bundle_collection.xml @ 2:705ebd286b57 draft default tip

"planemo upload commit 7761f1e59039279728185e751f1a51b56fe14cb0"
author nml
date Mon, 24 Aug 2020 12:14:15 -0400
parents cd6da887a5f4
children
comparison
equal deleted inserted replaced
1:cd6da887a5f4 2:705ebd286b57
1 <tool id="bundle_collection" name="Bundle Collection" version="1.2.1"> 1 <tool id="bundle_collection" name="Bundle Collection" version="1.3.0">
2 <description>Download a collection of files</description> 2 <description>Package up and download a collection of files as a single archive.</description>
3 <stdio> 3 <requirements>
4 <exit_code range="1:" level="fatal" description="Unknown error has occurred"/> 4 <requirement type="package" version="2.50">perl-getopt-long</requirement>
5 </stdio> 5 <requirement type="package" version="1.69">perl-pod-usage</requirement>
6 <command interpreter="perl">bundle_collection.pl -h $html_file -p $html_file.files_path 6 </requirements>
7 <command detect_errors="aggressive"><![CDATA[
8 perl '$__tool_directory__/bundle_collection.pl' -h '$html_file' -p '$html_file.files_path'
7 9
8 #if $singles_or_list.type == "list": 10 #if $singles_or_list.type == "list":
9 11
10 #if $singles_or_list.input: 12 #if $singles_or_list.input:
11 #for $f in $singles_or_list.input.keys 13 #for $f in $singles_or_list.input.keys
12 -i "$f,$singles_or_list.input[$f].ext=$singles_or_list.input[$f]" 14 -i "$f,$singles_or_list.input[$f].ext=$singles_or_list.input[$f]"
13 #if $singles_or_list.input[$f].metadata.bam_index and $singles_or_list.input[$f].metadata.bam_index != "None" 15 #if $singles_or_list.input[$f].metadata.bam_index and $singles_or_list.input[$f].metadata.bam_index != "None"
14 #set $bamind = $f+","+$singles_or_list.input[$f].ext+".bai="+$singles_or_list.input[$f].metadata.bam_index 16 #set $bamind = $f+","+$singles_or_list.input[$f].ext+".bai="+$singles_or_list.input[$f].metadata.bam_index
15 -i "$bamind" 17 -i "$bamind"
16 #end if 18 #end if
17 #end for 19 #end for
18 #end if 20 #end if
19 #elif $singles_or_list.type == "singles": 21 #elif $singles_or_list.type == "singles":
20 #for $dataset in $singles_or_list.single_files 22 #for $dataset in $singles_or_list.single_files
21 #if $dataset.single_file: 23 #if $dataset.single_file:
22 -i "$dataset.single_file.name,$dataset.single_file.ext=$dataset.single_file" 24 -i "$dataset.single_file.name,$dataset.single_file.ext=$dataset.single_file"
23 #end if 25 #end if
24 26
25 #if $dataset.single_file.metadata.bam_index and $dataset.single_file.metadata.bam_index != "None" 27 #if $dataset.single_file.metadata.bam_index and $dataset.single_file.metadata.bam_index != "None"
26 #set $bamind = $dataset.single_file.name+","+$dataset.single_file.ext+".bai="+$dataset.single_file.metadata.bam_index 28 #set $bamind = $dataset.single_file.name+","+$dataset.single_file.ext+".bai="+$dataset.single_file.metadata.bam_index
27 -i "$bamind" 29 -i "$bamind"
28 #end if 30 #end if
29 31 #end for
30 #end for 32 #end if
31 #end if 33 ]]></command>
32 </command>
33 34
34 <inputs> 35 <inputs>
35 <conditional name="singles_or_list"> 36 <conditional name="singles_or_list">
36 <param name="type" type="select" label="Bundle type"> 37 <param name="type" type="select" label="Bundle type">
37 <option value="singles">Individual datasets</option> 38 <option value="singles">Individual datasets</option>
38 <option value="list">List Collection </option> 39 <option value="list">List Collection </option>
39 </param> 40 </param>
40 <when value="singles"> 41 <when value="singles">
41 <repeat name='single_files' title='Single dataset(s)'> 42 <repeat name='single_files' title='Single dataset(s)'>
42 <param name="single_file" label="Dataset to add the bundle" type="data" format='data' optional='False'/> 43 <param name="single_file" label="Dataset to add the bundle" type="data" format='data' optional='False'/>
43 </repeat> 44 </repeat>
44 </when> 45 </when>
45 <when value="list"> 46 <when value="list">
46 <param name="input" type="data_collection" label="Data Collection" collection_type="list" optional='False'/> 47 <param name="input" type="data_collection" label="Data Collection" collection_type="list" optional='False'/>
47 </when> 48 </when>
48 </conditional> 49 </conditional>
49 </inputs> 50 </inputs>
50 51
51 <outputs> 52 <outputs>
52 <data name="html_file" format="html" label="Bundled Collection" /> 53 <data name="html_file" format="html" label="Bundled Collection" />
53 </outputs> 54 </outputs>
54 <tests>
55 <test>
56 <output/>
57 </test>
58 </tests>
59 55
60 <help> 56 <tests>
61 ***What it does** 57 <test>
58 <conditional name="singles_or_list">
59 <param name="type" value="singles" />
60 <repeat name="single_files">
61 <param name="single_file" value="first.txt" />
62 </repeat>
63 </conditional>
64 <output name="html_file" file="out-1.html" />
65 </test>
66 <test>
67 <conditional name="singles_or_list">
68 <param name="type" value="singles" />
69 <repeat name="single_files">
70 <param name="single_file" value="first.txt" />
71 </repeat>
72 <repeat name="single_files">
73 <param name="single_file" value="second.txt" />
74 </repeat>
75 </conditional>
76 <output name="html_file" file="out-2.html" />
77 </test>
78 <test>
79 <conditional name="singles_or_list">
80 <param name="type" value="list" />
81 <param name="input">
82 <collection type="list">
83 <element name="first.txt" value="first.txt"/>
84 <element name="second.txt" value="second.txt"/>
85 </collection>
86 </param>
87 </conditional>
88 <output name="html_file" file="out-2.html" />
89 </test>
90 </tests>
62 91
63 This tool will bundle up files in a list collection into a downloadable zip file 92 <help><![CDATA[
93 ***What it does**
64 94
65 Author: Mariam Iskander and Jen Cabral 95 This tool will bundle up files in a list collection into a downloadable zip file
66 </help>
67 96
68 <citations> 97 Author: Mariam Iskander, Jen Cabral, and Aaron Petkau (Public Health Agency of Canada).
98 ]]>
99 </help>
100
101 <citations>
102 <citation type="bibtex">
103 @UNPUBLISHED{PHAC2020,
104 author = "Public Health Agency of Canada",
105 title = "Bundle Collections",
106 year = "2020",
107 url = {https://github.com/phac-nml/galaxy_tools}
108 }
109 </citation>
69 </citations> 110 </citations>
70 111
71 </tool> 112 </tool>