From e1925de4b1684bd39683022388659b67a7147b8d Mon Sep 17 00:00:00 2001 From: sugan89 Date: Tue, 6 Feb 2024 10:49:26 -0500 Subject: [PATCH] Updated the documentation and the code (else statements) --- active_plugins/runilastik.py | 16 ++++++++-------- .../supported_plugins.md | 3 +-- 2 files changed, 9 insertions(+), 10 deletions(-) diff --git a/active_plugins/runilastik.py b/active_plugins/runilastik.py index d287a2c..8f5499d 100644 --- a/active_plugins/runilastik.py +++ b/active_plugins/runilastik.py @@ -59,13 +59,14 @@ A note to the mac users - this module takes a longer time to run using the Docker. -The Docker that is used to run this module can be found here - https://hub.docker.com/layers/biocontainers/ilastik/1.4.0_cv2/images/sha256-0ccbca62d9efc63918d9de3b9b2bb5b1265a084f8b6410fd8c34e62869549791?context=explore +Links to the Docker containers, + biocontainers/ilastik:1.4.0_cv2 - https://hub.docker.com/layers/biocontainers/ilastik/1.4.0_cv2/images/sha256-0ccbca62d9efc63918d9de3b9b2bb5b1265a084f8b6410fd8c34e62869549791?context=explore + ilastik/ilastik-from-binary:1.4.0b13 - https://hub.docker.com/layers/ilastik/ilastik-from-binary/1.4.0b13/images/sha256-e3a4044a5ac6f2086f4bf006c8a95e2bd6a6fbfb68831bb4ba47baf2fafba988?context=explore """ -#Link to the ilastik biocontainer. We should make changes in the module such that the user will be able to choose any ilastik docker they would like. #ILASTIK_DOCKER is a dictionary where the keys are the names of the different docker containers and the values are the commands that are needed to run the respective docker container. ILASTIK_DOCKER = {"biocontainers/ilastik:1.4.0_cv2":'/opt/ilastik-1.4.0-Linux/run_ilastik.sh','ilastik/ilastik-from-binary:1.4.0b13':'./run_ilastik.sh', "select your own":''} -#Another container that did not work - {'ilastik/ilastik-from-source:0.0.1a1':'. ~/.bashrc && python ilastik.py'} +#Docker container that did not work - {'ilastik/ilastik-from-source:0.0.1a1':'. ~/.bashrc && python ilastik.py'} class Runilastik(ImageProcessing): @@ -169,8 +170,7 @@ def visible_settings(self): if self.docker_choice == "select your own": vis_settings += [self.custom_docker_name, self.docker_executable] - - if self.docker_or_local.value == "Local": + else: vis_settings += [self.executable] vis_settings += [self.x_name, self.y_name, self.project_file, self.project_type] @@ -186,7 +186,7 @@ def validate_module_warnings(self, docker_or_local): "Analysis mode will take a long time to run using Docker", self.docker_or_local, ) - if self.docker_or_local.value == "Local": + else: if self.executable.value[-4:] == ".exe": raise ValidationError( "Sorry, analysis will not run on Windows with the local installation of the ilastik. Please try Docker instead.", @@ -240,7 +240,7 @@ def run(self, workspace): ILASTIK_DOCKER_choice = self.custom_docker_name.value ILASTIK_command = self.docker_executable.value - if not self.docker_choice.value == "select your own": + else: ILASTIK_DOCKER_choice = self.docker_choice.value ILASTIK_command = ILASTIK_DOCKER[ILASTIK_DOCKER_choice] @@ -248,7 +248,7 @@ def run(self, workspace): "-v", f"{model_directory}:/model", f"{ILASTIK_DOCKER_choice}", f"{ILASTIK_command}", "--headless", "--project", f"/model/{os.path.basename(model_file)}" - ] # '"/opt/ilastik-1.4.0-Linux/run_ilastik.sh"' this command is specific to the ilastik biocontainer + ] if self.docker_or_local.value == "Local": diff --git a/documentation/CP-plugins-documentation/supported_plugins.md b/documentation/CP-plugins-documentation/supported_plugins.md index eca59a6..ed80c60 100644 --- a/documentation/CP-plugins-documentation/supported_plugins.md +++ b/documentation/CP-plugins-documentation/supported_plugins.md @@ -20,9 +20,8 @@ Those plugins that do have extra documentation contain links below. | HistogramEqualization | HistogramEqualization increases the global contrast of a low-contrast image or volume. Histogram equalization redistributes intensities to utilize the full range of intensities, such that the most common frequencies are more distinct. This module can perform either global or local histogram equalization. | No | | N/A | | HistogramMatching | HistogramMatching manipulates the pixel intensity values an input image and matches them to the histogram of a reference image. It can be used as a way to normalize intensities across different 2D or 3D images or different frames of the same 3D image. It allows you to choose which frame to use as the reference. | No | | N/A | | PixelShuffle | PixelShuffle takes the intensity of each pixel in an image and randomly shuffles its position. | No | | N/A | -| Predict | Predict allows you to use an ilastik pixel classifier to generate a probability image. CellProfiler supports two types of ilastik projects: Pixel Classification and Autocontext (2-stage). | No | | N/A | | [RunCellpose](RunCellPose.md) | RunCellpose allows you to run Cellpose within CellProfiler. Cellpose is a generalist machine-learning algorithm for cellular segmentation and is a great starting point for segmenting non-round cells. You can use pre-trained Cellpose models or your custom model with this plugin. You can use a GPU with this module to dramatically increase your speed/efficiency. | Yes | `cellpose` | Yes | -| Runilastik | Runilasitk allows to run ilastik within CellProfiler. You can use pre-trained ilastik projects/models to predict the probability of your input images.| Yes | | Yes | +| Runilastik | Runilasitk allows to run ilastik within CellProfiler. You can use pre-trained ilastik projects/models to predict the probability of your input images. The plugin supports two types of ilastik projects: Pixel Classification and Autocontext (2-stage).| Yes | | Yes | | RunImageJScript | RunImageJScript allows you to run any supported ImageJ script directly within CellProfiler. It is significantly more performant than RunImageJMacro, and is also less likely to leave behind temporary files. | Yes | `imagejscript` , though note that conda installation may be preferred, see [this link](https://py.imagej.net/en/latest/Install.html#installing-via-pip) for more information | No | | RunOmnipose | RunOmnipose allows you to run Omnipose within CellProfiler. Omnipose is a general image segmentation tool that builds on Cellpose. | Yes | `omnipose` | No | | RunStarDist | RunStarDist allows you to run StarDist within CellProfiler. StarDist is a machine-learning algorithm for object detection with star-convex shapes making it best suited for nuclei or round-ish cells. You can use pre-trained StarDist models or your custom model with this plugin. You can use a GPU with this module to dramatically increase your speed/efficiency. RunStarDist is generally faster than RunCellpose. | Yes | `stardist` | No |