Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions tools/cellprofiler/.shed.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,10 @@ owner: bgruening
categories:
- Imaging
description: cellProfiler wrapper
homepage_url: https://github.com/CellProfiler
long_description: |
CellProfiler is a free open-source software designed to enable biologists without training in computer
vision or programming to quantitatively measure phenotypes from thousands of images automatically.
remote_repository_url: https://github.com/bgruening/galaxytools/tree/master/tools
type: unrestricted
auto_tool_repositories:
Expand Down
2 changes: 1 addition & 1 deletion tools/cellprofiler/cellprofiler.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<description>with CellProfiler 3</description>
<macros>
<import>macros.xml</import>
<token name="@VERSION_SUFFIX@">1</token>
<token name="@VERSION_SUFFIX@">2</token>
<xml name="test_assert_content" token_n="291">
<assert_contents>
<has_n_lines n="@N@" />
Expand Down
2 changes: 1 addition & 1 deletion tools/cellprofiler/color_to_gray.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<description>with CellProfiler</description>
<macros>
<import>macros.xml</import>
<token name="@VERSION_SUFFIX@">1</token>
<token name="@VERSION_SUFFIX@">2</token>
<xml name="combine_weight">
<param name="weight_red_channel" value="1.0" min = "0.0" max = "1.0" type="float" label="Relative weight of the red channel" />
<param name="weight_green_channel" value="1.0" min = "0.0" max = "1.0" type="float" label="Relative weight of the green channel" />
Expand Down
2 changes: 1 addition & 1 deletion tools/cellprofiler/convert_objects_to_image.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<description>with CellProfiler</description>
<macros>
<import>macros.xml</import>
<token name="@VERSION_SUFFIX@">1</token>
<token name="@VERSION_SUFFIX@">2</token>
</macros>
<edam_operations>
<edam_operation>operation_3443</edam_operation>
Expand Down
2 changes: 1 addition & 1 deletion tools/cellprofiler/display_data_on_image.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<description>with CellProfiler</description>
<macros>
<import>macros.xml</import>
<token name="@VERSION_SUFFIX@">1</token>
<token name="@VERSION_SUFFIX@">2</token>
<xml name="display_object">
<param name="select_input_obj" label="Enter the name of the input objects" type="text" help="Enter the name of the objects identified by some other tool used upstream in the workflow (such as IdentifyPrimaryObjects or IdentifySecondaryObjects)." />

Expand Down
2 changes: 1 addition & 1 deletion tools/cellprofiler/enhance_or_suppress_features.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

<macros>
<import>macros.xml</import>
<token name="@VERSION_SUFFIX@">1</token>
<token name="@VERSION_SUFFIX@">2</token>
<xml name="feature_speckles">
<param name="speckles_feature_size" label="Feature size" type="integer" value="10" help="Enter the diameter of the largest speckle, the width of the circle, or the width of the neurites to be enhanced or suppressed, which will be used to calculate an appropriate filter size." />
<param name="speed_accuracy" label="Speed and accuracy" type="select">
Expand Down
2 changes: 1 addition & 1 deletion tools/cellprofiler/gray_to_color.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<description>with CellProfiler</description>
<macros>
<import>macros.xml</import>
<token name="@VERSION_SUFFIX@">1</token>
<token name="@VERSION_SUFFIX@">2</token>
<xml name="rgb">
<param name="rgb_red" label="Enter the name of the image to be colored red" value="Leave this black" type="text"/>
<param name="rgb_red_weight" label="Relative weight for the red image" optional="true" type="float" min="0.0" max="1.0" value="1.0" />
Expand Down
493 changes: 493 additions & 0 deletions tools/cellprofiler/identify_secondary_objects.xml

Large diffs are not rendered by default.

109 changes: 109 additions & 0 deletions tools/cellprofiler/identify_tertiary_objects.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,109 @@
<tool id="cp_identify_tertiary_objects" name="IdentifyTertiarxObjects" version="@CP_VERSION@+galaxy@VERSION_SUFFIX@">
<description>with CellProfiler</description>

