# HG changeset patch
# User watsocam
# Date 1647461878 0
# Node ID b66b59713319c5184970a7c17597d7843d9291f6
"planemo upload for repository https://github.com/goeckslab/tools-mti/tree/main/tools/palom commit 84aa6670d94fc7c7ef3178c606896f678119559e"
diff -r 000000000000 -r b66b59713319 macros.xml
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/macros.xml Wed Mar 16 20:17:58 2022 +0000
@@ -0,0 +1,12 @@
+
+
+
+ quay.io/goeckslab/palom:2021.12.0
+
+
+
+
+
+
+
+
\ No newline at end of file
diff -r 000000000000 -r b66b59713319 palom_svs.xml
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/palom_svs.xml Wed Mar 16 20:17:58 2022 +0000
@@ -0,0 +1,99 @@
+
+ Piecewise alignment for layers of mosaics. A tool for registering whole-slide images with different IHC stainings
+
+ macros.xml
+
+
+
+
+
+import os
+import pathlib
+import pandas as pd
+import palom
+from palom.cli.svs import run_palom
+
+cwd = os.getcwd()
+
+ref_img = pathlib.Path(os.path.join(cwd,"ref.svs"))
+
+images = [ref_img]
+channels = ["hematoxylin"]
+modes = ["hematoxylin"]
+
+#for $i in $moving_images:
+img = pathlib.Path("${i.name}")
+images.append(img)
+#end for
+
+channel_df = pd.read_csv(os.path.join(cwd, "channels.csv"))
+channel_df = channel_df.astype({'channel':'string'})
+channels += list(channel_df['channel'])
+modes += list(channel_df['mode'])
+
+pixel_size = None
+
+#if $pixel_size:
+pixel_size = int($pixel_size)
+#end if
+
+level = 0
+
+#if $level:
+level = int($level)
+#end if
+
+output_path = pathlib.Path(os.path.join(cwd, "registered.ome.tiff"))
+
+qc_path = output_path.parent / 'qc'
+
+os.mkdir(qc_path)
+
+run_palom(
+ img_paths = images,
+ img_modes = modes,
+ pixel_size = pixel_size,
+ channel_names = channels,
+ output_path = output_path,
+ qc_path = qc_path,
+ level = level
+)
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file