comparison export.xml @ 0:fcb7370e827f draft

planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/anndata/ commit 2e16aca90c4fc6f13bd024eed43bc4adbf5967da
author iuc
date Wed, 10 Apr 2019 03:24:14 -0400
parents
children 8623710d083c
comparison
equal deleted inserted replaced
-1:000000000000 0:fcb7370e827f
1 <tool id="anndata_export" name="Export AnnData" version="@VERSION@+@GALAXY_VERSION@">
2 <description>to different formats</description>
3 <macros>
4 <import>macros.xml</import>
5 </macros>
6 <expand macro="requirements"/>
7 <expand macro="version_command"/>
8 <command detect_errors="exit_code"><![CDATA[
9 @CMD@
10 ]]></command>
11 <configfiles>
12 <configfile name="script_file"><![CDATA[
13 @CMD_imports@
14
15 adata = ad.read('$input')
16 #if $output_format == 'loom'
17 adata.write_loom('anndata.loom')
18 #else if $output_format == 'tabular'
19 adata.write_csvs('.', sep="\t", skip_data = False)
20 #end if
21 ]]></configfile>
22 </configfiles>
23 <inputs>
24 <param name="input" type="data" format="h5ad" label="Annotated data matrix"/>
25 <param name="output_format" type="select" label="Format to write the annotated data matrix">
26 <option value="loom">loom</option>
27 <option value="tabular">Tabular</option>
28 </param>
29 </inputs>
30 <outputs>
31 <data name="loom_output" format="loom" from_work_dir="anndata.loom" label="${tool.name} on ${on_string}: Annotated data matrix">
32 <filter>output_format == 'loom'</filter>
33 </data>
34 <data name="tabular_x" format="tabular" from_work_dir="X.csv" label="${tool.name} on ${on_string}: Matrix table (X)">
35 <filter>output_format == 'tabular'</filter>
36 </data>
37 <data name="tabular_obs" format="tabular" from_work_dir="obs.csv" label="${tool.name} on ${on_string}: Key-indexed one-dimensional observations annotation (obs)">
38 <filter>output_format == 'tabular'</filter>
39 </data>
40 <data name="tabular_obsm" format="tabular" from_work_dir="obsm.csv" label="${tool.name} on ${on_string}: Key-indexed multi-dimensional observations annotation (obsm)">
41 <filter>output_format == 'tabular'</filter>
42 </data>
43 <data name="tabular_var" format="tabular" from_work_dir="var.csv" label="${tool.name} on ${on_string}: Key-indexed one-dimensional variables annotation (var)">
44 <filter>output_format == 'tabular'</filter>
45 </data>
46 <data name="tabular_varm" format="tabular" from_work_dir="varm.csv" label="${tool.name} on ${on_string}: Key-indexed multi-dimensional variables annotation (varm)">
47 <filter>output_format == 'tabular'</filter>
48 </data>
49 </outputs>
50 <tests>
51 <test>
52 <param name="input" value="krumsiek11.h5ad"/>
53 <param name="output_format" value="loom"/>
54 <assert_stdout>
55 <has_text_matching expression="adata.write_loom"/>
56 </assert_stdout>
57 <output name="loom_output" value="export.krumsiek11.loom" ftype="loom" compare="sim_size"/>
58 </test>
59 <test>
60 <param name="input" value="krumsiek11.h5ad"/>
61 <param name="output_format" value="tabular"/>
62 <assert_stdout>
63 <has_text_matching expression="adata.write_csvs"/>
64 </assert_stdout>
65 <output name="tabular_x" value="export.krumsiek11.X.tabular" ftype="tabular"/>
66 <output name="tabular_obs" value="export.krumsiek11.obs.tabular" ftype="tabular"/>
67 <output name="tabular_obsm" value="export.krumsiek11.obsm.tabular" ftype="tabular"/>
68 <output name="tabular_var" value="export.krumsiek11.var.tabular" ftype="tabular"/>
69 <output name="tabular_varm" value="export.krumsiek11.varm.tabular" ftype="tabular"/>
70 </test>
71 </tests>
72 <help><![CDATA[
73 **What it does**
74
75 This tool exports a AnnData dataset to a Loom file
76 (`write_loom method <https://anndata.readthedocs.io/en/latest/anndata.AnnData.write_loom.html>`__)
77 or a Tabular file (`write_csvs method <https://anndata.readthedocs.io/en/latest/anndata.AnnData.write_csvs.html>`__)
78
79 @HELP@
80 ]]></help>
81 <expand macro="citations"/>
82 </tool>