<macros>
<import>macros.xml</import>
<token name="@VERSION_SUFFIX@">2</token>
</macros>

<edam_operations>
<edam_operation>operation_3443</edam_operation>
</edam_operations>
<xrefs>
<xref type="bio.tools">CellProfiler</xref>
<xref type="biii">cellprofiler</xref>
</xrefs>

<expand macro="py_requirements"/>
<expand macro="cmd_modules" />

<configfiles>
<inputs name="inputs" />
<configfile name="script_file">
import json
import sys
import os

FOURSPACES=@SPACES@

input_json_path = sys.argv[1]
input_pipeline= sys.argv[2]

params = json.load(open(input_json_path, "r"))

def writemoi():
_str = "\nIdentifyTertiaryObjects:[module_num:%d|svn_version:\\'Unknown\\'|variable_revision_number:3|show_window:False|notes:\\x5B\\x5D|batch_state:array(\\x5B\\x5D, dtype=uint8)|enabled:True|wants_pause:False]\n" % new_count

_str += FOURSPACES + "Select the larger identified objects:%s\n" % params['larger_identify_object']
_str += FOURSPACES + "Select the smaller identified objects:%s\n" % params['smaller_identify_object']
_str += FOURSPACES + "Name the tertiary objects to be identified:%s\n" % params['tertiary_object']
_str += FOURSPACES + "Shrink smaller object prior to subtraction?%s\n" % params['shrink_objects']

return _str


with open(input_pipeline) as fin:
lines = fin.readlines()

k, v = lines[4].strip().split(':')

module_count = int(v)
new_count = module_count + 1
lines[4] = k + ":%d\n" % new_count
with open("output.cppipe", "w") as f:
f.writelines(lines)
f.write(writemoi())

f.close()
</configfile>
</configfiles>

<inputs>
<expand macro="input_pipeline_param" />
<param name="larger_identify_object" label="Select the larger identified objects" type="text">
<expand macro="text_validator" />
</param>
<param name="smaller_identify_object" label="Select the smaller identified objects" type="text">
<expand macro="text_validator" />
</param>
<param name="tertiary_object" label="Name the tertiary objects to be identified" type="text">
<expand macro="text_validator" />
</param>
<param name="shrink_objects" label=" Shrink smaller object prior to subtraction?" type="select">
<option value="Yes">Yes</option>
<option value="No">No</option>
</param>
</inputs>

<outputs>
<expand macro="output_pipeline_param" />
</outputs>

<tests>
<test>
<expand macro="test_input_pipeline_param" />
<param name="larger_identify_object" value="Cells" />
<param name="smaller_identify_object" value="Nuclei" />
<param name="tertiary_object" value="Cytoplasm" />
<param name="shrink_objects" value="Yes" />
<expand macro="test_out_file" file="measure_object_intensity.cppipe" />
</test>
</tests>

<help>
<![CDATA[

.. class:: infomark

**What it does**

identifies tertiary objects (e.g., cytoplasm) by removing smaller primary objects (e.g. nuclei) from larger secondary objects (e.g., cells), leaving a ring shape.

]]>
</help>



<expand macro="citations" />

</tool>
2 changes: 1 addition & 1 deletion tools/cellprofiler/image_math.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<description>with CellProfiler</description>
<macros>
<import>macros.xml</import>
<token name="@VERSION_SUFFIX@">1</token>
<token name="@VERSION_SUFFIX@">2</token>
<xml name="image_without_multiplier" token_order="first">
<conditional name="image_or_measurement_@ORDER@">
<param name="image_or_measurement_@ORDER@" type="select" label="Image or measurement?" help="You can perform math operations or you can use a measurement for one of the operands.">
Expand Down
2 changes: 1 addition & 1 deletion tools/cellprofiler/mask_image.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

