comparison qiime_extract_viz.xml @ 0:f1605d46cb42 draft default tip

planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/qiimme_extract_viz commit 19abce82000b612039fa835391a6fb9328368d73
author iuc
date Mon, 13 May 2024 09:25:59 +0000
parents
children
comparison
equal deleted inserted replaced
-1:000000000000 0:f1605d46cb42
1 <tool id="qiime_extract_viz" name="QIIME vizualisation extractor" version="@TOOL_VERSION@+galaxy@VERSION_SUFFIX@" profile="22.01" license="MIT">
2 <description></description>
3 <macros>
4 <token name="@TOOL_VERSION@">0.1.0</token>
5 <token name="@VERSION_SUFFIX@">0</token>
6 </macros>
7 <edam_topics>
8 <edam_topic>topic_3174</edam_topic><!-- metagenomics -->
9 </edam_topics>
10 <edam_operations>
11 <edam_operation>operation_2422</edam_operation> <!-- Data retrieval -->
12 </edam_operations>
13 <requirements>
14 <requirement type="package" version="6.0">unzip</requirement>
15 </requirements>
16 <command detect_errors="exit_code"><![CDATA[
17 unzip '$infile' "*/data/*" &&
18 mkdir -p '${viz.extra_files_path}' &&
19 mv '$infile.metadata.uuid'/data/* '${viz.extra_files_path}' &&
20
21 ## the html file use <script src="./data.jsonp" charset="utf-8"></script>
22 ## Galaxy sets application/octet-stream as mime type for which browsers
23 ## refuse to include the file. Therefore we replace the extensions by js
24 ## for which Galaxy sets the appropriate mime type
25 for nonjs in \$(cat '${viz.extra_files_path}'/*.html | grep '<script src="' | sed 's/^\s*<script src="//; s/".*//' | grep -v "\.js\$"); do
26 js=\$(echo "\$nonjs" | sed 's/\.[^.]\+$//').js &&
27 mv '${viz.extra_files_path}'"/\$nonjs" '${viz.extra_files_path}'"/\$js" &&
28 sed -i -e "s@\"\${nonjs}\"@\"\${js}\"@" '${viz.extra_files_path}'/*.html;
29 done &&
30
31 mv '${viz.extra_files_path}'/index.html '$viz'
32 ]]></command>
33 <inputs>
34 <param name="infile" type="data" format="qzv" label="QIIME visualization artifact" />
35 </inputs>
36 <outputs>
37 <data name="viz" format="html"/>
38 </outputs>
39 <tests>
40 <!-- the first test use the test data from the galaxy datatypes module
41 where the html file just contains 43 -->
42 <test>
43 <param name="infile" value="qiime2.qzv" ftype="qzv"/>
44 <output name="viz">
45 <assert_contents>
46 <has_text text="43"/>
47 </assert_contents>
48 </output>
49 </test>
50 <test>
51 <param name="infile" value="demux-summ.qzv" ftype="qzv"/>
52 <output name="viz">
53 <assert_contents>
54 <has_text text="html"/>
55 </assert_contents>
56 </output>
57 </test>
58 </tests>
59 <help><![CDATA[
60
61 .. class:: infomark
62
63 **What it does**
64
65 The tool extracts visualisation from QIIME visualisation artifact datasets (qzv).
66
67 QIIME visualisation artifact files are zip files that contain visualisations of the data
68 which is extracted by this tool.
69
70 Note that Galaxy contains a Display application that uses
71 https://view.qiime2.org/ to show this data. For non-public Galaxy instances this
72 does not work.
73
74 ]]></help>
75 <citations>
76 <citation type="doi">10.1038/s41587-019-0209-9</citation>
77 </citations>
78 </tool>