diff bf2raw.xml @ 1:21fedce225f6 draft

planemo upload for repository https://github.com/BMCV/galaxy-image-analysis/tree/master/tools/bioformats2raw commit 86cf7f811cdfe5ffcc578603f51900c263e7ecd5
author imgteam
date Mon, 19 Jan 2026 19:42:11 +0000
parents 31fee86b0b75
children 51d1460d03e6
line wrap: on
line diff
--- a/bf2raw.xml	Wed Dec 17 11:22:22 2025 +0000
+++ b/bf2raw.xml	Mon Jan 19 19:42:11 2026 +0000
@@ -1,33 +1,34 @@
-<tool id="bf2raw" name="Convert to OME-Zarr" version="@TOOL_VERSION@+galaxy@VERSION_SUFFIX@">
-    <description>with Bioformats</description>
+<tool id="bf2raw" name="Convert to OME-Zarr" version="@TOOL_VERSION@+galaxy@VERSION_SUFFIX@" profile="24.0">
+    <description>with Bio-Formats</description>
     <macros>
         <import>creators.xml</import>
         <token name="@TOOL_VERSION@">0.7.0</token>
-        <token name="@VERSION_SUFFIX@">3</token>
+        <token name="@VERSION_SUFFIX@">4</token>
     </macros>
     <creator>
         <expand macro="creators/bugraoezdemir"/>
+        <expand macro="creators/bmcv"/>
+        <expand macro="creators/kostrykin"/>
     </creator>
     <edam_operations>
         <edam_operation>operation_3443</edam_operation>
     </edam_operations>
+    <xrefs>
+        <xref type="bio.tools">bio-formats</xref>
+        <xref type="biii">bio-formats</xref>
+    </xrefs>
     <requirements>
         <container type="docker">quay.io/biocontainers/mulled-v2-ea5a9ffc5f22f92a78f0cd24aac43eb503c0e523:4c010c399f61cde74da64343581999ada3e11e24-0</container>
     </requirements>
     <command><![CDATA[
-if [ ! -d $output.files_path ];then
+
+if [ ! -d $output.files_path ]; then
     mkdir -p $output.files_path;
 fi;
 
-#if str($io_options.input.ext)=='html':
-    #set dirlist=os.listdir($io_options.input.files_path)
-    #assert len($dirlist) > 0
-    #set input_path=os.path.join(str($io_options.input.files_path), str($dirlist[0]))
-#else:
-    #set input_path=$io_options.input
-#end if
+ln -s ${io_options.input} ./input;
 
-export _JAVA_OPTIONS="-Djava.io.tmpdir=/usr/local/man/" && bioformats2raw $input_path $output.files_path/$io_options.output_name
+export _JAVA_OPTIONS="-Djava.io.tmpdir=/usr/local/man/" && bioformats2raw ./input $output.files_path
 #if $bf2raw_params.multiscales['options'] == 'auto':
     --target-min-size $bf2raw_params.multiscales.min_xy_size
 #elif $bf2raw_params.multiscales['options'] == 'manual':
@@ -47,11 +48,21 @@
 #end if
 --overwrite &> /dev/null;
 
+#if str($io_options.subgroup) != ''
+    mv ${output.files_path}/${io_options.subgroup} ./subdir;
+    mv ${output.files_path}/OME ./subdir/OME;
+    rm -rf ${output.files_path};
+    mv ./subdir ${output.files_path};
+#end if
+
     ]]></command>
     <inputs>
-        <section name="io_options" title="Input-output paths" expanded="true">
-            <param name="input" type="data" format="scn,ndpi,tf8,vms,xml,pcx,binary,hdr,mov,psd,pbm,nrrd,tiff,pgm,ppm,txt,tf2,zip,top,gif,wav,btf,bmp,png,gz,cif,fli,btf,jpg,avi,html,sif,csv,ome.tiff,par,fits,jp2,eps,nhdr,svs,mrc" label="Input image located in Galaxy history"/>
-            <param name="output_name" type="text" value="output.ome.zarr" label="Name of the generated OME-Zarr"/>
+        <section name="io_options" title="Input/Output" expanded="true">
+            <param name="input" type="data"
+                   format="scn,ndpi,tf8,vms,xml,pcx,binary,hdr,mov,psd,pbm,nrrd,tiff,pgm,ppm,txt,tf2,zip,top,gif,wav,btf,bmp,png,gz,cif,fli,btf,jpg,avi,html,sif,csv,ome.tiff,par,fits,jp2,eps,nhdr,svs,mrc"
+                   label="Input image"/>
+            <param name="subgroup" type="text" value="" optional="true" label="Select a subgroup"
+                   help='Only export a subgroup of the Zarr dataset (e.g., use "&lt;tt&gt;0&lt;/tt&gt;" to only export the &lt;tt&gt;/0&lt;/tt&gt; subgroup of the Zarr). Leave empty to export the full Zarr.'/>
         </section>
         <section name="bf2raw_params" title="Parameters fed to file conversion module">
             <conditional name="multiscales" >
