Mercurial > repos > goeckslab > gate_finder
view main_macros.xml @ 3:80102785f5ff draft default tip
planemo upload for repository https://github.com/goeckslab/tools-mti/tree/main/tools/vitessce commit af71ccb3b89c9735c6f985a3e8ffe22cd14c0e04
author | goeckslab |
---|---|
date | Thu, 30 May 2024 17:24:31 +0000 |
parents | 764f6363e2a9 |
children |
line wrap: on
line source
<macros> <token name="@TOOL_VERSION@">1.0.4</token> <token name="@VERSION_SUFFIX@">5</token> <token name="@PROFILE@">20.01</token> <xml name="vitessce_requirements"> <requirements> <container type="docker">quay.io/goeckslab/vitessce:@TOOL_VERSION@v3</container> </requirements> </xml> <xml name="macro_stdio"> <stdio> <exit_code range="1:" level="fatal" description="Error occurred. Please check Tool Standard Error" /> </stdio> </xml> <xml name="vitessce_cmd" token_tool_id="vitessce_spatial"> <command detect_errors="aggressive"> <![CDATA[ MAX_MEM=\${GALAXY_MEMORY_MB:-2000} && export BF_MAX_MEM="\$((\$MAX_MEM/2))m" && mkdir -p '${output.files_path}/A/0' && ln -sf '$image' '${output.files_path}/A/0/image01.ome.tiff' && #if $masks info=\$(showinf -nopix -nometa -noflat '${output.files_path}/A/0/image01.ome.tiff') && echo '>showinf -nopix -nometa -noflat \$image' && echo "\$info\n" && masks_info=\$(showinf -nopix -nometa -noflat '$masks') && echo '>showinf -nopix -nometa -noflat \$masks' && echo "\$masks_info\n" && masks_n_resolutions=\$(echo "\$masks_info" | grep '^\s*Resolutions\s*=' -m1 | cut -d'=' -f2 | xargs) && if [ -z \$masks_n_resolutions ]; then n_resolutions=\$(echo "\$info" | grep '^\s*Resolutions\s*=' -m1 | cut -d'=' -f2 | xargs) && pyramid_scale=1 && if [ -z "\$n_resolutions" ]; then echo "Warning: Failded to retrieve the number of pyramid resolutions. Set pyramid resolutions to 4 and scale to 2!"; n_resolutions=4; pyramid_scale=2; else echo "Found the number of pyramid resolutions: \$n_resolutions"; if [ "\$n_resolutions" -gt 1 ]; then sizeX0=\$(echo "\$info" | grep '^\s*sizeX\[0\]\s*=' -m1 | cut -d'=' -f2 | xargs) ; sizeX1=\$(echo "\$info" | grep '^\s*sizeX\[1\]\s*=' -m1 | cut -d'=' -f2 | xargs) ; if [ "\$sizeX0" -gt 0 ] && [ "\$sizeX1" -gt 0 ]; then pyramid_scale=\$(((\$sizeX0 + \$sizeX1 / 2 ) / \$sizeX1)); echo "Calculate pyramid scale: \$sizeX0 / \$sizeX1 ~= \$pyramid_scale."; else pyramid_scale=2; echo "Warning: Failed to calculate the pyramid scale; set it to 2!"; fi; fi; fi; tile_info=\$(showinf -nopix -nometa -noflat '${output.files_path}/A/0/image01.ome.tiff' | grep '^\s*Tile\ssize\s*=' -m1); tile_x=\$(echo "\$tile_info" | cut -d' ' -f4); tile_y=\$(echo "\$tile_info" | cut -d' ' -f6); 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'"; echo "\n>\$convert_cmd"; eval \$convert_cmd; masks_info_new=\$(showinf -nopix -nometa -noflat '${output.files_path}/A/0/masks01.ome.tiff'); echo "\n>showinf -nopix -nometa -noflat '${output.files_path}/A/0/masks01.ome.tiff'"; echo "\$masks_info_new\n"; else ln -sf '$masks' '${output.files_path}/A/0/masks01.ome.tiff'; fi && #end if python '$__tool_directory__/@TOOL_ID@.py' --inputs '$inputs' --output '${output.files_path}' --image '${output.files_path}/A/0/image01.ome.tiff' #if $masks --masks '${output.files_path}/A/0/masks01.ome.tiff' #end if #if $do_phenotyping.phenotyping_choice == 'add_h5ad' --anndata '$anndata' #end if && cp -R '$__tool_directory__/static' '${output.files_path}' && cp '$__tool_directory__/index.html' '$output'; ]]> </command> </xml> </macros>