Previous changeset 5:ec32793ce1dd (2020-02-10) Next changeset 7:a407e7f8bdc1 (2020-05-20) |
Commit message:
"planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/scanpy/ commit 5a90fd345b43ca12366f4475f4cfd88ef197e452" |
modified:
macros.xml normalize.xml |
b |
diff -r ec32793ce1dd -r 3bcd5445cd7a macros.xml --- a/macros.xml Mon Feb 10 05:28:35 2020 -0500 +++ b/macros.xml Thu Feb 20 08:24:54 2020 -0500 |
[ |
@@ -21,12 +21,17 @@ </xml> <token name="@CMD@"><![CDATA[ cp '$adata' 'anndata.h5ad' && -cat '$script_file' && -python '$script_file' && -ls . +cat '$script_file' > '$hidden_output' && +python '$script_file' >> '$hidden_output' && +ls . >> '$hidden_output' && +touch 'anndata_info.txt' && +cat 'anndata_info.txt' @CMD_prettify_stdout@ ]]> </token> <token name="@CMD_imports@"><![CDATA[ +import sys +sys.stderr = open('$hidden_output', 'a') + import scanpy as sc import pandas as pd import numpy as np @@ -39,13 +44,25 @@ adata = sc.read('anndata.h5ad') ]]> </token> + <xml name="inputs_common_advanced"> + <section name="advanced_common" title="Advanced Options" expanded="false"> + <param name="show_log" type="boolean" checked="false" label="Output Log?" /> + </section> + </xml> <xml name="anndata_outputs"> <data name="anndata_out" format="h5ad" from_work_dir="anndata.h5ad" label="${tool.name} (${method.method}) on ${on_string}: Annotated data matrix"/> + <data name="hidden_output" format="txt" label="Log file" > + <filter>advanced_common['show_log']</filter> + </data> </xml> <token name="@CMD_anndata_write_outputs@"><![CDATA[ adata.write('anndata.h5ad') +with open('anndata_info.txt','w', encoding='utf-8') as ainfo: + print(adata, file=ainfo) ]]> </token> + <token name="@CMD_prettify_stdout@"><![CDATA[ | sed -r '1 s|AnnData object with (.+) = (.*)\s*|\1: \2|g' | sed "s|'||g" | sed -r 's|^\s*(.*):\s(.*)|[\1]\n- \2|g' | sed 's|, |\n- |g' + ]]></token> <xml name="svd_solver"> <param name="svd_solver" type="select" label="SVD solver to use" help=""> <option value="auto">Automatically chosen depending on the size of the problem</option> |
b |
diff -r ec32793ce1dd -r 3bcd5445cd7a normalize.xml --- a/normalize.xml Mon Feb 10 05:28:35 2020 -0500 +++ b/normalize.xml Thu Feb 20 08:24:54 2020 -0500 |
[ |
@@ -115,13 +115,14 @@ <expand macro="param_log"/> </when> </conditional> + <expand macro="inputs_common_advanced"/> </inputs> <outputs> <expand macro="anndata_outputs"/> </outputs> <tests> <test> - <!-- test 1 --> + <!-- test 0 --> <param name="adata" value="krumsiek11.h5ad" /> <conditional name="method"> <param name="method" value="pp.normalize_total"/> @@ -132,31 +133,41 @@ <param name="layers" value="all"/> <param name="layer_norm" value="None"/> </conditional> - <assert_stdout> - <has_text_matching expression="sc.pp.normalize_total"/> - <has_text_matching expression="exclude_highly_expressed=False"/> - <has_text_matching expression="key_added='n_counts'"/> - <has_text_matching expression="layers='all'"/> - </assert_stdout> + <section name="advanced_common"> + <param name="show_log" value="true" /> + </section> + <output name="hidden_output"> + <assert_contents> + <has_text_matching expression="sc.pp.normalize_total"/> + <has_text_matching expression="exclude_highly_expressed=False"/> + <has_text_matching expression="key_added='n_counts'"/> + <has_text_matching expression="layers='all'"/> + </assert_contents> + </output> <output name="anndata_out" file="pp.normalize_total.krumsiek11.h5ad" ftype="h5ad" compare="sim_size"/> </test> <test> - <!-- test 2 --> + <!-- test 1 --> <param name="adata" value="random-randint.h5ad"/> <conditional name="method"> <param name="method" value="pp.recipe_zheng17"/> <param name="n_top_genes" value="1000"/> <param name="log" value="True"/> </conditional> - <assert_stdout> - <has_text_matching expression="sc.pp.recipe_zheng17"/> - <has_text_matching expression="n_top_genes=1000"/> - <has_text_matching expression="log=True"/> - </assert_stdout> + <section name="advanced_common"> + <param name="show_log" value="true" /> + </section> + <output name="hidden_output"> + <assert_contents> + <has_text_matching expression="sc.pp.recipe_zheng17"/> + <has_text_matching expression="n_top_genes=1000"/> + <has_text_matching expression="log=True"/> + </assert_contents> + </output> <output name="anndata_out" file="pp.recipe_zheng17.random-randint.h5ad" ftype="h5ad" compare="sim_size"/> </test> <test> - <!-- test 3 --> + <!-- test 2 --> <param name="adata" value="paul15_subsample.h5ad" /> <conditional name="method"> <param name="method" value="pp.recipe_weinreb17"/> @@ -167,31 +178,40 @@ <param name="svd_solver" value="randomized"/> <param name="random_state" value="0"/> </conditional> - <assert_stdout> - <has_text_matching expression="sc.pp.recipe_weinreb17"/> - <has_text_matching expression="log=True"/> - <has_text_matching expression="mean_threshold=0.01"/> - <has_text_matching expression="cv_threshold=2.0"/> - <has_text_matching expression="n_pcs=50"/> - <has_text_matching expression="svd_solver='randomized'"/> - <has_text_matching expression="random_state=0"/> - </assert_stdout> + <section name="advanced_common"> + <param name="show_log" value="true" /> + </section> + <output name="hidden_output"> + <assert_contents> + <has_text_matching expression="sc.pp.recipe_weinreb17"/> + <has_text_matching expression="log=True"/> + <has_text_matching expression="mean_threshold=0.01"/> + <has_text_matching expression="cv_threshold=2.0"/> + <has_text_matching expression="n_pcs=50"/> + <has_text_matching expression="svd_solver='randomized'"/> + <has_text_matching expression="random_state=0"/> + </assert_contents> + </output> <output name="anndata_out" file="pp.recipe_weinreb17.paul15_subsample.updated.h5ad" ftype="h5ad" compare="sim_size"/> </test> <test> - <!-- test 4 --> + <!-- test 3 --> <param name="adata" value="pp.recipe_zheng17.random-randint.h5ad" /> <conditional name="method"> <param name="method" value="pp.recipe_seurat"/> <param name="log" value="True"/> </conditional> - <assert_stdout> - <has_text_matching expression="sc.pp.recipe_seurat"/> - <has_text_matching expression="log=True"/> - </assert_stdout> + <section name="advanced_common"> + <param name="show_log" value="true" /> + </section> + <output name="hidden_output"> + <assert_contents> + <has_text_matching expression="sc.pp.recipe_seurat"/> + <has_text_matching expression="log=True"/> + </assert_contents> + </output> <output name="anndata_out" file="pp.recipe_seurat.recipe_zheng17.h5ad" ftype="h5ad" compare="sim_size"/> </test> - </tests> <help><![CDATA[ Normalize total counts per cell (`pp.normalize_per_cell`) |