Mercurial > repos > goeckslab > backsub
changeset 0:bf9f98a7f936 draft default tip
planemo upload for repository https://github.com/goeckslab/tools-mti/tree/main/tools/background-subtraction commit 7030070398b2b137b40f7893a82bd9889ae9df6f
author | goeckslab |
---|---|
date | Wed, 05 Jun 2024 18:01:54 +0000 |
parents | |
children | |
files | backsub.xml macros.xml test-data/test.ome.tiff test-data/test_markers.csv |
diffstat | 4 files changed, 121 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/backsub.xml Wed Jun 05 18:01:54 2024 +0000 @@ -0,0 +1,96 @@ +<tool id="backsub" name="Background subtraction" version="@TOOL_VERSION@+galaxy@VERSION_SUFFIX@" profile="@PROFILE@"> + + <description>for sequential immunofluorescence images</description> + + <macros> + <import>macros.xml</import> + </macros> + + <expand macro="requirements"/> + <expand macro="version_cmd"/> + + <command detect_errors="aggressive"><![CDATA[ + + python /background_subtraction/background_sub.py + + ##Supply image + --root '$root' + + ##Supply markers + --markers '$markers' + + ##Name output image file + --output out.ome.tiff + + ##Name output markers file + --marker-output out.csv + + ##Additional arguments + #if $adv.pixel_size + --pixel-size $adv.pixel_size + #end if + + #if $adv.tile_size + --tile-size $adv.tile_size + #end if + + ]]></command> + + <inputs> + <param name="root" type="data" format="ome.tiff" optional="false" label="Image to process"/> + <param name="markers" type="data" format="csv" optional="false" label="Markers file mapping channels to subtract" help="Expected columns: marker_name, background, exposure, remove"/> + <section name="adv" title="Advanced Options" expanded="false"> + <param name="pixel_size" type="float" optional="true" min=".01" max="1.0" label="Pixel size in microns" help="If not supplied, finds resolution in XML metadata, otherwise defaults to 1"/> + <param name="tile_size" type="integer" optional="true" min="256" max="2048" label="Tile size for pyramid generation (default 1024)"/> + </section> + </inputs> + + <outputs> + <data format="ome.tiff" name="image_output" from_work_dir="out.ome.tiff" label="${tool.name} on ${on_string}: Subtracted Image"/> + <data format="csv" name="marker_output" from_work_dir="out.csv" label="${tool.name} on ${on_string}: Markers"/> + </outputs> + + <tests> + <test expect_num_outputs="2"> + <param name="root" value="test.ome.tiff" /> + <param name="markers" value="test_markers.csv" /> + <param name="tile_size" value="256" /> + <output name="image_output" ftype="ome.tiff"> + <assert_contents> + <has_size value="520000" delta="10000" /> + </assert_contents> + </output> + <output name="marker_output" ftype="csv"> + <assert_contents> + <has_n_columns n="3" sep="," /> + <has_n_lines n="3" /> + </assert_contents> + </output> + </test> + </tests> + <help><![CDATA[ +**Background autofluorescence subtraction for cyclic imaging data** + +Performs Pixel-by-pixel channel subtraction scaled by exposure times +primarily developed for images produced by the COMET platform and to work within +the MCMICRO pipeline. Main usecase is autuofluorescence subtraction for +multichannel and multicycle images for visualization of images from tissues with +high autofluroescence (FFPE), improved segmentation, and quantification (if the +previous two usecases aren't necessary, downstream subtraction of +autofluorescent signal is encouraged as the script is memory inefficent). + +The markers file (CSV) gives details about the channels and needs to contain +the following columns: "marker_name", "background", "exposure", "remove" + +The "marker_name" column should indicate the marker for the acquired channel and all values should be unique. +The "background" column should indicate the marker name of the channel which needs to be subtracted. +This value must match the "marker_name" value of the background channel. +The "exposure" column should contain the exposure time used for channel acquisition, +and the measure unit should be consistent across the column. Exposure time is used for scaling the +value of the background to be comparable to the processed channel. The "remove" column should contain +logical `TRUE` values for channels which should be exluded in the output image. + +*Visit https://github.com/SchapiroLabor/Background_subtraction/ for the most up-to-date information* + ]]></help> + <expand macro="citations" /> +</tool>
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/macros.xml Wed Jun 05 18:01:54 2024 +0000 @@ -0,0 +1,22 @@ +<?xml version="1.0"?> +<macros> + <xml name="requirements"> + <requirements> + <container type="docker">ghcr.io/schapirolabor/background_subtraction:v@TOOL_VERSION@</container> + </requirements> + </xml> + + <xml name="version_cmd"> + <version_command>echo @TOOL_VERSION@</version_command> + </xml> + <xml name="citations"> + <citations> + <citation type="doi">10.1038/s41592-021-01308-y</citation> + </citations> + </xml> + + <token name="@PROFILE@">21.0</token> + <token name="@TOOL_VERSION@">0.4.1</token> + <token name="@VERSION_SUFFIX@">0</token> + +</macros>