changeset 3:c496306c1cba draft

planemo upload for repository https://github.com/BMCV/galaxy-image-analysis/tools/segmetrics/ commit baee438adb94f6e8b6c3e45e8413c36f9d1dadee
author imgteam
date Sat, 08 Oct 2022 21:54:40 +0000
parents c90b52773d2e
children 7989264b5780
files run-segmetrics.py segmetrics.xml test-data/results1.tsv test-data/results2.tsv
diffstat 4 files changed, 12 insertions(+), 6 deletions(-) [+]
line wrap: on
line diff
--- a/run-segmetrics.py	Sat Oct 08 19:54:28 2022 +0000
+++ b/run-segmetrics.py	Sat Oct 08 21:54:40 2022 +0000
@@ -128,6 +128,6 @@
 
     # write results
     with open(args.results, 'w', newline='') as fout:
-        csv_writer = csv.writer(fout, delimiter=',', quotechar='"', quoting=csv.QUOTE_MINIMAL)
+        csv_writer = csv.writer(fout, delimiter='\t', quotechar='"', quoting=csv.QUOTE_MINIMAL)
         for row in rows:
             csv_writer.writerow(row)
--- a/segmetrics.xml	Sat Oct 08 19:54:28 2022 +0000
+++ b/segmetrics.xml	Sat Oct 08 21:54:40 2022 +0000
@@ -1,4 +1,4 @@
-<tool id="ip_segmetrics" name="SegMetrics" version="0.11.3-1" profile="20.05">
+<tool id="ip_segmetrics" name="SegMetrics" version="0.11.3-2" profile="20.05">
    <description>image segmentation and object detection performance measures</description>
    <requirements> 
         <requirement type="package" version="0.11.3">segmetrics</requirement>
@@ -9,7 +9,7 @@
    python '$__tool_directory__/run-segmetrics.py'
    '$input_seg'
    '$input_gt'
-   ./results.csv
+   ./results.tsv
    $unzip
    $is_seg_unique
    $is_gt_unique
@@ -66,20 +66,20 @@
 
     </inputs>
     <outputs>
-       <data format="csv" name="results" from_work_dir="results.csv" />
+       <data format="tsv" name="results" from_work_dir="results.tsv" />
     </outputs>
     <tests>
         <test>
             <param name="input_seg" value="input2.png"/>
             <param name="input_gt"  value="input1.png"/>
-            <output name="results" value="results1.csv" ftype="csv" compare="diff"/>
+            <output name="results" value="results1.tsv" ftype="tsv" compare="diff"/>
             <param name="is_seg_unique" value="True"/>
             <param name="is_gt_unique"  value="True"/>
         </test>
         <test>
             <param name="input_seg" value="input1.zip"/>
             <param name="input_gt"  value="input2.zip"/>
-            <output name="results" value="results2.csv" ftype="csv" compare="diff"/>
+            <output name="results" value="results2.tsv" ftype="tsv" compare="diff"/>
             <param name="is_seg_unique" value="True"/>
             <param name="is_gt_unique"  value="True"/>
             <param name="unzip" value="True"/>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test-data/results1.tsv	Sat Oct 08 21:54:40 2022 +0000
@@ -0,0 +1,2 @@
+	Dice	SEG	Jaccard index	Ob. HSD (sym)	Ob. NSD	Split	Merge	Spurious	Missing
+	0.5473684210526316	0.291005291005291	1.6238374627624792	141.68949443548658	0.8175405481022531	0	1	2	0
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test-data/results2.tsv	Sat Oct 08 21:54:40 2022 +0000
@@ -0,0 +1,4 @@
+	Dice	SEG	Jaccard index	Ob. HSD (sym)	Ob. NSD	Split	Merge	Spurious	Missing
+directory/img1.png	0.5473684210526316	0.14285714285714285	1.6238374627624792	142.42099468121046	0.7765050343914003	1	0	0	2
+directory/img2.png	0.5473684210526316	0.291005291005291	1.6238374627624792	141.68949443548658	0.8175405481022531	0	1	2	0
+	0.5473684210526316	0.2169312169312169	1.6238374627624792	142.0552445583485	0.7970227912468267	1	1	2	2