<macros>
<import>macros.xml</import>
<token name="@VERSION_SUFFIX@">1</token>
<token name="@VERSION_SUFFIX@">2</token>
</macros>

<edam_operations>
Expand Down
2 changes: 1 addition & 1 deletion tools/cellprofiler/measure_granularity.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

<macros>
<import>macros.xml</import>
<token name="@VERSION_SUFFIX@">1</token>
<token name="@VERSION_SUFFIX@">2</token>
</macros>

<edam_operations>
Expand Down
2 changes: 1 addition & 1 deletion tools/cellprofiler/measure_image_area_occupied.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

<macros>
<import>macros.xml</import>
<token name="@VERSION_SUFFIX@">1</token>
<token name="@VERSION_SUFFIX@">2</token>
</macros>

<edam_operations>
Expand Down
2 changes: 1 addition & 1 deletion tools/cellprofiler/measure_image_intensity.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

<macros>
<import>macros.xml</import>
<token name="@VERSION_SUFFIX@">1</token>
<token name="@VERSION_SUFFIX@">2</token>
</macros>

<edam_operations>
Expand Down
2 changes: 1 addition & 1 deletion tools/cellprofiler/measure_image_quality.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

<macros>
<import>macros.xml</import>
<token name="@VERSION_SUFFIX@">1</token>
<token name="@VERSION_SUFFIX@">2</token>
<xml name="macro_calc_threshold">
<conditional name="con_use_all_methods">
<param name="use_all_methods" type="select" display="radio" label="Use all thresholding methods?">
Expand Down
2 changes: 1 addition & 1 deletion tools/cellprofiler/measure_object_intensity.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

<macros>
<import>macros.xml</import>
<token name="@VERSION_SUFFIX@">1</token>
<token name="@VERSION_SUFFIX@">2</token>
</macros>

<edam_operations>
Expand Down
2 changes: 1 addition & 1 deletion tools/cellprofiler/measure_object_size_shape.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

<macros>
<import>macros.xml</import>
<token name="@VERSION_SUFFIX@">1</token>
<token name="@VERSION_SUFFIX@">2</token>
</macros>

<edam_operations>
Expand Down
2 changes: 1 addition & 1 deletion tools/cellprofiler/measure_texture.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

<macros>
<import>macros.xml</import>
<token name="@VERSION_SUFFIX@">1</token>
<token name="@VERSION_SUFFIX@">2</token>
<xml name="measureImgObj">
<repeat name="rpt_obj_to_measure" title="new object" min="1">

Expand Down
2 changes: 1 addition & 1 deletion tools/cellprofiler/overlay_outlines.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<description>with CellProfiler</description>
<macros>
<import>macros.xml</import>
<token name="@VERSION_SUFFIX@">1</token>
<token name="@VERSION_SUFFIX@">2</token>
<xml name="non_blank">
<param name="image_to_outline" type="text" label="Enter the name of image on which to display outlines" >
<help>
Expand Down
2 changes: 1 addition & 1 deletion tools/cellprofiler/relate_objects.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<description>with CellProfiler</description>
<macros>
<import>macros.xml</import>
<token name="@VERSION_SUFFIX@">1</token>
<token name="@VERSION_SUFFIX@">2</token>
<xml name="distToOtherParents">
<conditional name="con_other_parent_dist">
<param name="calc_dist_to_others" label="Calculate distances to other parents?" display="radio" type="select">
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,82 @@
CellProfiler Pipeline: http://www.cellprofiler.org
Version:3
DateRevision:319
GitHash:
ModuleCount:5
HasImagePlaneDetails:False

