-
Notifications
You must be signed in to change notification settings - Fork 441
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #4834 from bernt-matthias/topic/qiime-qzv-vis
add qiime qzv visualisation extractor
- Loading branch information
Showing
4 changed files
with
88 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
name: qiime_extract_viz | ||
owner: iuc | ||
description: Extract vizualization from QIIME artifacts | ||
long_description: | | ||
extracts visualisation from QIIME visualisation artifact datasets (qzv) | ||
remote_repository_url: https://github.com/galaxyproject/tools-iuc/tree/master/tools/qiimme_extract_viz | ||
homepage_url: http://www.qiime.org | ||
type: unrestricted | ||
categories: | ||
- Metagenomics |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,78 @@ | ||
<tool id="qiime_extract_viz" name="QIIME vizualisation extractor" version="@TOOL_VERSION@+galaxy@VERSION_SUFFIX@" profile="22.01" license="MIT"> | ||
<description></description> | ||
<macros> | ||
<token name="@TOOL_VERSION@">0.1.0</token> | ||
<token name="@VERSION_SUFFIX@">0</token> | ||
</macros> | ||
<edam_topics> | ||
<edam_topic>topic_3174</edam_topic><!-- metagenomics --> | ||
</edam_topics> | ||
<edam_operations> | ||
<edam_operation>operation_2422</edam_operation> <!-- Data retrieval --> | ||
</edam_operations> | ||
<requirements> | ||
<requirement type="package" version="6.0">unzip</requirement> | ||
</requirements> | ||
<command detect_errors="exit_code"><![CDATA[ | ||
unzip '$infile' "*/data/*" && | ||
mkdir -p '${viz.extra_files_path}' && | ||
mv '$infile.metadata.uuid'/data/* '${viz.extra_files_path}' && | ||
## the html file use <script src="./data.jsonp" charset="utf-8"></script> | ||
## Galaxy sets application/octet-stream as mime type for which browsers | ||
## refuse to include the file. Therefore we replace the extensions by js | ||
## for which Galaxy sets the appropriate mime type | ||
for nonjs in \$(cat '${viz.extra_files_path}'/*.html | grep '<script src="' | sed 's/^\s*<script src="//; s/".*//' | grep -v "\.js\$"); do | ||
js=\$(echo "\$nonjs" | sed 's/\.[^.]\+$//').js && | ||
mv '${viz.extra_files_path}'"/\$nonjs" '${viz.extra_files_path}'"/\$js" && | ||
sed -i -e "s@\"\${nonjs}\"@\"\${js}\"@" '${viz.extra_files_path}'/*.html; | ||
done && | ||
mv '${viz.extra_files_path}'/index.html '$viz' | ||
]]></command> | ||
<inputs> | ||
<param name="infile" type="data" format="qzv" label="QIIME visualization artifact" /> | ||
</inputs> | ||
<outputs> | ||
<data name="viz" format="html"/> | ||
</outputs> | ||
<tests> | ||
<!-- the first test use the test data from the galaxy datatypes module | ||
where the html file just contains 43 --> | ||
<test> | ||
<param name="infile" value="qiime2.qzv" ftype="qzv"/> | ||
<output name="viz"> | ||
<assert_contents> | ||
<has_text text="43"/> | ||
</assert_contents> | ||
</output> | ||
</test> | ||
<test> | ||
<param name="infile" value="demux-summ.qzv" ftype="qzv"/> | ||
<output name="viz"> | ||
<assert_contents> | ||
<has_text text="html"/> | ||
</assert_contents> | ||
</output> | ||
</test> | ||
</tests> | ||
<help><![CDATA[ | ||
.. class:: infomark | ||
**What it does** | ||
The tool extracts visualisation from QIIME visualisation artifact datasets (qzv). | ||
QIIME visualisation artifact files are zip files that contain visualisations of the data | ||
which is extracted by this tool. | ||
Note that Galaxy contains a Display application that uses | ||
https://view.qiime2.org/ to show this data. For non-public Galaxy instances this | ||
does not work. | ||
]]></help> | ||
<citations> | ||
<citation type="doi">10.1038/s41587-019-0209-9</citation> | ||
</citations> | ||
</tool> |
Binary file not shown.
Binary file not shown.