# HG changeset patch # User goeckslab # Date 1662498956 0 # Node ID e30f622ef2c34e216972bde8bc1b56c03cd5086a # Parent 69f8e01b2e1762283c0d358fd3211486bbcb5f16 planemo upload for repository https://github.com/goeckslab/tools-mti/tree/main/tools/palom commit 08d9f2d59c26e67a162d75ae6e8b5fa734ab7b3c diff -r 69f8e01b2e17 -r e30f622ef2c3 Dockerfile --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/Dockerfile Tue Sep 06 21:15:56 2022 +0000 @@ -0,0 +1,18 @@ +FROM python:3.7.12 + +ENV OPS_VERSION=3.4.1 + +ENV PALOM_VERSION=2022.8.2 + +RUN apt update -y && apt install -y openslide-tools python3-opencv + +RUN cd /opt && \ + wget https://github.com/openslide/openslide/releases/download/v$OPS_VERSION/openslide-$OPS_VERSION.tar.gz && \ + tar -zxvf openslide-$OPS_VERSION.tar.gz && \ + cd openslide-$OPS_VERSION + +RUN /opt/openslide-$OPS_VERSION/configure && \ + make && \ + make install + +RUN pip install zarr==2.10.3 pandas palom==$PALOM_VERSION \ No newline at end of file diff -r 69f8e01b2e17 -r e30f622ef2c3 macros.xml --- a/macros.xml Wed May 18 22:55:21 2022 +0000 +++ b/macros.xml Tue Sep 06 21:15:56 2022 +0000 @@ -1,7 +1,7 @@ - quay.io/goeckslab/palom:2021.12.0 + quay.io/goeckslab/palom:@TOOL_VERSION@ @@ -9,4 +9,7 @@ - \ No newline at end of file + 2022.8.2 + 0 + 20.01 + diff -r 69f8e01b2e17 -r e30f622ef2c3 palom_svs.xml --- a/palom_svs.xml Wed May 18 22:55:21 2022 +0000 +++ b/palom_svs.xml Tue Sep 06 21:15:56 2022 +0000 @@ -1,20 +1,23 @@ - - Piecewise alignment for layers of mosaics. A tool for registering whole-slide images with different IHC stainings + + Piecewise alignment for layers of image mosaics. + macros.xml + + @@ -22,23 +25,26 @@ import os import pathlib import pandas as pd +import matplotlib.pyplot as plt import palom from palom.cli.svs import run_palom +plt.switch_backend('agg') + cwd = os.getcwd() -ref_img = pathlib.Path(os.path.join(cwd,"ref.svs")) +ref_img = pathlib.Path(os.path.join(cwd,'ref.svs')) images = [ref_img] -channels = ["hematoxylin"] -modes = ["hematoxylin"] +channels = ['hematoxylin'] +modes = ['hematoxylin'] #for $i in $moving_images: -img = pathlib.Path("${i.name}") +img = pathlib.Path('${i.name}') images.append(img) #end for -channel_df = pd.read_csv(os.path.join(cwd, "channels.csv")) +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']) @@ -49,13 +55,10 @@ pixel_size = float($pixel_size) #end if -level = 0 +level = int($level) +downscale_factor = int($downscale_factor) -#if $level: -level = int($level) -#end if - -output_path = pathlib.Path(os.path.join(cwd, "registered.ome.tiff")) +output_path = pathlib.Path(os.path.join(cwd, 'registered.ome.tiff')) qc_path = output_path.parent / 'qc' @@ -68,16 +71,18 @@ channel_names = channels, output_path = output_path, qc_path = qc_path, - level = level + level = level, + downscale_factor = downscale_factor ) - - - - - + + + + + + @@ -85,15 +90,46 @@ + + + + + + + + + + + + + + + + + + + + + + + + - \ No newline at end of file + diff -r 69f8e01b2e17 -r e30f622ef2c3 test-data/test_channels.csv --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/test-data/test_channels.csv Tue Sep 06 21:15:56 2022 +0000 @@ -0,0 +1,2 @@ +channel,mode +test,hematoxylin diff -r 69f8e01b2e17 -r e30f622ef2c3 test-data/test_moving.svs Binary file test-data/test_moving.svs has changed diff -r 69f8e01b2e17 -r e30f622ef2c3 test-data/test_ref.svs Binary file test-data/test_ref.svs has changed