Previous changeset 11:e1c3c2f2a834 (2023-11-12) Next changeset 13:7a6655aa6eb2 (2024-11-08) |
Commit message:
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/anndata/ commit 67b3808b56df343798263ff0c905df8cb789edfa |
modified:
export.xml macros.xml test-data/addloomout1.loom test-data/addloomout3.loom test-data/converted.loom.test test-data/export.krumsiek11.loom test-data/import.csv.h5ad test-data/krumsiek11.h5ad test-data/pp.neighbors_umap_euclidean.recipe_weinreb17.paul15_subsample.h5ad test-data/pp.pca.krumsiek11.h5ad test-data/tl.diffmap.h5ad test-data/tl.draw_graph.h5ad test-data/tl.paga.neighbors_gauss_braycurtis.recipe_weinreb17.paul15_subsample.h5ad test-data/tl.rank_genes_groups.krumsiek11.h5ad test-data/tl.tsne.h5ad test-data/tl.umap.h5ad |
removed:
test-data/import.loom.krumsiek11.h5ad test-data/import.mtx.legacy_10x.h5ad test-data/import.mtx.no_10x.h5ad test-data/import.mtx.v3_10x.h5ad test-data/import.tsv.h5ad test-data/import.umi_tools.h5ad test-data/manipulate.add_annotation_obs.h5ad test-data/manipulate.add_annotation_var.h5ad test-data/manipulate.concatenate.h5ad test-data/manipulate.filter_obs_key.h5ad test-data/manipulate.filter_var_index.h5ad test-data/manipulate.obs_names_make_unique.h5ad test-data/manipulate.rename_categories.h5ad test-data/manipulate.save_raw.h5ad test-data/manipulate.strings_to_categoricals.h5ad test-data/manipulate.transpose.h5ad test-data/manipulate.var_names_make_unique.h5ad |
b |
diff -r e1c3c2f2a834 -r cfaf5a405371 export.xml --- 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> |
b |
diff -r e1c3c2f2a834 -r cfaf5a405371 macros.xml --- a/macros.xml Sun Nov 12 16:43:28 2023 +0000 +++ b/macros.xml Sat Sep 14 19:57:36 2024 +0000 |
[ |
@@ -1,6 +1,7 @@ <macros> - <token name="@TOOL_VERSION@">0.10.3</token> + <token name="@TOOL_VERSION@">0.10.9</token> <token name="@VERSION_SUFFIX@">0</token> + <token name="@PROFILE@">21.09</token> <xml name="requirements"> <requirements> <requirement type="package" version="@TOOL_VERSION@">anndata</requirement> @@ -21,12 +22,6 @@ python '$script_file' ]]> </token> - <token name="@LOOMCMD@"><![CDATA[ -mkdir ./output && -mkdir ./attributes && -python '$__tool_directory__/loompy_to_tsv.py' -f '${hd5_format.input}' - ]]> - </token> <token name="@CMD_imports@"><![CDATA[ import anndata as ad ]]> @@ -76,4 +71,11 @@ </when> </conditional> </xml> + <xml name="sanitize_query" token_validinitial="string.printable"> + <sanitizer> + <valid initial="@VALIDINITIAL@"> + <remove value="'" /> + </valid> + </sanitizer> + </xml> </macros> |
b |
diff -r e1c3c2f2a834 -r cfaf5a405371 test-data/addloomout1.loom |
b |
Binary file test-data/addloomout1.loom has changed |
b |
diff -r e1c3c2f2a834 -r cfaf5a405371 test-data/addloomout3.loom |
b |
Binary file test-data/addloomout3.loom has changed |
b |
diff -r e1c3c2f2a834 -r cfaf5a405371 test-data/converted.loom.test |
b |
Binary file test-data/converted.loom.test has changed |
b |
diff -r e1c3c2f2a834 -r cfaf5a405371 test-data/export.krumsiek11.loom |
b |
Binary file test-data/export.krumsiek11.loom has changed |
b |
diff -r e1c3c2f2a834 -r cfaf5a405371 test-data/import.csv.h5ad |
b |
Binary file test-data/import.csv.h5ad has changed |
b |
diff -r e1c3c2f2a834 -r cfaf5a405371 test-data/import.loom.krumsiek11.h5ad |
b |
Binary file test-data/import.loom.krumsiek11.h5ad has changed |
b |
diff -r e1c3c2f2a834 -r cfaf5a405371 test-data/import.mtx.legacy_10x.h5ad |
b |
Binary file test-data/import.mtx.legacy_10x.h5ad has changed |
b |
diff -r e1c3c2f2a834 -r cfaf5a405371 test-data/import.mtx.no_10x.h5ad |
b |
Binary file test-data/import.mtx.no_10x.h5ad has changed |
b |
diff -r e1c3c2f2a834 -r cfaf5a405371 test-data/import.mtx.v3_10x.h5ad |
b |
Binary file test-data/import.mtx.v3_10x.h5ad has changed |
b |
diff -r e1c3c2f2a834 -r cfaf5a405371 test-data/import.tsv.h5ad |
b |
Binary file test-data/import.tsv.h5ad has changed |
b |
diff -r e1c3c2f2a834 -r cfaf5a405371 test-data/import.umi_tools.h5ad |
b |
Binary file test-data/import.umi_tools.h5ad has changed |
b |
diff -r e1c3c2f2a834 -r cfaf5a405371 test-data/krumsiek11.h5ad |
b |
Binary file test-data/krumsiek11.h5ad has changed |
b |
diff -r e1c3c2f2a834 -r cfaf5a405371 test-data/manipulate.add_annotation_obs.h5ad |
b |
Binary file test-data/manipulate.add_annotation_obs.h5ad has changed |
b |
diff -r e1c3c2f2a834 -r cfaf5a405371 test-data/manipulate.add_annotation_var.h5ad |
b |
Binary file test-data/manipulate.add_annotation_var.h5ad has changed |
b |
diff -r e1c3c2f2a834 -r cfaf5a405371 test-data/manipulate.concatenate.h5ad |
b |
Binary file test-data/manipulate.concatenate.h5ad has changed |
b |
diff -r e1c3c2f2a834 -r cfaf5a405371 test-data/manipulate.filter_obs_key.h5ad |
b |
Binary file test-data/manipulate.filter_obs_key.h5ad has changed |
b |
diff -r e1c3c2f2a834 -r cfaf5a405371 test-data/manipulate.filter_var_index.h5ad |
b |
Binary file test-data/manipulate.filter_var_index.h5ad has changed |
b |
diff -r e1c3c2f2a834 -r cfaf5a405371 test-data/manipulate.obs_names_make_unique.h5ad |
b |
Binary file test-data/manipulate.obs_names_make_unique.h5ad has changed |
b |
diff -r e1c3c2f2a834 -r cfaf5a405371 test-data/manipulate.rename_categories.h5ad |
b |
Binary file test-data/manipulate.rename_categories.h5ad has changed |
b |
diff -r e1c3c2f2a834 -r cfaf5a405371 test-data/manipulate.save_raw.h5ad |
b |
Binary file test-data/manipulate.save_raw.h5ad has changed |
b |
diff -r e1c3c2f2a834 -r cfaf5a405371 test-data/manipulate.strings_to_categoricals.h5ad |
b |
Binary file test-data/manipulate.strings_to_categoricals.h5ad has changed |
b |
diff -r e1c3c2f2a834 -r cfaf5a405371 test-data/manipulate.transpose.h5ad |
b |
Binary file test-data/manipulate.transpose.h5ad has changed |
b |
diff -r e1c3c2f2a834 -r cfaf5a405371 test-data/manipulate.var_names_make_unique.h5ad |
b |
Binary file test-data/manipulate.var_names_make_unique.h5ad has changed |
b |
diff -r e1c3c2f2a834 -r cfaf5a405371 test-data/pp.neighbors_umap_euclidean.recipe_weinreb17.paul15_subsample.h5ad |
b |
Binary file test-data/pp.neighbors_umap_euclidean.recipe_weinreb17.paul15_subsample.h5ad has changed |
b |
diff -r e1c3c2f2a834 -r cfaf5a405371 test-data/pp.pca.krumsiek11.h5ad |
b |
Binary file test-data/pp.pca.krumsiek11.h5ad has changed |
b |
diff -r e1c3c2f2a834 -r cfaf5a405371 test-data/tl.diffmap.h5ad |
b |
Binary file test-data/tl.diffmap.h5ad has changed |
b |
diff -r e1c3c2f2a834 -r cfaf5a405371 test-data/tl.draw_graph.h5ad |
b |
Binary file test-data/tl.draw_graph.h5ad has changed |
b |
diff -r e1c3c2f2a834 -r cfaf5a405371 test-data/tl.paga.neighbors_gauss_braycurtis.recipe_weinreb17.paul15_subsample.h5ad |
b |
Binary file test-data/tl.paga.neighbors_gauss_braycurtis.recipe_weinreb17.paul15_subsample.h5ad has changed |
b |
diff -r e1c3c2f2a834 -r cfaf5a405371 test-data/tl.rank_genes_groups.krumsiek11.h5ad |
b |
Binary file test-data/tl.rank_genes_groups.krumsiek11.h5ad has changed |
b |
diff -r e1c3c2f2a834 -r cfaf5a405371 test-data/tl.tsne.h5ad |
b |
Binary file test-data/tl.tsne.h5ad has changed |
b |
diff -r e1c3c2f2a834 -r cfaf5a405371 test-data/tl.umap.h5ad |
b |
Binary file test-data/tl.umap.h5ad has changed |