Images:[module_num:1|svn_version:\'Unknown\'|variable_revision_number:2|show_window:False|notes:\x5B\'To begin creating your project, use the Images module to compile a list of files and/or folders that you want to analyze. You can also specify a set of rules to include only the desired files in your selected folders.\'\x5D|batch_state:array(\x5B\x5D, dtype=uint8)|enabled:True|wants_pause:False]
:
Filter images?:Images only
Select the rule criteria:and (extension does isimage) (directory doesnot startwith ".")

Metadata:[module_num:2|svn_version:\'Unknown\'|variable_revision_number:4|show_window:False|notes:\x5B\'The Metadata module optionally allows you to extract information describing your images (i.e, metadata) which will be stored along with your measurements. This information can be contained in the file name and/or location, or in an external file.\'\x5D|batch_state:array(\x5B\x5D, dtype=uint8)|enabled:True|wants_pause:False]
Extract metadata?:Yes
Metadata data type:Text
Metadata types:{}
Extraction method count:1
Metadata extraction method:Extract from file/folder names
Metadata source:File name
Regular expression to extract from file name:(?P<field1>.*)_(?P<field2>[a-zA-Z0-9]+)_(?P<field3>[a-zA-Z0-9]+)_(?P<field4>[a-zA-Z0-9]+)
Regular expression to extract from folder name:(?P<folderField1>.*)
Extract metadata from:All images
Select the filtering criteria:and (file does contain "")
Metadata file location:
Match file and image metadata:[]
Use case insensitive matching?:No

NamesAndTypes:[module_num:3|svn_version:\'Unknown\'|variable_revision_number:8|show_window:False|notes:\x5B\'The NamesAndTypes module allows you to assign a meaningful name to each image by which other modules will refer to it.\'\x5D|batch_state:array(\x5B\x5D, dtype=uint8)|enabled:True|wants_pause:False]
Assign a name to:Images matching rules
Select the image type:Grayscale image
Name to assign these images:DNA
Match metadata:[]
Image set matching method:Order
Set intensity range from:Image metadata
Assignments count:1
Single images count:0
Maximum intensity:255.0
Process as 3D?:No
Relative pixel spacing in X:1.0
Relative pixel spacing in Y:1.0
Relative pixel spacing in Z:1.0
Select the rule criteria:and (file does startwith "im")
Name to assign these images:DNA
Name to assign these objects:Cell
Select the image type:Grayscale image
Set intensity range from:Image metadata
Select the image type:Grayscale image
Maximum intensity:255.0

Groups:[module_num:4|svn_version:\'Unknown\'|variable_revision_number:2|show_window:False|notes:\x5B\'The Groups module optionally allows you to split your list of images into image subsets (groups) which will be processed independently of each other. Examples of groupings include screening batches, microtiter plates, time-lapse movies, etc.\'\x5D|batch_state:array(\x5B\x5D, dtype=uint8)|enabled:True|wants_pause:False]
Do you want to group your images?:Yes
grouping metadata count:1
Metadata category:field1

IdentifySecondaryObjects:[module_num:5|svn_version:\'Unknown\'|variable_revision_number:13|show_window:True|notes:\x5B\'Identify whole cells from a cytoplasm/membrane image using nuclei as seeds.\'\x5D|batch_state:array(\x5B\x5D, dtype=uint8)|enabled:True|wants_pause:False]
Select the input objects:Nuclei
Name the objects to be identified:Cells
Select the method to identify the secondary objects:Propagation
Select the input image:Cytoplasm
Number of pixels by which to expand the primary objects:10
Regularization factor:0.0800
Discard secondary objects touching the border of the image?:Yes
Discard the associated primary objects?:Yes
Name the objects to be identified:TestName
Fill holes in identified objects?:Yes
Threshold settings version:10
Threshold strategy:Adaptive
Thresholding method:Otsu
Threshold smoothing scale:1.5000
Threshold correction factor:1.000
Lower and upper bounds on threshold:0.0000,1.0000
Manual threshold:0.0
Select the measurement to threshold with:None
Two-class or three-class thresholding?:Three classes
Assign pixels in the middle intensity class to the foreground or the background?:Foreground
Size of adaptive window:50
Lower outlier fraction:0.05
Upper outlier fraction:0.05
Averaging method:Mean
Variance method:Standard deviation
# of deviations:2.00
Thresholding method:Otsu
Loading
Loading