diff measure_granularity.xml @ 3:382413f8ec1d draft

"planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools commit c3917e27eb1c1deeb381aa0dc8161c07699562fb"
author bgruening
date Mon, 11 May 2020 07:50:47 -0400
parents 88dd3674c4d0
children ac5bea85a391
line wrap: on
line diff
--- a/measure_granularity.xml	Thu Apr 16 05:41:38 2020 -0400
+++ b/measure_granularity.xml	Mon May 11 07:50:47 2020 -0400
@@ -4,10 +4,10 @@
     <macros>
         <import>macros.xml</import>
     </macros>
-    
+
     <expand macro="py_requirements"/>
     <expand macro="cmd_modules" />
-    
+
     <configfiles>
         <inputs name="inputs" />
         <configfile name="script_file">
@@ -56,31 +56,31 @@
     module_count = int(v)
     new_count = module_count + 1
     lines[4] = k + ":%d\n" % new_count
-    with open("output", "w") as f:
+    with open("output.cppipe", "w") as f:
         f.writelines(lines)
         f.write(writemg())
 
-f.close()
+    f.close()
         </configfile>
     </configfiles>
-    
+
     <inputs>
-        <expand macro="input_pipeline_macro" />
-        <repeat name="rpt_image" title="Add another image">
-            <param name="image_to_measure" type="text" label="Select an image to measure">
+        <expand macro="input_pipeline_param" />
+        <repeat name="rpt_image" title="new image" min="1">
+            <param name="image_to_measure" type="text" label="Enter the name of a greyscale image to measure">
                 <expand macro="text_validator" />
             </param>
 
-            <param name="subsampling_factor_granularity" type="float" value="0.25" label="Subsampling factor for granularity measurements" /> 
+            <param name="subsampling_factor_granularity" type="float" value="0.25" label="Subsampling factor for granularity measurements" help="A factor lower than 1 if the textures of interest are larger than a few pixels. A factor greater than 1 might increase the accuracy but also require more processing time. Images are typically of higher resolution than is required for granularity measurements, so the default value is 0.25."/>
+
+            <param name="subsampling_factor_background_reduction" type="float" value="0.25" min="0.125" max="0.25" label="Subsampling factor for background reduction" help="A small factor should be used if the structures of interest are large." />
 
-            <param name="subsampling_factor_background_reduction" type="float" value="0.25" min="0.125" max="0.25" label="Subsampling factor for background reduction" /> 
-            
-            <param name="radius" type="integer" value="10" label="Radius of structuring element" /> 
-            
-            <param name="range_granular_spectrum" type="integer" value="16" label="Range of the granular spectrum" /> 
+            <param name="radius" type="integer" value="10" label="Radius of structuring element" help="This radius should correspond to the radius of the textures of interest after subsampling." />
 
-            <repeat name="rpt_object" title="Add another object">
-                <param name="object_to_measure" type="text" label="Select object to measure" >
+            <param name="range_granular_spectrum" type="integer" value="16" label="Range of the granular spectrum" help="You may need a trial run to see which granular spectrum range yields informative measurements. Start by using a wide spectrum and narrow it down to the informative range to save time." />
+
+            <repeat name="rpt_object" title="new object">
+                <param name="object_to_measure" type="text" label="Enter the name of the object whose granularity will be measured" help="You can select objects from prior modules that identify objects, such as IdentifyPrimaryObjects. If you only want to measure the granularity for the image overall, you can remove all objects.">
                     <expand macro="text_validator" />
                 </param>
             </repeat>
@@ -88,7 +88,7 @@
     </inputs>
 
     <outputs>
-        <expand macro="output_pipeline_macro" />
+        <expand macro="output_pipeline_param" />
     </outputs>
 
     <tests>
@@ -101,10 +101,21 @@
                 <param name="radius" value="10" />
                 <param name="range_granular_spectrum" value="16" />
             </repeat>
-            <expand macro="test_out_file" file="measure_granularity.txt" />
+            <expand macro="test_out_file" file="measure_granularity.cppipe" />
         </test>
     </tests>
 
-    <expand macro="help" module="MeasureGranularity" />
+    <help>
+        <![CDATA[
+
+            .. class:: infomark
+
+            **What it does**
+
+            Image granularity is a texture measurement that tries to fit a series of structure elements of increasing size into the texture of the image and outputs a spectrum of measures based on how well they fit. Granularity is measured as described by Ilya Ravkin (in the paper *Bit representation techniques and image processing*). The size of the starting structure element as well as the range of the spectrum is given as input.
+
+            @COMMON_HELP@
+            ]]>
+    </help>
     <expand macro="citations" />
 </tool>