@@ -97,34 +108,48 @@
         </section>
     </inputs>
     <outputs>
-        <data name="output" format="html" label="OME-Zarr Output" />
+        <data name="output" format="zarr"/>
     </outputs>
     <tests>
         <test expect_num_outputs="1">
             <section name="io_options">
-                <param name="input" value="xyz_8bit__mitotic_plate_calibrated.tif"/>
-                <param name="output_name" value="xyz_8bit__mitotic_plate_calibrated.ome.zarr" />
+                <param name="input" value="xyz_8bit__mitotic_plate_calibrated.tiff"/>
             </section>
-            <output name="output" ftype="html">
-                <extra_files type="file" name="xyz_8bit__mitotic_plate_calibrated.ome.zarr/.zattrs" value="xyz_8bit__mitotic_plate_calibrated.ome.zarr/.zattrs" />
+            <output name="output" ftype="zarr">
+                <extra_files type="file" name=".zattrs" value="xyz_8bit__mitotic_plate_calibrated.ome.zarr/.zattrs"/>
+                <extra_files type="file" name=".zgroup" value="xyz_8bit__mitotic_plate_calibrated.ome.zarr/.zgroup"/>
+                <extra_files type="file" name="OME/METADATA.ome.xml" value="xyz_8bit__mitotic_plate_calibrated.ome.zarr/OME/METADATA.ome.xml"/>
             </output>
         </test>
         <test expect_num_outputs="1">
             <section name="io_options">
                 <param name="input" value="coins.png"/>
-                <param name="output_name" value="coins.ome.zarr" />
             </section>
-            <output name="output" ftype="html">
-                <extra_files type="file" name="coins.ome.zarr/.zgroup" value="coins.ome.zarr/.zgroup" />
+            <output name="output" ftype="zarr">
+                <extra_files type="file" name=".zattrs" value="coins.ome.zarr/.zattrs"/>
+                <extra_files type="file" name=".zgroup" value="coins.ome.zarr/.zgroup"/>
+                <extra_files type="file" name="OME/METADATA.ome.xml" value="coins.ome.zarr/OME/METADATA.ome.xml"/>
             </output>
         </test>
         <test expect_num_outputs="1">
             <section name="io_options">
                 <param name="input" value="camera.jpg"/>
-                <param name="output_name" value="camera.ome.zarr" />
             </section>
-            <output name="output" ftype="html">
-                <extra_files type="file" name="camera.ome.zarr/.zattrs" value="camera.ome.zarr/.zattrs" />
+            <output name="output" ftype="zarr">
+                <extra_files type="file" name=".zattrs" value="camera.ome.zarr/.zattrs"/>
+                <extra_files type="file" name=".zgroup" value="camera.ome.zarr/.zgroup"/>
+                <extra_files type="file" name="OME/METADATA.ome.xml" value="camera.ome.zarr/OME/METADATA.ome.xml"/>
+            </output>
+        </test>
+        <test expect_num_outputs="1">
+            <section name="io_options">
+                <param name="input" value="coins.png"/>
+                <param name="subgroup" value="0"/>
+            </section>
+            <output name="output" ftype="zarr">
+                <extra_files type="file" name=".zattrs" value="coins.ome.zarr/0/.zattrs"/>
+                <extra_files type="file" name=".zgroup" value="coins.ome.zarr/0/.zgroup"/>
+                <extra_files type="file" name="OME/METADATA.ome.xml" value="coins.ome.zarr/OME/METADATA.ome.xml"/>
             </output>
         </test>
     </tests>
@@ -132,7 +157,7 @@
 
         **Converts images to OME-Zarr.**
 
-        Bioformats-based tool that converts a wide range of image file formats to the cloud-optimised format
+        Tool based on Bio-Formats that converts a wide range of image file formats to the cloud-optimised format
         OME-Zarr following the `OME-NGFF`_ specification.
 
         .. _OME-NGFF: https://ngff.openmicroscopy.org/latest