diff macros.xml @ 20:387671174a49 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:48:53 +0000
parents fc222791d03c
children
line wrap: on
line diff
--- a/macros.xml	Wed Dec 03 10:01:11 2025 +0000
+++ b/macros.xml	Thu Mar 26 12:48:53 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