Mercurial > repos > iuc > anndata_export
diff export.xml @ 12:cfaf5a405371 draft
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/anndata/ commit 67b3808b56df343798263ff0c905df8cb789edfa
author | iuc |
---|---|
date | Sat, 14 Sep 2024 19:57:36 +0000 |
parents | e1c3c2f2a834 |
children | 7a6655aa6eb2 |
line wrap: on
line diff
--- a/export.xml Sun Nov 12 16:43:28 2023 +0000 +++ b/export.xml Sat Sep 14 19:57:36 2024 +0000 @@ -1,90 +1,33 @@ -<tool id="anndata_export" name="Export AnnData and loom files" version="@TOOL_VERSION@+galaxy@VERSION_SUFFIX@"> - <description>Interconvert AnnData and Loom formats</description> +<tool id="anndata_export" name="Export AnnData" version="@TOOL_VERSION@+galaxy@VERSION_SUFFIX@" profile="@PROFILE@"> + <description>matrix and annotations</description> <macros> <import>macros.xml</import> </macros> <expand macro="requirements"/> <expand macro="version_command"/> <command detect_errors="exit_code"><![CDATA[ -#if $hd5_format.filetype == 'anndata': - @CMD@ -#else: - @LOOMCMD@ -#end if +@CMD@ ]]></command> <configfiles> <configfile name="script_file"><![CDATA[ @CMD_imports@ -#if $hd5_format.filetype == 'anndata': -adata = ad.read_h5ad('$hd5_format.input') - #if $hd5_format.output_format == 'loom': -adata.write_loom('anndata.loom') - #else if $hd5_format.output_format == 'tabular': +adata = ad.read_h5ad('$input') adata.write_csvs('.', sep="\t", skip_data = False) - #end if -#end if ]]></configfile> </configfiles> <inputs> - <conditional name="hd5_format"> - <param name="filetype" type="select" label="hd5 format"> - <option value="anndata" selected="true">Anndata file</option> - <option value="loom">Loom file</option> - </param> - <when value="anndata"> - <param name="input" type="data" format="h5ad" label="Annotated data matrix"/> - <param name="output_format" type="select" label="Format to write the annotated data matrix"> - <option value="loom">loom</option> - <option value="tabular">Tabular</option> - </param> - </when> - <when value="loom"> - <param name="input" type="data" format="loom" label="Loom file to be exported to a series of tabular files."/> - </when> - </conditional> + <param name="input" type="data" format="h5ad" label="Annotated data matrix to export" help="Create individual tabular files for matrix, obs, obsm, var and varm annotations"/> </inputs> <outputs> - <data name="loom_output" format="loom" from_work_dir="anndata.loom" label="${tool.name} on ${on_string}: Annotated data matrix"> - <filter>hd5_format['filetype'] == 'anndata' and hd5_format['output_format'] == 'loom'</filter> - </data> - <data name="tabular_x" format="tabular" from_work_dir="X.csv" label="${tool.name} on ${on_string}: Matrix table (X)"> - <filter>hd5_format['filetype'] == 'anndata' and hd5_format['output_format'] == 'tabular'</filter> - </data> - <data name="tabular_obs" format="tabular" from_work_dir="obs.csv" label="${tool.name} on ${on_string}: Key-indexed one-dimensional observations annotation (obs)"> - <filter>hd5_format['filetype'] == 'anndata' and hd5_format['output_format'] == 'tabular'</filter> - </data> - <data name="tabular_obsm" format="tabular" from_work_dir="obsm.csv" label="${tool.name} on ${on_string}: Key-indexed multi-dimensional observations annotation (obsm)"> - <filter>hd5_format['filetype'] == 'anndata' and hd5_format['output_format'] == 'tabular'</filter> - </data> - <data name="tabular_var" format="tabular" from_work_dir="var.csv" label="${tool.name} on ${on_string}: Key-indexed one-dimensional variables annotation (var)"> - <filter>hd5_format['filetype'] == 'anndata' and hd5_format['output_format'] == 'tabular'</filter> - </data> - <data name="tabular_varm" format="tabular" from_work_dir="varm.csv" label="${tool.name} on ${on_string}: Key-indexed multi-dimensional variables annotation (varm)"> - <filter>hd5_format['filetype'] == 'anndata' and hd5_format['output_format'] == 'tabular'</filter> - </data> - <collection name="layer_tsvs" type="list" label="Layer matrices" > - <filter>hd5_format['filetype'] == 'loom'</filter> - <discover_datasets pattern="__designation__" format="tabular" directory="output" visible="false" /> - </collection> - <collection name="attribute_tsvs" type="list" label="Attribute matrices" > - <filter>hd5_format['filetype'] == 'loom'</filter> - <discover_datasets pattern="__designation__" format="tabular" directory="attributes" visible="false" /> - </collection> + <data name="tabular_x" format="tabular" from_work_dir="X.csv" label="${tool.name} on ${on_string}: Matrix table (X)"/> + <data name="tabular_obs" format="tabular" from_work_dir="obs.csv" label="${tool.name} on ${on_string}: Key-indexed one-dimensional observations annotation (obs)"/> + <data name="tabular_obsm" format="tabular" from_work_dir="obsm.csv" label="${tool.name} on ${on_string}: Key-indexed multi-dimensional observations annotation (obsm)"/> + <data name="tabular_var" format="tabular" from_work_dir="var.csv" label="${tool.name} on ${on_string}: Key-indexed one-dimensional variables annotation (var)"/> + <data name="tabular_varm" format="tabular" from_work_dir="varm.csv" label="${tool.name} on ${on_string}: Key-indexed multi-dimensional variables annotation (varm)"/> </outputs> <tests> - <test expect_num_outputs="1"> - <param name="filetype" value="anndata"/> + <test expect_num_outputs="5"> <param name="input" value="krumsiek11.h5ad"/> - <param name="output_format" value="loom"/> - <assert_stdout> - <has_text_matching expression="adata.write_loom"/> - </assert_stdout> - <output name="loom_output" value="export.krumsiek11.loom" ftype="loom" compare="sim_size"/> - </test> - <test expect_num_outputs="5"> - <param name="filetype" value="anndata"/> - <param name="input" value="krumsiek11.h5ad"/> - <param name="output_format" value="tabular"/> <assert_stdout> <has_text_matching expression="adata.write_csvs"/> </assert_stdout> @@ -94,26 +37,9 @@ <output name="tabular_var" value="export.krumsiek11.var.tabular" ftype="tabular"/> <output name="tabular_varm" value="export.krumsiek11.varm.tabular" ftype="tabular"/> </test> - <test expect_num_outputs="2"> - <param name="filetype" value="loom"/> - <param name="input" value="loomtest.loom"/> - <output_collection name="layer_tsvs" type="list"> - <element name="mainmatrix.tsv" value="firstlayer.tsv" ftype="tabular"/> - <element name="extralayer.tsv" value="secondlayer.tsv" ftype="tabular"/> - <element name="thirdlayer.tsv" value="finallayer.tsv" ftype="tabular"/> - </output_collection> - <output_collection name="attribute_tsvs" type="list"> - <element name="row_attr.tsv" value="rows.tsv" ftype="tabular"/> - <element name="col_attr.tsv" value="cols.tsv" ftype="tabular"/> - </output_collection> - </test> </tests> <help><![CDATA[ -This tool exports an AnnData dataset to a Loom file -(`write_loom method <https://anndata.readthedocs.io/en/latest/generated/anndata.AnnData.write_loom.html>`__) -or a Tabular file (`write_csvs method <https://anndata.readthedocs.io/en/latest/generated/anndata.AnnData.write_csvs.html>`__) - -It can also create a series of tabular files from an input loom dataset. +This tool exports an AnnData dataset to a tabular files (`write_csvs method <https://anndata.readthedocs.io/en/latest/generated/anndata.AnnData.write_csvs.html>`__) @HELP@ ]]></help>