# HG changeset patch
# User goeckslab
# Date 1721079459 0
# Node ID 4763362914f47afad0ff57c6f7ec93a6f02989ca
# Parent 61fd94c7ce42bcd70f2296d07ef7fce77bd78d0f
planemo upload for repository https://github.com/goeckslab/tools-mti/tree/main/tools/mti-utils commit 5c324d06ad54dca76aa2b4c8118df5654f49da66
diff -r 61fd94c7ce42 -r 4763362914f4 macros.xml
--- a/macros.xml Thu Jul 11 22:41:10 2024 +0000
+++ b/macros.xml Mon Jul 15 21:37:39 2024 +0000
@@ -16,6 +16,6 @@
0.0.2
- 0
+ 1
19.01
diff -r 61fd94c7ce42 -r 4763362914f4 rename_tiff_channels.xml
--- a/rename_tiff_channels.xml Thu Jul 11 22:41:10 2024 +0000
+++ b/rename_tiff_channels.xml Mon Jul 15 21:37:39 2024 +0000
@@ -59,7 +59,7 @@
channels_df = pd.read_csv(os.path.join(cwd, 'channels.csv'))
original_ome_xml = tiffcomment(os.path.join(cwd, 'renamed_image.ome.tiff'))
-working_ome = ome_types.from_xml(original_ome_xml, parser = 'lxml')
+working_ome = ome_types.from_xml(original_ome_xml)
for l_idx, level in enumerate(working_ome.images):
@@ -73,7 +73,7 @@
print(f"Channel {c_idx} renamed to {new_name}")
-updated_ome_xml = working_ome.to_xml()
+updated_ome_xml = working_ome.to_xml().encode()
tiffcomment(os.path.join(cwd, 'renamed_image.ome.tiff'), updated_ome_xml)
print("Updated OME-TIFF metadata:")
@@ -93,12 +93,13 @@
-
+
+
diff -r 61fd94c7ce42 -r 4763362914f4 test-data/rename_channels.csv
--- a/test-data/rename_channels.csv Thu Jul 11 22:41:10 2024 +0000
+++ b/test-data/rename_channels.csv Mon Jul 15 21:37:39 2024 +0000
@@ -1,3 +1,20 @@
-channel_number,cycle_number,marker_name,Filter,excitation_wavelength,emission_wavelength
-0,6,DNA_6,DAPI,395,431
-0,6,DNA_7,DAPI,395,431
\ No newline at end of file
+channel_number,marker_name
+1,Hematoxylin
+2,HLA_DRDPDQ
+3,DCLAMP
+4,CD3
+5,CD45
+6,CD8
+7,GRZB
+8,CD20
+9,CD11b
+10,CD66b
+11,CD11c
+12,CD163
+13,HLA-ClassI
+14,EOMES
+15,FOXP3
+16,Ki67
+17,panCK
+18,PD-1
+19,PD-L1
diff -r 61fd94c7ce42 -r 4763362914f4 test-data/rename_test.ome.tiff
Binary file test-data/rename_test.ome.tiff has changed
diff -r 61fd94c7ce42 -r 4763362914f4 test-data/test.xml
--- a/test-data/test.xml Thu Jul 11 22:41:10 2024 +0000
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,2 +0,0 @@
-
-