Mercurial > repos > watsocam > rename_tiff_channels
changeset 3:b18d4cf55493 draft default tip
planemo upload for repository https://github.com/goeckslab/tools-mti/tree/main/tools/mti-utils/rename_tiff_channels commit c631fe8ad37829090b815fc911a10150cd39cd42
author | goeckslab |
---|---|
date | Tue, 12 Jul 2022 20:55:09 +0000 |
parents | 75f8fcef3e96 |
children | |
files | rename_tiff_channels.py rename_tiff_channels.xml |
diffstat | 2 files changed, 10 insertions(+), 10 deletions(-) [+] |
line wrap: on
line diff
--- a/rename_tiff_channels.py Wed May 11 19:32:51 2022 +0000 +++ b/rename_tiff_channels.py Tue Jul 12 20:55:09 2022 +0000 @@ -1,9 +1,9 @@ -import sys -import pandas +import bioformats import click +import javabridge +import pandas import tifffile -import bioformats -import javabridge + @click.command() @click.argument('input_tiff', type=str) @@ -38,7 +38,7 @@ removed_ome = '<'.join(xml_str.split('<ome:')) removed_ome = '/'.join(removed_ome.split('/ome:')) with open(output_name, "w") as out_tiff: - out_tiff.write(header+removed_ome) + out_tiff.write(header + removed_ome) # Slay the evil JavaBridge javabridge.kill_vm()
--- a/rename_tiff_channels.xml Wed May 11 19:32:51 2022 +0000 +++ b/rename_tiff_channels.xml Tue Jul 12 20:55:09 2022 +0000 @@ -1,16 +1,16 @@ -<tool id="rename_tiff_channels" name="Rename OME-TIFF Channels" version="@VERSION@.2" profile="17.09"> +<tool id="rename_tiff_channels" name="Rename OME-TIFF Channels" version="@VERSION@.2" profile="19.01"> <description>A simple script to change the channel names in the XML metadata of OME-TIFF images</description> <macros> <import>macros.xml</import> </macros> <expand macro="requirements"/> - @VERSION_CMD@ + <expand macro="version_cmd"/> <command detect_errors="exit_code"><![CDATA[ - cp "$image" "$renamed_image" ; - @CMD_BEGIN@ "$image" "$channel_csv" out.xml ; - tiffcomment -set out.xml "$renamed_image" ; + cp '$image' '$renamed_image' && + @CMD_BEGIN@ '$image' '$channel_csv' out.xml && + tiffcomment -set out.xml '$renamed_image' ]]></command> <inputs>