Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add q2view display application. #1

Merged
merged 2 commits into from
Jan 17, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions config/datatypes_conf.xml.sample
Original file line number Diff line number Diff line change
Expand Up @@ -189,8 +189,12 @@
<datatype extension="nrrd" type="galaxy.datatypes.images:Nrrd" mimetype="image/nrrd"/>
<datatype extension="nhdr" type="galaxy.datatypes.images:Nrrd" subclass="true"/>
<datatype extension="rna_eps" type="galaxy.datatypes.sequence:RNADotPlotMatrix" mimetype="image/eps" display_in_upload="true"/>
<datatype extension="qza" type="galaxy.datatypes.qiime2:Qiime2Artifact" mimetype="application/octet-stream" display_in_upload="true"/>
<datatype extension="qzv" type="galaxy.datatypes.qiime2:Qiime2Visualization" mimetype="application/octet-stream" display_in_upload="true"/>
<datatype extension="qza" type="galaxy.datatypes.qiime2:Qiime2Artifact" mimetype="application/octet-stream" display_in_upload="true">
<display file="qiime/qiime2/q2view.xml"/>
</datatype>
<datatype extension="qzv" type="galaxy.datatypes.qiime2:Qiime2Visualization" mimetype="application/octet-stream" display_in_upload="true">
<display file="qiime/qiime2/q2view.xml"/>
</datatype>
<datatype extension="zip" type="galaxy.datatypes.binary:CompressedZipArchive" display_in_upload="true"/>
<datatype extension="tar" type="galaxy.datatypes.binary:CompressedArchive" subclass="true" display_in_upload="true"/>
<!-- Proteomics Datatypes -->
Expand Down
5 changes: 5 additions & 0 deletions config/tool_data_table_conf.xml.sample
Original file line number Diff line number Diff line change
Expand Up @@ -105,4 +105,9 @@
<columns>value, name, url</columns>
<file path="tool-data/intermine_simple_display.loc" />
</table>
<!-- q2view servers -->
<table name="q2view_display" comment_char="#" allow_duplicate_entries="False">
<columns>value, name, url</columns>
<file path="tool-data/q2view_display.loc" />
</table>
</tables>
7 changes: 7 additions & 0 deletions display_applications/qiime/qiime2/q2view.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
<?xml version="1.0"?>
<display id="q2view" version="1.0.0" name="view at">
<dynamic_links from_data_table="q2view_display" skip_startswith="#" id="value" name="name">
<url>${ url % { 'q2view_file_url_qp': $q2view_file.qp } }</url>
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How does this work? Is the url % { mapping something (like URI-encoding) over the object? Or are we assigning into a scope of some sort?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

url comes from the 'url' column of the q2view_display.loc.sample file. This is just doing standard dictionary-based string replacement.

The .qp attribute of $q2view_file calls urllib.parse.quote_plus on the URL generated for q2view_file.

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is just doing standard dictionary-based string replacement.

oh. duh! Thanks!

The .qp attribute of $q2view_file calls urllib.parse.quote_plus on the URL generated for q2view_file.

Ah, neat!

<param type="data" name="q2view_file" url="galaxy_${DATASET_HASH}.${dataset.ext}" />
</dynamic_links>
</display>
3 changes: 3 additions & 0 deletions tool-data/q2view_display.loc.sample
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# Table used for listing QIIME2View display servers
#<unique_id> <display_name> <url>
main_q2view qiime2view https://view.qiime2.org/visualization/?type=html&src=%(q2view_file_url_qp)s