Mercurial > repos > imgteam > imagej2_bunwarpj_align
diff imagej2_bunwarpj_align.xml @ 3:711adedc5bb8 draft default tip
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/image_processing/imagej2 commit 8f49f3c66b5a1de99ec15e65c2519a56792f1d56
author | imgteam |
---|---|
date | Wed, 25 Sep 2024 15:56:56 +0000 |
parents | 0a0d2dfd17e0 |
children |
line wrap: on
line diff
--- a/imagej2_bunwarpj_align.xml Sun Nov 05 10:51:33 2023 +0000 +++ b/imagej2_bunwarpj_align.xml Wed Sep 25 15:56:56 2024 +0000 @@ -1,4 +1,4 @@ -<tool id="imagej2_bunwarpj_align" name="Align two images" version="@WRAPPER_VERSION@.1"> +<tool id="imagej2_bunwarpj_align" name="Align two images" version="@TOOL_VERSION@+galaxy@VERSION_SUFFIX@" profile="23.0"> <description>with ImageJ2</description> <macros> <import>imagej2_macros.xml</import> @@ -20,10 +20,10 @@ #set source_out_suffix = '.' + str($source_out_datatype) #set target_out_suffix = '.' + str($target_out_datatype) #set source_image_sans_ext = $os.path.splitext($os.path.basename($source_image.file_name))[0] -#set source_image_with_ext = '.'.join([$source_image_sans_ext, $source_image.ext]) +#set source_image_with_ext = './' + '.'.join([$source_image_sans_ext, $source_image.ext]) ln -s '$source_image.file_name' '$source_image_with_ext'; #set target_image_sans_ext = $os.path.splitext($os.path.basename($target_image.file_name))[0] -#set target_image_with_ext = '.'.join([$target_image_sans_ext, $target_image.ext]) +#set target_image_with_ext = './' + '.'.join([$target_image_sans_ext, $target_image.ext]) ln -s '$target_image.file_name' '$target_image_with_ext'; #set save_transformation = str($advanced_options_cond.advanced_options) == 'save_transformation' @@ -33,11 +33,11 @@ #if str($align_with_mask_cond.align_with_mask) == 'yes': #set source_mask_sans_ext = $os.path.splitext($os.path.basename($align_with_mask_cond.source_mask.file_name))[0] - #set source_mask_with_ext = '.'.join([$source_mask_sans_ext, $source_mask.ext]) + #set source_mask_with_ext = './' + '.'.join([$source_mask_sans_ext, $source_mask.ext]) #set source_mask = $source_mask_with_ext ln -s '$align_with_mask_cond.source_mask.file_name' '$source_mask_with_ext'; #set target_mask_sans_ext = $os.path.splitext($os.path.basename($align_with_mask_cond.target_mask.file_name))[0] - #set target_mask_with_ext = '.'.join([$target_mask_sans_ext, $target_mask.ext]) + #set target_mask_with_ext = './' + '.'.join([$target_mask_sans_ext, $target_mask.ext]) #set target_mask = $target_mask_with_ext ln -s '$align_with_mask_cond.target_mask.file_name' '$target_mask_with_ext'; #else: @@ -65,7 +65,8 @@ touch '$tmp_source_out_transf_name'; ## Align the two images using bUnwarpJ. -bunwarpj -align +## The option -XX:ActiveProcessorCount="1" was set in version 20231211 to ensure reproducibility +bunwarpj -XX:ActiveProcessorCount="1" -align '$target_image_with_ext' '$target_mask' '$source_image_with_ext' @@ -97,14 +98,10 @@ #if $save_transformation: '-save_transformation' #end if -&>'$error_log'; #if $save_transformation: - mv '$tmp_source_out_transf_name' '$source_trans_out'; - mv '$tmp_target_out_transf_name' '$target_trans_out'; + && mv '$tmp_source_out_transf_name' '$source_trans_out' + && mv '$tmp_target_out_transf_name' '$target_trans_out'; #end if -if [[ $? -ne 0 ]]; then - cat '$error_log' >&2; -fi ]]></command> <inputs> <expand macro="param_target_image"/> @@ -207,32 +204,32 @@ </data> </outputs> <tests> - <test> + <test expect_num_outputs="2"> <!-- Align two images without landmarks or mask and not saving transformation matrices --> <expand macro="test_target_source_images"/> <param name="max_subsamp_fact" value="1"/> - <output name="source_out" file="registered_source1.png" compare="sim_size"/> - <output name="target_out" file="registered_target1.png" compare="sim_size"/> + <output name="source_out" file="registered_source1_forced1cpu.png" compare="image_diff"/> + <output name="target_out" file="registered_target1_forced1cpu.png" compare="image_diff"/> </test> - <test> + <test expect_num_outputs="4"> <!-- Align two images without landmarks or mask, but saving transformation matrices --> <expand macro="test_target_source_images"/> <param name="max_subsamp_fact" value="1"/> <param name="advanced_options" value="save_transformation"/> - <output name="source_out" file="registered_source1.png" compare="sim_size"/> - <output name="target_out" file="registered_target1.png" compare="sim_size"/> + <output name="source_out" file="registered_source1_forced1cpu.png" compare="image_diff"/> + <output name="target_out" file="registered_target1_forced1cpu.png" compare="image_diff"/> <output name="source_trans_out" file="source_elastic_transformation_out.txt" compare="contains"/> <output name="target_trans_out" file="target_elastic_transformation_out.txt" compare="contains"/> </test> - <test> + <test expect_num_outputs="2"> <!-- Align two images without landmarks but with mask, not saving transformation matrices --> <expand macro="test_target_source_images"/> <param name="align_with_mask" value="yes"/> <param name="target_mask" value="mask_white.png"/> <param name="source_mask" value="mask_ramp.gif"/> <param name="max_subsamp_fact" value="1"/> - <output name="source_out" file="registered_source2.png" compare="sim_size"/> - <output name="target_out" file="registered_target2.png" compare="sim_size"/> + <output name="source_out" file="registered_source2_forced1cpu.png" compare="image_diff"/> + <output name="target_out" file="registered_target2_forced1cpu.png" compare="image_diff"/> </test> </tests> <help>