1+ <tool id =" vpt_extract" name =" Vizgen VPT - Extract" version =" @TOOL_VERSION@+galaxy@VERSION_SUFFIX@" profile =" @PROFILE@" >
2+ <description >image patches</description >
3+ <macros >
4+ <import >macros.xml</import >
5+ </macros >
6+ <expand macro =" requirements" />
7+ <expand macro =" creator" />
8+ <command detect_errors =" exit_code" ><![CDATA[
9+ @CMD@
10+ vpt
11+ @COMMON_ARGS@
12+ extract-image-patch
13+ --input-images 'input/images/'
14+ --input-micron-to-mosaic 'input/micron_to_mosaic_pixel_transform.csv'
15+ --output-patch 'output/patch1.png'
16+ --center-x $center_x
17+ --center-y $center_y
18+ --size-x $size_x
19+ --size-y $size_y
20+ --input-z-index $input_z_index
21+ #if $red_stain_name != "None":
22+ --red-stain-name $red_stain_name
23+ #end if
24+ #if $green_stain_name != "None":
25+ --green-stain-name $green_stain_name
26+ #end if
27+ #if $blue_stain_name != "None":
28+ --blue-stain-name $blue_stain_name
29+ #end if
30+ --normalization $normalization
31+ ]]> </command >
32+ <inputs >
33+ <expand macro =" common_input" />
34+ <param argument =" --center-x" type =" integer" label =" X coordinate in micron space" />
35+ <param argument =" --center-y" type =" integer" label =" Y coordinate in micron space" />
36+ <param argument =" --size-x" type =" integer" min =" 1" value =" 108" label =" Width of the patch in micron space" />
37+ <param argument =" --size-y" type =" integer" min =" 1" value =" 108" label =" Height of the patch in micron space" />
38+ <param argument =" --input_z_index" type =" integer" min =" 0" value =" 2" label =" The Z plane of the mosaic tiff images to use for the patch" />
39+ <param argument =" --red-stain-name" type =" select" label =" The stain that will be used for red channel of the patch" >
40+ <expand macro =" channel_options_none" />
41+ </param >
42+ <param argument =" --green-stain-name" type =" select" label =" The stain that will be used for green channel of the patch" >
43+ <expand macro =" channel_options_none" />
44+ </param >
45+ <param argument =" --blue-stain-name" type =" select" label =" The stain that will be used for blue channel of the patch" >
46+ <expand macro =" channel_options_none" />
47+ </param >
48+ <expand macro =" normalization_param" label =" Normalization method that will be used on each channel of the patch" />
49+ <expand macro =" advanced_output" />
50+ </inputs >
51+ <outputs >
52+ <data name =" patch_image" format =" png" from_work_dir =" output/patch1.png" label =" ${tool.name} on ${on_string}: Patched image" />
53+ <expand macro =" common_output" />
54+ </outputs >
55+ <tests >
56+ <test expect_num_outputs =" 2" >
57+ <param name="input_images" location="https://zenodo.org/records/15319018/files/mosaic_Cellbound1_z0.tif,https://zenodo.org/records/15319018/files/mosaic_Cellbound1_z1.tif,https://zenodo.org/records/15319018/files/mosaic_Cellbound1_z2.tif,https://zenodo.org/records/15319018/files/mosaic_Cellbound1_z3.tif,https://zenodo.org/records/15319018/files/mosaic_Cellbound1_z4.tif,https://zenodo.org/records/15319018/files/mosaic_Cellbound1_z5.tif,https://zenodo.org/records/15319018/files/mosaic_Cellbound1_z6.tif,https://zenodo.org/records/15319018/files/mosaic_Cellbound2_z0.tif,https://zenodo.org/records/15319018/files/mosaic_Cellbound2_z1.tif,https://zenodo.org/records/15319018/files/mosaic_Cellbound2_z2.tif,https://zenodo.org/records/15319018/files/mosaic_Cellbound2_z3.tif,https://zenodo.org/records/15319018/files/mosaic_Cellbound2_z4.tif,https://zenodo.org/records/15319018/files/mosaic_Cellbound2_z5.tif,https://zenodo.org/records/15319018/files/mosaic_Cellbound2_z6.tif,https://zenodo.org/records/15319018/files/mosaic_Cellbound3_z0.tif,https://zenodo.org/records/15319018/files/mosaic_Cellbound3_z1.tif,https://zenodo.org/records/15319018/files/mosaic_Cellbound3_z2.tif,https://zenodo.org/records/15319018/files/mosaic_Cellbound3_z3.tif,https://zenodo.org/records/15319018/files/mosaic_Cellbound3_z4.tif,https://zenodo.org/records/15319018/files/mosaic_Cellbound3_z5.tif,https://zenodo.org/records/15319018/files/mosaic_Cellbound3_z6.tif,https://zenodo.org/records/15319018/files/mosaic_DAPI_z0.tif,https://zenodo.org/records/15319018/files/mosaic_DAPI_z1.tif,https://zenodo.org/records/15319018/files/mosaic_DAPI_z2.tif,https://zenodo.org/records/15319018/files/mosaic_DAPI_z3.tif,https://zenodo.org/records/15319018/files/mosaic_DAPI_z4.tif,https://zenodo.org/records/15319018/files/mosaic_DAPI_z5.tif,https://zenodo.org/records/15319018/files/mosaic_DAPI_z6.tif,https://zenodo.org/records/15319018/files/mosaic_PolyT_z0.tif,https://zenodo.org/records/15319018/files/mosaic_PolyT_z1.tif,https://zenodo.org/records/15319018/files/mosaic_PolyT_z2.tif,https://zenodo.org/records/15319018/files/mosaic_PolyT_z3.tif,https://zenodo.org/records/15319018/files/mosaic_PolyT_z4.tif,https://zenodo.org/records/15319018/files/mosaic_PolyT_z5.tif,https://zenodo.org/records/15319018/files/mosaic_PolyT_z6.tif"/>
58+ <param name =" input_micron_to_mosaic" location =" https://zenodo.org/records/15319018/files/micron_to_mosaic_pixel_transform.csv" />
59+ <param name =" center_x" value =" 200" />
60+ <param name =" center_y" value =" 200" />
61+ <param name =" size_x" value =" 208" />
62+ <param name =" size_y" value =" 208" />
63+ <param name =" input_z_index" value =" 2" />
64+ <param name =" red_stain_name" value =" Cellbound1" />
65+ <param name =" green_stain_name" value =" Cellbound3" />
66+ <param name =" blue_stain_name" value =" DAPI" />
67+ <param name =" normalization" value =" CLAHE" />
68+ <section name =" advanced_output" >
69+ <param name =" log" value =" true" />
70+ </section >
71+ <output name =" patch_image" location =" https://zenodo.org/records/15319018/files/patch1.png" ftype =" png" compare =" image_diff" />
72+ <output name =" vpt_log" >
73+ <assert_contents >
74+ <has_text_matching expression =" Extract image patch finished" />
75+ </assert_contents >
76+ </output >
77+ </test >
78+ </tests >
79+ <help >
80+ The Vizgen Post-processing Tool (VPT) is a scalable and reproducible tool which enables users to reprocess and refine the single-cell results of MERSCOPE experiments.
81+
82+ The extract-image-patch tool extracts a patch from the mosaic image at the specified coordinates and size. The patch is saved as a PNG image. It can be used for manual segmentation or for training machine learning models.
83+ </help >
84+ <expand macro =" citations" />
85+ </tool >
0 commit comments