Mercurial > repos > goeckslab > vitessce_spatial
comparison main_macros.xml @ 4:068da7f7cd83 draft
planemo upload for repository https://github.com/goeckslab/tools-mti/tree/main/tools/vitessce commit bc4c0bb6784a55399241f99a29b176541a164a18
| author | goeckslab |
|---|---|
| date | Thu, 20 Feb 2025 19:47:16 +0000 |
| parents | 7cc457aa78b1 |
| children | 97be83fc3677 |
comparison
equal
deleted
inserted
replaced
| 3:7cc457aa78b1 | 4:068da7f7cd83 |
|---|---|
| 1 <macros> | 1 <macros> |
| 2 <token name="@TOOL_VERSION@">1.0.4</token> | 2 <token name="@TOOL_VERSION@">3.5.1</token> |
| 3 <token name="@VERSION_SUFFIX@">5</token> | 3 <token name="@VERSION_SUFFIX@">0</token> |
| 4 <token name="@PROFILE@">20.01</token> | 4 <token name="@PROFILE@">22.01</token> |
| 5 | 5 |
| 6 <xml name="vitessce_requirements"> | 6 <xml name="vitessce_requirements"> |
| 7 <requirements> | 7 <requirements> |
| 8 <container type="docker">quay.io/goeckslab/vitessce:@TOOL_VERSION@v3</container> | 8 <container type="docker">quay.io/goeckslab/vitessce:@TOOL_VERSION@</container> |
| 9 </requirements> | 9 </requirements> |
| 10 </xml> | 10 </xml> |
| 11 | 11 |
| 12 <xml name="macro_stdio"> | 12 <xml name="macro_stdio"> |
| 13 <stdio> | 13 <stdio> |
| 21 MAX_MEM=\${GALAXY_MEMORY_MB:-2000} && | 21 MAX_MEM=\${GALAXY_MEMORY_MB:-2000} && |
| 22 export BF_MAX_MEM="\$((\$MAX_MEM/2))m" && | 22 export BF_MAX_MEM="\$((\$MAX_MEM/2))m" && |
| 23 mkdir -p '${output.files_path}/A/0' && | 23 mkdir -p '${output.files_path}/A/0' && |
| 24 ln -sf '$image' '${output.files_path}/A/0/image01.ome.tiff' && | 24 ln -sf '$image' '${output.files_path}/A/0/image01.ome.tiff' && |
| 25 #if $masks | 25 #if $masks |
| 26 info=\$(showinf -nopix -nometa -noflat '${output.files_path}/A/0/image01.ome.tiff') && | 26 info=\$(showinf -nopix -nometa -noflat -no-upgrade '${output.files_path}/A/0/image01.ome.tiff') && |
| 27 echo '>showinf -nopix -nometa -noflat \$image' && | 27 echo '>showinf -nopix -nometa -noflat -no-upgrade \$image' && |
| 28 echo "\$info\n" && | 28 echo "\$info\n" && |
| 29 masks_info=\$(showinf -nopix -nometa -noflat '$masks') && | 29 masks_info=\$(showinf -nopix -nometa -noflat -no-upgrade '$masks') && |
| 30 echo '>showinf -nopix -nometa -noflat \$masks' && | 30 echo '>showinf -nopix -nometa -noflat -no-upgrade \$masks' && |
| 31 echo "\$masks_info\n" && | 31 echo "\$masks_info\n" && |
| 32 masks_n_resolutions=\$(echo "\$masks_info" | grep '^\s*Resolutions\s*=' -m1 | cut -d'=' -f2 | xargs) && | 32 masks_n_resolutions=\$(echo "\$masks_info" | grep '^\s*Resolutions\s*=' -m1 | cut -d'=' -f2 | xargs) && |
| 33 if [ -z \$masks_n_resolutions ]; then | 33 if [ -z \$masks_n_resolutions ]; then |
| 34 n_resolutions=\$(echo "\$info" | grep '^\s*Resolutions\s*=' -m1 | cut -d'=' -f2 | xargs) && | 34 n_resolutions=\$(echo "\$info" | grep '^\s*Resolutions\s*=' -m1 | cut -d'=' -f2 | xargs) && |
| 35 pyramid_scale=1 && | 35 pyramid_scale=1 && |
| 49 pyramid_scale=2; | 49 pyramid_scale=2; |
| 50 echo "Warning: Failed to calculate the pyramid scale; set it to 2!"; | 50 echo "Warning: Failed to calculate the pyramid scale; set it to 2!"; |
| 51 fi; | 51 fi; |
| 52 fi; | 52 fi; |
| 53 fi; | 53 fi; |
| 54 tile_info=\$(showinf -nopix -nometa -noflat '${output.files_path}/A/0/image01.ome.tiff' | grep '^\s*Tile\ssize\s*=' -m1); | 54 tile_info=\$(showinf -nopix -nometa -noflat -no-upgrade '${output.files_path}/A/0/image01.ome.tiff' | grep '^\s*Tile\ssize\s*=' -m1); |
| 55 tile_x=\$(echo "\$tile_info" | cut -d' ' -f4); | 55 tile_x=\$(echo "\$tile_info" | cut -d' ' -f4); |
| 56 tile_y=\$(echo "\$tile_info" | cut -d' ' -f6); | 56 tile_y=\$(echo "\$tile_info" | cut -d' ' -f6); |
| 57 convert_cmd="bfconvert -pyramid-resolutions \$n_resolutions -pyramid-scale \$pyramid_scale -noflat -tilex \$tile_x -tiley \$tile_y '$masks' '${output.files_path}/A/0/masks01.ome.tiff'"; | 57 convert_cmd="bfconvert -no-upgrade -pyramid-resolutions \$n_resolutions -pyramid-scale \$pyramid_scale -noflat -tilex \$tile_x -tiley \$tile_y '$masks' '${output.files_path}/A/0/masks01.ome.tiff'"; |
| 58 echo "\n>\$convert_cmd"; | 58 echo "\n>\$convert_cmd"; |
| 59 eval \$convert_cmd; | 59 eval \$convert_cmd; |
| 60 masks_info_new=\$(showinf -nopix -nometa -noflat '${output.files_path}/A/0/masks01.ome.tiff'); | 60 masks_info_new=\$(showinf -nopix -nometa -noflat -no-upgrade '${output.files_path}/A/0/masks01.ome.tiff'); |
| 61 echo "\n>showinf -nopix -nometa -noflat '${output.files_path}/A/0/masks01.ome.tiff'"; | 61 echo "\n>showinf -nopix -nometa -noflat -no-upgrade '${output.files_path}/A/0/masks01.ome.tiff'"; |
| 62 echo "\$masks_info_new\n"; | 62 echo "\$masks_info_new\n"; |
| 63 else | 63 else |
| 64 ln -sf '$masks' '${output.files_path}/A/0/masks01.ome.tiff'; | 64 ln -sf '$masks' '${output.files_path}/A/0/masks01.ome.tiff'; |
| 65 fi && | 65 fi && |
| 66 #end if | 66 #end if |
| 67 python '$__tool_directory__/@TOOL_ID@.py' | 67 python '$__tool_directory__/@TOOL_ID@.py' |
| 68 --inputs '$inputs' | 68 --inputs '$inputs' |
| 69 --output '${output.files_path}' | 69 --output '${output.files_path}' |
| 70 --image '${output.files_path}/A/0/image01.ome.tiff' | 70 --image '${output.files_path}/A/0/image01.ome.tiff' |
| 71 --offsets '$image.metadata.offsets' | |
| 71 #if $masks | 72 #if $masks |
| 72 --masks '${output.files_path}/A/0/masks01.ome.tiff' | 73 --masks '${output.files_path}/A/0/masks01.ome.tiff' |
| 73 #end if | 74 #end if |
| 74 #if $do_phenotyping.phenotyping_choice == 'add_h5ad' | 75 #if $do_phenotyping.phenotyping_choice == 'add_h5ad' |
| 75 --anndata '$anndata' | 76 --anndata '$anndata' |
| 76 #end if | 77 #end if |
| 77 && | 78 && |
| 78 cp -R '$__tool_directory__/static' '${output.files_path}' && | |
| 79 cp '$__tool_directory__/index.html' '$output'; | 79 cp '$__tool_directory__/index.html' '$output'; |
| 80 | 80 echo "export var config = \$(cat ${output.files_path}/config.json)" >> '${output.files_path}/config.js'; |
| 81 cat '${output.files_path}/config.json' >> '$vitessce_config'; | |
| 81 ]]> | 82 ]]> |
| 82 </command> | 83 </command> |
| 83 </xml> | 84 </xml> |
| 84 | 85 |
| 85 </macros> | 86 </macros> |
