changeset 20:1b4e9fef308f 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:47:31 +0000
parents 8b8dbfaf27da
children
files inspect.xml macros.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, 57 insertions(+), 26 deletions(-) [+]
line wrap: on
line diff
--- a/inspect.xml	Wed Dec 03 09:59:20 2025 +0000
+++ b/inspect.xml	Thu Mar 26 12:47:31 2026 +0000
@@ -45,7 +45,8 @@
     </macros>
     <expand macro="bio_tools"/>
     <expand macro="requirements">
-        <requirement type="package" version="1.5.1">scikit-learn</requirement>
+        <requirement type="package" version="2.3.3">pandas</requirement>
+        <requirement type="package" version="1.7.0">scikit-learn</requirement>
     </expand>
     <expand macro="version_command"/>
     <command detect_errors="exit_code"><![CDATA[
@@ -93,9 +94,7 @@
         #set $percent_top = [int(x.strip()) for x in str($method.percent_top).split(',')]
     percent_top=$percent_top,
     #end if
-    #if str($method.layer) != '':
-    layer='$method.layer',
-    #end if
+    @CMD_PARAM_LAYER@
     use_raw=$method.use_raw,
     log1p=$method.log1p,
     inplace=True)
@@ -130,6 +129,7 @@
     gene_pool=$gene_pool,
     #end if
     score_name='$method.score_name',
+    @CMD_PARAM_LAYER@
     @CMD_PARAMS_SCORE_GENES@)
 
 #else if str($method.method) == 'tl.score_genes_cell_cycle':
@@ -159,6 +159,7 @@
     #else if str($method.g2m_genes.format) == 'file':
     g2m_genes=g2m_genes,
     #end if
+    @CMD_PARAM_LAYER@
     @CMD_PARAMS_SCORE_GENES@)
 
 #else if str($method.method) == 'tl.rank_genes_groups':
@@ -172,9 +173,7 @@
     #set $group=[x.strip() for x in str($method.groups).split(',')]
     groups=$group,
     #end if
-    #if str($method.layer) != '':
-    layer='$method.layer',
-    #end if
+    @CMD_PARAM_LAYER@
     #if str($method.ref.rest) == 'rest':
     reference='$method.ref.rest',
     #else
@@ -304,9 +303,7 @@
     #if str($method.base) != '':
     base=$method.base,
     #end if
-    #if str($method.layer) != '':
-    layer='$method.layer',
-    #end if
+    @CMD_PARAM_LAYER@
     #if str($method.obsm) != '':
     obsm='$method.obsm',
     #end if
@@ -319,9 +316,7 @@
     #if str($method.max_value) != '':
     max_value=$method.max_value,
     #end if
-    #if str($method.layer) != '':
-    layer='$method.layer',
-    #end if
+    @CMD_PARAM_LAYER@
     #if str($method.obsm) != '':
     obsm='$method.obsm',
     #end if
@@ -403,6 +398,7 @@
                 <param argument="score_name" type="text" value="score" label="Name of the field to be added in '.obs'">
                     <expand macro="sanitize_query"/>
                 </param>
+                <expand macro="param_layer" label="Key from adata.layers whose value will be used to perform tests on"/>
                 <expand macro="params_score_genes"/>
             </when>
             <when value="tl.score_genes_cell_cycle">
@@ -434,6 +430,7 @@
                         <param name="file" type="data" format="txt" label="File with the list of genes associated with G2M phase" help="One gene per line"/>
                     </when>
                 </conditional>
+                <expand macro="param_layer" label="Key from adata.layers whose value will be used to perform tests on"/>
                 <expand macro="params_score_genes"/>
             </when>
             <when value="tl.rank_genes_groups">
@@ -1128,7 +1125,7 @@
             <output name="ranked_gene" ftype="tabular">
                 <assert_contents>
                     <has_line_matching expression="group\tnames\tscores\tlogfoldchanges\tpvals\tpvals_adj"/>
-                    <has_line_matching expression="Ery\tEKLF\t39.086777\t4.8413053\t1.7995717323073084e-66\t1.979528905538039e-65"/>
+                    <has_line_matching expression="Ery\tEKLF\t39.086777\t4.8413053\t1.7995717[0-9]+e-66\t1.979528[0-9]+e-65"/>
                 </assert_contents>
             </output>
         </test>
@@ -1237,7 +1234,7 @@
             <output name="ranked_gene" ftype="tabular">
                 <assert_contents>
                     <has_line_matching expression="group\tnames\tscores\tlogfoldchanges\tpvals\tpvals_adj"/>
-                    <has_line_matching expression="Ery\tFog1\t21.071571\t2.8023682\t5.701001345880348e-35\t3.135550740234191e-34"/>
+                    <has_line_matching expression="Ery\tFog1\t21.071571\t2.8023682\t5.7010013[0-9]+e-35\t3.1355507[0-9]+e-34"/>
                 </assert_contents>
             </output>
         </test>
--- a/macros.xml	Wed Dec 03 09:59:20 2025 +0000
+++ b/macros.xml	Thu Mar 26 12:47:31 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
Binary file test-data/pl.heatmap.krumsiek11.png has changed
Binary file test-data/pl.rank_genes_groups_heatmap.rank_genes_groups.krumsiek11.png has changed
Binary file test-data/pl.rank_genes_groups_stacked_violin.rank_genes_groups.krumsiek11.png has changed
Binary file test-data/pl.scatter.krumsiek11.png has changed
Binary file test-data/pl.scatter.pbmc68k_reduced.png has changed
Binary file test-data/pl.scatter.pbmc68k_reduced_n_genes_n_counts.png has changed
Binary file test-data/pl.scatter.umap.pbmc68k_reduced.png has changed
Binary file test-data/pl.stacked_violin.krumsiek11.png has changed
Binary file test-data/pl.stacked_violin_pp.filter_genes_dispersion.krumsiek11-seurat.png has changed