-
Notifications
You must be signed in to change notification settings - Fork 17
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
7 changed files
with
130 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
categories: | ||
- Imaging | ||
description: Tool for cell instance aware segmentation in densely packed 3D volumetric images | ||
long_description: PlantSeg is a tool for cell instance aware segmentation in densely packed 3D volumetric images. The pipeline uses a two stages segmentation strategy (Neural Network + Segmentation). The pipeline is tuned for plant cell tissue acquired with confocal and light sheet microscopy. | ||
name: plantseg | ||
owner: imgteam | ||
homepage_url: https://github.com/bmcv | ||
remote_repository_url: https://github.com/BMCV/galaxy-image-analysis/tree/master/tools/plantseg/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
import argparse | ||
import json | ||
|
||
import yaml | ||
|
||
|
||
# This script genereates the config file required by PlantSeg. | ||
# For an overview of the config fields, see: | ||
# https://github.com/kreshuklab/plant-seg/blob/master/examples/config.yaml | ||
|
||
|
||
if __name__ == '__main__': | ||
|
||
parser = argparse.ArgumentParser() | ||
parser.add_argument('--inputs', type=str, help='Path to the inputs file', required=True) | ||
parser.add_argument('--config', type=str, help='Path to the config file', required=True) | ||
parser.add_argument('--img_in', type=str, help='Path to the input image', required=True) | ||
args = parser.parse_args() | ||
|
||
with open(args.inputs, 'r') as fp: | ||
inputs = json.load(fp) | ||
|
||
cfg = dict(path=args.image) | ||
for section_name in ( | ||
'preprocessing', | ||
'cnn_prediction', | ||
'cnn_postprocessing', | ||
'segmentation', | ||
'segmentation_postprocessing', | ||
): | ||
cfg[section_name] = inputs[section_name] | ||
|
||
with open(args.config, 'w') as fp: | ||
fp.write(yaml.dump(cfg)) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
../../macros/creators.xml |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,86 @@ | ||
<tool id="plantseg" name="Perform segmentation in densely packed 3-D volumetric images" version="@TOOL_VERSION@+galaxy@VERSION_SUFFIX@" profile="20.05"> | ||
<description>with PlantSeg</description> | ||
<macros> | ||
<import>creators.xml</import> | ||
<import>tests.xml</import> | ||
<token name="@TOOL_VERSION@">1.8.1</token> | ||
<token name="@VERSION_SUFFIX@">0</token> | ||
</macros> | ||
<creator> | ||
<expand macro="creators/bmcv"/> | ||
</creator> | ||
<edam_operations> | ||
<edam_operation>operation_3443</edam_operation> | ||
</edam_operations> | ||
<xrefs> | ||
<xref type="bio.tools">plantseg</xref> | ||
</xrefs> | ||
<requirements> | ||
<requirement type="package" version="@TOOL_VERSION@">plant-seg</requirement> | ||
<requirement type="package" version="2.3.1">pytorch</requirement> | ||
<requirement type="package" version="0.5.3">bioimageio.spec</requirement> | ||
<requirement type="package" version="6.0.1">pyyaml</requirement> | ||
</requirements> | ||
<command detect_errors="aggressive"> | ||
<![CDATA[ | ||
ln -s '${img_in}' ./image.${img_in.ext} && | ||
python '$__tool_directory__/create-config.py' | ||
--config config.yml | ||
--inputs '$inputs' | ||
--img_in ./image.${img_in.ext} && | ||
plantseg --config config.yml && | ||
ln -s 'PreProcessing/*/MultiCut/*.h5' 'masks.h5' | ||
]]> | ||
</command> | ||
<configfiles> | ||
<inputs name="inputs" /> | ||
</configfiles> | ||
<inputs> | ||
|
||
<param name="img_in" type="data" format="tiff,png,h5" label="Dataset" /> | ||
|
||
<section name="preprocessing" title="Pre-processing" expanded="false"> | ||
<param name="state" type="boolean" checked="true" label="Enabled" truevalue="true" falsevalue="false" /> | ||
</section> | ||
|
||
<section name="cnn_prediction" title="CNN prediction" expanded="false"> | ||
<param name="state" type="boolean" checked="true" label="Enabled" truevalue="true" falsevalue="false" /> | ||
</section> | ||
|
||
<section name="cnn_postprocessing" title="CNN postprocessing" expanded="false"> | ||
<param name="state" type="boolean" checked="false" label="Enabled" truevalue="true" falsevalue="false" /> | ||
</section> | ||
|
||
<section name="segmentation" title="Segmentation" expanded="false"> | ||
<param name="state" type="boolean" checked="true" label="Enabled" truevalue="true" falsevalue="false" /> | ||
</section> | ||
|
||
<section name="segmentation_postprocessing" title="Segmentation postprocessing" expanded="false"> | ||
<param name="state" type="boolean" checked="false" label="Enabled" truevalue="true" falsevalue="false" /> | ||
</section> | ||
|
||
</inputs> | ||
<outputs> | ||
<data format="png" name="masks" from_work_dir="masks.h5" /> | ||
</outputs> | ||
<tests> | ||
<test> | ||
<param name="img_in" value="sample_ovule.h5" /> | ||
<output name="masks" value="sample_ovule_output.h5" ftype="h5" compare="sim_size" delta="100" delta_frac="0.1" /> | ||
</test> | ||
</tests> | ||
<help> | ||
|
||
**Perform segmentation in densely packed 3-D volumetric images.** | ||
|
||
PlantSeg is a tool for cell instance aware segmentation in densely packed 3D volumetric images. | ||
The pipeline uses a two stages segmentation strategy (Neural Network + Segmentation). | ||
The pipeline is tuned for plant cell tissue acquired with confocal and light sheet microscopy. | ||
|
||
</help> | ||
<citations> | ||
<citation type="doi">10.7554/eLife.57613</citation> | ||
</citations> | ||
</tool> |
Binary file not shown.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
../../macros/tests.xml |