Mercurial > repos > goeckslab > mesmer
changeset 0:53240d7c1fc5 draft
planemo upload for repository https://github.com/goeckslab/tools-mti/tree/main/tools/mesmer commit 5fb6aa9066c68d9972b3cc4be13503a952f952a5
author | goeckslab |
---|---|
date | Thu, 08 Sep 2022 15:17:30 +0000 |
parents | |
children | 02abff468d60 |
files | Dockerfile macros.xml mesmer.xml test-data/test.tiff |
diffstat | 4 files changed, 106 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/Dockerfile Thu Sep 08 15:17:30 2022 +0000 @@ -0,0 +1,5 @@ +ARG VERSION=0.3.1 + +FROM vanvalenlab/deepcell-applications:${VERSION} + +ENTRYPOINT []
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/macros.xml Thu Sep 08 15:17:30 2022 +0000 @@ -0,0 +1,21 @@ +<?xml version="1.0"?> +<macros> + <xml name="requirements"> + <requirements> + <container type="docker">quay.io/goeckslab/mesmer:@TOOL_VERSION@</container> + </requirements> + </xml> + + <xml name="version_cmd"> + <version_command>@CMD_BEGIN@ --help</version_command> + </xml> + <xml name="citations"> + <citations> + <citation type="doi">10.1038/s41587-021-01094-0</citation> + </citations> + </xml> + + <token name="@TOOL_VERSION@">0.3.1</token> + <token name="@VERSION_SUFFIX@">0</token> + <token name="@CMD_BEGIN@">python /usr/src/app/run_app.py mesmer</token> +</macros>
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/mesmer.xml Thu Sep 08 15:17:30 2022 +0000 @@ -0,0 +1,80 @@ +<tool id="mesmer" name="Mesmer" version="@TOOL_VERSION@+galaxy@VERSION_SUFFIX@" profile="19.01"> + <description>Mesmer for whole-cell segmentation of multiplexed tissue imaging data</description> + + <macros> + <import>macros.xml</import> + </macros> + + <expand macro="requirements"/> + <expand macro="version_cmd"/> + + <command detect_errors="exit_code"><![CDATA[ + ln -s '$nuclear_image' 'input.tif' && + @CMD_BEGIN@ + --output-directory ./ + --output-name 'mask.tif' + --nuclear-image 'input.tif' + --nuclear-channel $nuclear_channel + --compartment $compartment + --image-mpp $image_mpp + $squeeze + + #if $membrane_select.membrane_segment == "True": + --membrane-image '$membrane_select.membrane_image' + --membrane-channel '$membrane_select.membrane_channel' + #end if + ]]></command> + + <inputs> + <param name="nuclear_image" type="data" format="tiff, ome.tiff" label="Image containing the nuclear marker(s)"/> + <param name="nuclear_channel" type="integer" value="0" label="The numerical index of the channel(s) from nuclear-image"/> + <param name="compartment" type="select" label="Compartment for segmentation prediction: "> + <option selected="true" value="whole-cell">Whole cell</option> + <option value="nuclear">Nuclear</option> + </param> + <param name="image_mpp" type="float" value="0.5" label="Resolution of the image in microns-per-pixel"/> + <param name="squeeze" type="boolean" truevalue="--squeeze" falsevalue="" checked="false" label="Whether to np.squeeze the outputs before saving"/> + <conditional name="membrane_select"> + <param name="membrane_segment" type="select" label="Segment with Cell Membrane"> + <option selected="True" value="False">No</option> + <option value="True">Yes</option> + </param> + <when value="True"> + <param name="membrane_image" type="data" format="tiff, ome.tiff" label="The path to an image containing the membrane marker(s)"/> + <param name="membrane_channel" type="integer" value="0" label="The numerical index of the channel(s) from membrane-image"/> + </when> + <when value="False" /> + </conditional> + </inputs> + <outputs> + <data format="tiff" name="mask" from_work_dir="mask.tif" label="${tool.name} on ${on_string}: Mask"/> + </outputs> + <tests> + <test> + <param name="nuclear_image" value="test.tiff" /> + <param name="compartment" value="nuclear" /> + <param name="membrane_select.membrane_segment" value="False" /> + <param name="image_mmp" value="0.65" /> + <param name="squeeze" value="--squeeze" /> + <output name="mask" ftype="tiff"> + <assert_contents> + <has_size value="360000" delta="1000" /> + </assert_contents> + </output> + </test> + </tests> + <help><![CDATA[ +------ +Mesmer +------ + +**Mesmer** is a DeepCell application that uses a pre-trained model for predicting nuclear and whole cell segmentation from multiplex tissue data. + +**Inputs** +1. a multiple tissue image that includes a nuclear marker and optionally cytoplasm/membrane markers + +**Outputs** +1. the nuclear or whole cell segmentation mask + ]]></help> + <expand macro="citations" /> +</tool>