Mercurial > repos > iuc > scanpy_normalize
changeset 23:2b6498d4c8c6 draft default tip
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/main/tools/scanpy commit 732303de9670376c88e7afb2f23336ee1433e97d
| author | iuc |
|---|---|
| date | Thu, 26 Mar 2026 12:50:57 +0000 |
| parents | e639abb0de92 |
| children | |
| files | macros.xml normalize.xml test-data/pl.heatmap.krumsiek11.png test-data/pl.rank_genes_groups_heatmap.rank_genes_groups.krumsiek11.png test-data/pl.rank_genes_groups_stacked_violin.rank_genes_groups.krumsiek11.png test-data/pl.scatter.krumsiek11.png test-data/pl.scatter.pbmc68k_reduced.png test-data/pl.scatter.pbmc68k_reduced_n_genes_n_counts.png test-data/pl.scatter.umap.pbmc68k_reduced.png test-data/pl.stacked_violin.krumsiek11.png test-data/pl.stacked_violin_pp.filter_genes_dispersion.krumsiek11-seurat.png |
| diffstat | 11 files changed, 48 insertions(+), 17 deletions(-) [+] |
line wrap: on
line diff
--- a/macros.xml Wed Dec 03 10:04:10 2025 +0000 +++ b/macros.xml Thu Mar 26 12:50:57 2026 +0000 @@ -1,16 +1,12 @@ <macros> - <token name="@TOOL_VERSION@">1.10.2</token> - <token name="@VERSION_SUFFIX@">3</token> + <token name="@TOOL_VERSION@">1.11.5</token> + <token name="@VERSION_SUFFIX@">0</token> <token name="@PROFILE@">21.09</token> <xml name="requirements"> <requirements> <requirement type="package" version="@TOOL_VERSION@">scanpy</requirement> - <requirement type="package" version="0.10.3">anndata</requirement> - <requirement type="package" version="1.26.4">numpy</requirement> - <requirement type="package" version="2.2.2">pandas</requirement> - <requirement type="package" version="1.14.1">scipy</requirement> - <requirement type="package" version="0.14.2">statsmodels</requirement> - <requirement type="package" version="0.3.5">fa2</requirement> + <requirement type="package" version="0.11.4">anndata</requirement> + <requirement type="package" version="0.4">fa2_modified</requirement> <yield /> </requirements> </xml> @@ -27,11 +23,11 @@ <xml name="citations"> <citations> <citation type="doi">10.1186/s13059-017-1382-0</citation> + <citation type="doi">10.1016/j.xgen.2025.101005</citation> <citation type="doi">10.1093/gigascience/giaa102</citation> </citations> </xml> - <!-- param macros --> <xml name="sanitize_query" token_validinitial="string.printable"> <sanitizer> @@ -566,7 +562,6 @@ cp '$adata' 'anndata.h5ad' && cat '$script_file' > '$hidden_output' && python '$script_file' >> '$hidden_output' && -ls . >> '$hidden_output' && touch 'anndata_info.txt' && cat 'anndata_info.txt' @CMD_PRETTIFY_STDOUT@ ]]> @@ -1451,7 +1446,46 @@ ]]> </token> + <xml name="param_interactive_plot"> + <param name="interactive_plot" type="boolean" checked="false" label="Make an interactive plot?" help="Creates a vitessce configuration file using easy_vitessce for interactive visualization"/> + </xml> + <token name="@VITESSCE_ACTIVATE@"><![CDATA[ +import easy_vitessce as ev +ev.configure_plots(enable_plots=["pca", "umap", "tsne", "diffmap", "violin", "embedding", "dotplot", "heatmap"]) +ev.config.update({"data": {"anndata_format": "h5ad"}}) +ev.config.update({"data": {"out_dir": "."}}) +ev.register_data_path(adata, 'anndata.h5ad') + ]]> + </token> + <token name="@VITESSCE_CONFIG@"><![CDATA[ +import json +## while testing locally check galaxy_infrastructure_url is whether http://localhost:8080 or http://127.0.0.1:8080 +## use the correct URL to access datasets via Galaxy API +galaxy_url = "${__app__.config.galaxy_infrastructure_url}" +anndata_out_id = "${__app__.security.encode_id($anndata_out.id)}" +anndata_config_id = "${__app__.security.encode_id($anndata_config.id)}" + +## vitessce_widget is returned from sc.pl when the interactive_plot parameter is set to True +config_dict = vitessce_widget.config.to_dict(base_url="") +for dataset in config_dict.get('datasets', []): + for file in dataset.get('files', []): + if 'url' in file: + file['url'] = f"{galaxy_url}/api/datasets/{anndata_out_id}/display" + if 'options' in file and 'refSpecUrl' in file['options']: + file['options']['refSpecUrl'] = f"{galaxy_url}/api/datasets/{anndata_config_id}/display" + +config_js_content = f""" +export const config = {json.dumps(config_dict, indent=2)}; +""" + +with open("config.js", "w") as f: + f.write(config_js_content) + +with open("config.json", "w") as f: + json.dump(config_dict, f, indent=2) +]]> + </token> <!-- unused macros --> <!-- <xml name="param_right_margin"> <param argument="right_margin" type="float" value="1" label="Width of the space right of each plotting panel"/> @@ -1459,4 +1493,4 @@ <xml name="param_left_margin"> <param argument="left_margin" type="float" value="1" label="Width of the space left of each plotting panel"/> </xml> --> -</macros> +</macros> \ No newline at end of file
--- a/normalize.xml Wed Dec 03 10:04:10 2025 +0000 +++ b/normalize.xml Thu Mar 26 12:50:57 2026 +0000 @@ -5,6 +5,7 @@ </macros> <expand macro="bio_tools"/> <expand macro="requirements"> + <requirement type="package" version="2.0.3">pandas</requirement> <requirement type="package" version="3.0.0">magic-impute</requirement> </expand> <expand macro="version_command"/> @@ -29,9 +30,7 @@ #if str($method.key_added) != '': key_added='$method.key_added', #end if - #if str($method.layer) != '': - layer='$method.layer', - #end if + @CMD_PARAM_LAYER@ inplace=True) #else if str($method.method) == 'pp.recipe_zheng17': @@ -124,9 +123,7 @@ <param argument="key_added" type="text" value="" optional="true" label="Name of the field in 'adata.obs' where the normalization factor is stored"> <expand macro="sanitize_query"/> </param> - <param argument="layer" type="text" value="" label="Layer to normalize instead of X. If not provided, X is normalized."> - <expand macro="sanitize_query"/> - </param> + <expand macro="param_layer" label="Layer to normalize instead of X. If not provided, X is normalized."/> </when> <when value="pp.recipe_zheng17"> <param argument="n_top_genes" type="integer" min="0" value="1000" label="Number of genes to keep"/>
