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

Feature/scanpy_mtx_compression #259

Open
wants to merge 20 commits into
base: develop
Choose a base branch
from
Open
Changes from 3 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
107 changes: 103 additions & 4 deletions tools/tertiary-analysis/scanpy/scanpy_macros2.xml
Original file line number Diff line number Diff line change
Expand Up @@ -155,18 +155,117 @@ EMBL-EBI https://www.ebi.ac.uk/ and Teichmann Lab at Wellcome Sanger Institute.
</xml>

<xml name="export_mtx_params">
<param name="export_mtx" argument="--export-mtx" type="boolean" truevalue="--export-mtx ./" falsevalue="" checked="false" label="Save to 10x mtx format" help="If enabled, it will generate in addition to the main output in Loom or AnnData an export in 10x format."/>
<conditional name="export_mtx_inputs">
<param name="export_mtx" argument="--export-mtx" type="boolean" truevalue="--export-mtx ./" falsevalue="" checked="false" label="Save to 10x mtx format" help="If enabled, it will generate in addition to the main output in Loom or AnnData an export in 10x format."/>
<when value="true">
<param name="mtx_compression" argument="--mtx-compression" type="select" value="None" label="" help="Compression type for MTX output.">
<option value="None">No compression</option>
<option value="zip">zip</option>
<option value="gzip">gzip</option>
<option value="bz2">bz2</option>
<option value="zstd">zstd</option>
Copy link
Member

Choose a reason for hiding this comment

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

if zst is not supported in Galaxy then we should remove it for now.

</param>
</when>
</conditional>
</xml>

<xml name="export_mtx_outputs">
<data name="matrix_10x" format="txt" from_work_dir="matrix.mtx" label="${tool.name} on ${on_string}: 10x matrix">
<data name="matrix_10x" label="${tool.name} on ${on_string}: 10x matrix">
<filter>export_mtx</filter>
<actions>
<conditional name="mtx_compression">
<when value="None">
<action type="format">
<!-- I want to update data "matrix_10x" with format="txt" from_work_dir="matrix.mtx" -->
</action>
</when>
<when value="zip">
<action type="format">
<!-- I want to update data "matrix_10x" with format="zip" from_work_dir="matrix.mtx.zip" -->
</action>
</when>
<when value="gzip">
<action type="format">
<!-- I want to update data "matrix_10x" with format="gzip" from_work_dir="matrix.mtx.gz" -->
</action>
</when>
<when value="bz2">
<action type="format">
<!-- I want to update data "matrix_10x" with format="bz2" from_work_dir="matrix.mtx.bz2" -->
</action>
</when>
<when value="zstd">
<action type="format">
<!-- I want to update data "matrix_10x" with format="zstd" from_work_dir="matrix.mtx.zst" -->
</action>
</when>
</conditional>
</actions>
</data>
<data name="genes_10x" format="tsv" from_work_dir="genes.tsv" label="${tool.name} on ${on_string}: 10x genes">
<data name="genes_10x" label="${tool.name} on ${on_string}: 10x genes">
<filter>export_mtx</filter>
<actions>
<conditional name="mtx_compression">
<when value="None">
<action type="format">
<!-- I want to update data "genes_10x" with format="tsv" from_work_dir="genes.tsv" -->
</action>
</when>
<when value="zip">
<action type="format">
<!-- I want to update data "genes_10x" with format="zip" from_work_dir="genes.tsv.zip" -->
</action>
</when>
<when value="gzip">
<action type="format">
<!-- I want to update data "genes_10x" with format="gzip" from_work_dir="genes.tsv.gz" -->
</action>
</when>
<when value="bz2">
<action type="format">
<!-- I want to update data "genes_10x" with format="bz2" from_work_dir="genes.tsv.bz2" -->
</action>
</when>
<when value="zstd">
<action type="format">
<!-- I want to update data "genes_10x" with format="zst" from_work_dir="genes.tsv.zst" -->
</action>
</when>
</conditional>
</actions>
</data>
<data name="barcodes_10x" format="tsv" from_work_dir="barcodes.tsv" label="${tool.name} on ${on_string}: 10x barcodes">
<data name="barcodes_10x" label="${tool.name} on ${on_string}: 10x barcodes">
Copy link
Member

Choose a reason for hiding this comment

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

I would have multiple outputs, each attached to a potential value of the format.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done in 85534a6

<filter>export_mtx</filter>
<actions>
Copy link
Member

Choose a reason for hiding this comment

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

It might be that these actions require a higher profile than 18.01?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thank you, I'll check this.

<conditional name="mtx_compression">
<when value="None">
<action type="format">
<!-- I want to update data "barcodes_10x" with format="tsv" from_work_dir="barcodes.tsv -->
</action>
</when>
<when value="zip">
<action type="format">
<!-- I want to update data "barcodes_10x" with format="zip" from_work_dir="barcodes.tsv.zip" -->
</action>
</when>
<when value="gzip">
<action type="format">
<!-- I want to update data "barcodes_10x" with format="gzip" from_work_dir="barcodes.tsv.gz" -->
</action>
</when>
<when value="bz2">
<action type="format">
<!-- I want to update data "barcodes_10x" with format="bz2" from_work_dir="barcodes.tsv.bz2" -->
</action>
</when>
<when value="zstd">
<action type="format">
<!-- I want to update data "barcodes_10x" with format="zstd" from_work_dir="barcodes.tsv.zst" -->
</action>
</when>
</conditional>
</actions>
</data>
</xml>

</macros>