Mercurial > repos > bgruening > bioimage_inference
diff bioimage_inference.xml @ 3:bc28236f407b draft
planemo upload for repository https://github.com/bgruening/galaxytools/tree/recommendation_training/tools/bioimaging commit e08711c242a340a1671dfca35f52d3724086e968
author | bgruening |
---|---|
date | Wed, 26 Feb 2025 10:27:28 +0000 |
parents | 0c0de5546fe1 |
children | 2b61d8fcfa52 |
line wrap: on
line diff
--- a/bioimage_inference.xml Tue Oct 15 12:57:33 2024 +0000 +++ b/bioimage_inference.xml Wed Feb 26 10:27:28 2025 +0000 @@ -2,7 +2,7 @@ <description>with PyTorch</description> <macros> <token name="@TOOL_VERSION@">2.4.1</token> - <token name="@VERSION_SUFFIX@">0</token> + <token name="@VERSION_SUFFIX@">1</token> </macros> <creator> <organization name="European Galaxy Team" url="https://galaxyproject.org/eu/" /> @@ -30,12 +30,18 @@ --imaging_model '$input_imaging_model' --image_file '$input_image_file' --image_size '$input_image_input_size' + --image_axes '$input_image_input_axes' ]]> </command> <inputs> <param name="input_imaging_model" type="data" format="zip" label="BioImage.IO model" help="Please upload a BioImage.IO model."/> <param name="input_image_file" type="data" format="tiff,png" label="Input image" help="Please provide an input image for the analysis."/> - <param name="input_image_input_size" type="text" label="Size of the input image" help="Provide the size of the input image. See the chosen model's RDF file to find the correct input size. For example: for the BioImage.IO model MitochondriaEMSegmentationBoundaryModel, the input size is 256 x 256 x 32 x 1. Enter the size as 256,256,32,1."/> + <param name="input_image_input_size" type="text" optional="false" label="Size of the input image" help="Provide the size of the input image. See the chosen model's RDF file to find the correct input size. For example: for the BioImage.IO model MitochondriaEMSegmentationBoundaryModel, the input size is 256 x 256 x 32 x 1. Enter the size as 256,256,32,1."/> + <param name="input_image_input_axes" type="select" label="Axes of the input image" optional="false" help="Provide the input axes of the input image. See the chosen model's RDF file to find the correct axes. For example: for the BioImage.IO model MitochondriaEMSegmentationBoundaryModel, the input axes is 'bczyx'"> + <option value="bczyx">bczyx</option> + <option value="bcyx">bcyx</option> + <option value="byxc">byxc</option> + </param> </inputs> <outputs> <data format="tif" name="output_predicted_image" from_work_dir="output_predicted_image.tif" label="Predicted image"></data> @@ -46,15 +52,97 @@ <param name="input_imaging_model" value="input_imaging_model.zip" location="https://zenodo.org/api/records/6647674/files/weights-torchscript.pt/content"/> <param name="input_image_file" value="input_image_file.tif" location="https://zenodo.org/api/records/6647674/files/sample_input_0.tif/content"/> <param name="input_image_input_size" value="256,256,1,1"/> - <output name="output_predicted_image" file="output_nucleisegboundarymodel.tif" compare="sim_size" delta="100" /> - <output name="output_predicted_image_matrix" file="output_nucleisegboundarymodel_matrix.npy" compare="sim_size" delta="100" /> + <param name="input_image_input_axes" value="bcyx"/> + <output name="output_predicted_image" ftype="tif"> + <assert_contents> + <has_size size="524846" delta="110" /> + </assert_contents> + </output> + <output name="output_predicted_image_matrix" ftype="npy"> + <assert_contents> + <has_size size="524416" delta="110" /> + </assert_contents> + </output> </test> <test> <param name="input_imaging_model" value="input_imaging_model.zip" location="https://zenodo.org/api/records/6647674/files/weights-torchscript.pt/content"/> <param name="input_image_file" value="input_nucleisegboundarymodel.png"/> <param name="input_image_input_size" value="256,256,1,1"/> - <output name="output_predicted_image" file="output_nucleisegboundarymodel.tif" compare="sim_size" delta="100" /> - <output name="output_predicted_image_matrix" file="output_nucleisegboundarymodel_matrix.npy" compare="sim_size" delta="100" /> + <param name="input_image_input_axes" value="bcyx"/> + <output name="output_predicted_image" ftype="tif"> + <assert_contents> + <has_size size="524846" delta="110" /> + </assert_contents> + </output> + <output name="output_predicted_image_matrix" ftype="npy"> + <assert_contents> + <has_size size="524416" delta="110" /> + </assert_contents> + </output> + </test> + <test> + <param name="input_imaging_model" value="input_imaging_model.zip" location="https://uk1s3.embassy.ebi.ac.uk/public-datasets/bioimage.io/emotional-cricket/1.1/files/torchscript_tracing.pt"/> + <param name="input_image_file" value="input_image_file.tif" location="https://uk1s3.embassy.ebi.ac.uk/public-datasets/bioimage.io/emotional-cricket/1.1/files/sample_input_0.tif"/> + <param name="input_image_input_size" value="128,128,100,1"/> + <param name="input_image_input_axes" value="bczyx"/> + <output name="output_predicted_image" ftype="tif"> + <assert_contents> + <has_size size="6572778" delta="100" /> + </assert_contents> + </output> + <output name="output_predicted_image_matrix" ftype="npy"> + <assert_contents> + <has_size size="6572778" delta="100" /> + </assert_contents> + </output> + </test> + <test> + <param name="input_imaging_model" value="input_imaging_model.zip" location="https://uk1s3.embassy.ebi.ac.uk/public-datasets/bioimage.io/emotional-cricket/1.1/files/torchscript_tracing.pt"/> + <param name="input_image_file" value="input_3d-unet-arabidopsis-apical-stem-cells.png" location="https://uk1s3.embassy.ebi.ac.uk/public-datasets/bioimage.io/emotional-cricket/1.1/files/raw.png"/> + <param name="input_image_input_size" value="128,128,100,1"/> + <param name="input_image_input_axes" value="bczyx"/> + <output name="output_predicted_image" ftype="tif"> + <assert_contents> + <has_size size="6572778" delta="100" /> + </assert_contents> + </output> + <output name="output_predicted_image_matrix" ftype="npy"> + <assert_contents> + <has_size size="6572778" delta="100" /> + </assert_contents> + </output> + </test> + <test> + <param name="input_imaging_model" value="input_imaging_model.zip" location="https://uk1s3.embassy.ebi.ac.uk/public-datasets/bioimage.io/organized-badger/1/files/weights-torchscript.pt"/> + <param name="input_image_file" value="input_platynereisemnucleisegmentationboundarymodel.tif" location="https://uk1s3.embassy.ebi.ac.uk/public-datasets/bioimage.io/organized-badger/1/files/sample_input_0.tif"/> + <param name="input_image_input_size" value="256,256,32,1"/> + <param name="input_image_input_axes" value="bczyx"/> + <output name="output_predicted_image" ftype="tif"> + <assert_contents> + <has_size size="16789714" delta="100" /> + </assert_contents> + </output> + <output name="output_predicted_image_matrix" ftype="npy"> + <assert_contents> + <has_size size="16777344" delta="100" /> + </assert_contents> + </output> + </test> + <test> + <param name="input_imaging_model" value="input_imaging_model.zip" location="https://uk1s3.embassy.ebi.ac.uk/public-datasets/bioimage.io/thoughtful-turtle/1/files/torchscript_tracing.pt"/> + <param name="input_image_file" value="input_3d-unet-lateral-root-primordia-cells.tif" location="https://uk1s3.embassy.ebi.ac.uk/public-datasets/bioimage.io/thoughtful-turtle/1/files/sample_input_0.tif"/> + <param name="input_image_input_size" value="128,128,100,1"/> + <param name="input_image_input_axes" value="bczyx"/> + <output name="output_predicted_image" ftype="tif"> + <assert_contents> + <has_size size="6572778" delta="100" /> + </assert_contents> + </output> + <output name="output_predicted_image_matrix" ftype="npy"> + <assert_contents> + <has_size size="6553728" delta="100" /> + </assert_contents> + </output> </test> </tests> <help> @@ -64,13 +152,14 @@ The tool takes a BioImage.IO model and an image (as TIF or PNG) to be analyzed. The analysis is performed by the model. The model is used to obtain a prediction of the result of the analysis, and the predicted image becomes available as a TIF file in the Galaxy history. **Input files** - - BioImage.IO model: Add one of the model from Galaxy file uploader by choosing a "remote" file at "ML Models/bioimaging-models" - - Image to be analyzed: Provide an image as TIF/PNG file - - Provide the necessary input size for the model. This information can be found in the RDF file of each model (RDF file > config > test_information > inputs > size) + - BioImage.IO model: Add one of the model from Galaxy file uploader by choosing a "remote" file at "ML Models/bioimaging-models" + - Image to be analyzed: Provide an image as TIF/PNG file + - Provide the necessary input size for the model. This information can be found in the RDF file of each model (RDF file > config > test_information > inputs > size) + - Provide axes of input image. This information can also be found in the RDF file of each model (RDF file > inputs > axes). An example value of axes is 'bczyx' for 3D U-Net Arabidopsis Lateral Root Primordia model **Output files** - - Predicted image: Predicted image using the BioImage.IO model - - Predicted image matrix: Predicted image matrix in original dimensions + - Predicted image: Predicted image using the BioImage.IO model + - Predicted image matrix: Predicted image matrix in original dimensions ]]> </help> <citations>