Mercurial > repos > imgteam > unzip
comparison unzip.xml @ 0:ec30427e0d42 draft
planemo upload for repository https://github.com/BMCV/galaxy-image-analysis/tools/unzip/ commit 2183b20497f6ed7962ae764c7a93d0adcfffe254
author | imgteam |
---|---|
date | Thu, 01 Aug 2019 11:04:14 -0400 |
parents | |
children | 38eec75fbe9b |
comparison
equal
deleted
inserted
replaced
-1:000000000000 | 0:ec30427e0d42 |
---|---|
1 <tool id="unzip" name="Unzip" version="0.1"> | |
2 <description>Unzip file</description> | |
3 <requirements> | |
4 <requirement type="package">unzip</requirement> | |
5 <requirement type="package">tar</requirement> | |
6 </requirements> | |
7 <command> | |
8 <![CDATA[ | |
9 mkdir ./out && | |
10 #if $input_file.is_of_type("zip"): | |
11 unzip "$input_file" | |
12 #if $extract_options['extract_all'] == 'False' | |
13 "$extract_options['pathtofile']" | |
14 #end if | |
15 -d out/ | |
16 #end if | |
17 #if $input_file.is_of_type("tar"): | |
18 tar -xf "$input_file" | |
19 #if $extract_options['extract_all'] == 'False' | |
20 "$extract_options['pathtofile']" | |
21 #end if | |
22 -C ./out/ | |
23 #end if | |
24 ]]> | |
25 </command> | |
26 <inputs> | |
27 <param label="input_file" name="input_file" type="data" format="zip,tar"/> | |
28 | |
29 <conditional name="extract_options"> | |
30 <param label="Extract single file" name="extract_all" type="select"> | |
31 <option selected="True" value="True">All files</option> | |
32 <option value="False">Single file</option> | |
33 </param> | |
34 <when value="True"></when> | |
35 <when value="False"> | |
36 <param name="pathtofile" type="text" value="" label="Filepath"> | |
37 <sanitizer invalid_char=""> | |
38 <valid initial="string.ascii_letters,string.digits"> | |
39 <add value="_" /> | |
40 <add value="/" /> | |
41 <add value="." /> | |
42 <add value="/../" /> | |
43 </valid> | |
44 </sanitizer> | |
45 </param> | |
46 </when> | |
47 </conditional> | |
48 </inputs> | |
49 <outputs> | |
50 <data name="unzipped_single"> | |
51 <discover_datasets pattern="__name__" directory="out" visible="true" ext="data" assign_primary_output="true" /> | |
52 <filter>extract_options['extract_all'] == 'False'</filter> | |
53 </data> | |
54 <collection name="unzipped" type="list" label="${tool.name} on ${on_string}"> | |
55 <discover_datasets pattern="__name__" ext="data" directory="out" visible="false"/> | |
56 <filter>extract_options['extract_all'] == 'True'</filter> | |
57 </collection> | |
58 </outputs> | |
59 <tests> | |
60 <test> | |
61 <param name="input_file" value="input.zip" ftype="zip"/> | |
62 <param name="extract_all" value="False"/> | |
63 <param name="pathtofile" value="input.png"/> | |
64 <output name="unzipped_single" file="input.png" ftype="data" compare="sim_size" /> | |
65 </test> | |
66 <test> | |
67 <param name="input_file" value="input.zip" ftype="zip"/> | |
68 <param name="extract_all" value="True"/> | |
69 <output_collection name="unzipped" type="list"> | |
70 <element name="input.png" file="input.png" ftype="data" compare="sim_size"/> | |
71 <element name="res.tiff" file="res.tiff" ftype="data" compare="sim_size"/> | |
72 </output_collection> | |
73 </test> | |
74 <test> | |
75 <param name="input_file" value="input.tar" ftype="tar"/> | |
76 <param name="extract_all" value="True"/> | |
77 <output_collection name="unzipped" type="list"> | |
78 <element name="input.png" file="input.png" ftype="data" compare="sim_size"/> | |
79 <element name="res.tiff" file="res.tiff" ftype="data" compare="sim_size"/> | |
80 </output_collection> | |
81 </test> | |
82 </tests> | |
83 <help> | |
84 **What it does** | |
85 | |
86 Unzip folder to collection. | |
87 </help> | |
88 <citations> | |
89 <citation type="doi">10.1016/j.jbiotec.2017.07.019</citation> | |
90 </citations> | |
91 </tool> | |
92 |