Skip to content

Commit

Permalink
Small updates, link fixes (#106)
Browse files Browse the repository at this point in the history
  • Loading branch information
bethac07 authored Sep 8, 2024
1 parent fe64327 commit c221a9a
Show file tree
Hide file tree
Showing 11 changed files with 32 additions and 10 deletions.
2 changes: 1 addition & 1 deletion AdvancedSegmentation/BBBC022_Analysis_Final.cppipe
Original file line number Diff line number Diff line change
Expand Up @@ -355,7 +355,7 @@ MeasureColocalization:[module_num:14|svn_version:'Unknown'|variable_revision_num
Calculate the Rank Weighted Colocalization coefficients?:Yes
Calculate the Overlap coefficients?:Yes
Calculate the Manders coefficients using Costes auto threshold?:Yes
Method for Costes thresholding:Fast
Method for Costes thresholding:Faster

MeasureObjectIntensity:[module_num:15|svn_version:'Unknown'|variable_revision_number:4|show_window:False|notes:[]|batch_state:array([], dtype=uint8)|enabled:True|wants_pause:False]
Select images to measure:ER, Mito, Hoechst, Ph_golgi, Syto
Expand Down
2 changes: 1 addition & 1 deletion AdvancedSegmentation/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,4 @@ They are fields of U2OS cells (10 sites imaged in 5 channels), and
represent 5 mock treated wells from a single 384 well plate experiment.

The download bundle for this tutorial lives in a public google drive folder:
https://drive.google.com/drive/folders/1t6h2e4ifjRISQaXvFg-Mr9mOfc0vET9C?usp=sharing
https://drive.google.com/file/d/18YB8RhfFNKZmYFBd2I0mujJNkcxxEuIZ/view?usp=sharing
Binary file modified BeginnerSegmentation/Archive_EN.zip
Binary file not shown.
Binary file modified BeginnerSegmentation/Archive_ES.zip
Binary file not shown.
Binary file modified BeginnerSegmentation/Archive_PT.zip
Binary file not shown.
Binary file modified BeginnerSegmentation/bonus_materials.zip
Binary file not shown.
Binary file not shown.
2 changes: 1 addition & 1 deletion BeginnerSegmentation/segmentation_final.cppipe
Original file line number Diff line number Diff line change
Expand Up @@ -239,7 +239,7 @@ MeasureColocalization:[module_num:14|svn_version:'Unknown'|variable_revision_num
Calculate the Rank Weighted Colocalization coefficients?:Yes
Calculate the Overlap coefficients?:Yes
Calculate the Manders coefficients using Costes auto threshold?:No
Method for Costes thresholding:Fast
Method for Costes thresholding:Faster

RelateObjects:[module_num:15|svn_version:'Unknown'|variable_revision_number:5|show_window:True|notes:['This module relates a larger "Parent object" to another smaller "Child object/s". In this case, this allows us to identify which Nucleoli belong to which Nuclei.', 'The output is a new object called NucleoliChildObjects that has all of the nucleoli belonging to a single nucleus ']|batch_state:array([], dtype=uint8)|enabled:True|wants_pause:False]
Parent objects:Nuclei
Expand Down
6 changes: 3 additions & 3 deletions Instructions_for_adding_tutorials.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,15 @@
1. Gather all the necessary files in a folder. Give the folder a descriptive name with no spaces. Note that files > 25 MB (and especially >100 MB) may not be uploadable to GitHub. If your tutorial requires large files, please do the following:
1. Add the files to a folder with a descriptive name (no spaces)
2. Zip the folder (on mac, right click > Compress...)
3. Add the .zip file to google drive in the `Outreach` > `Workshops_Webinars_Tutorials` folder on the shared g drive
3. Add the .zip file to google drive in the `Outreach` > `Workshops_Webinars_Tutorials`> `GithubLinkedTutorialFiles` folder on the shared g drive
4. Make sure the folder is public and copy the link to share the folder to use for the download link later.

2. Make a PR adding the folder of materials to the tutorial repo. In addition to the materials, please also
1) write a short description of the tutorial to add to the readme and
2) create a gif (tips on making one [here](https://docs.google.com/document/d/1G5odCSbX1fW8vReKH5ubgvWc1sIGquLisUe7t5pR7d8/edit#heading=h.kjidkmwv6jq3)) and add that gif to to the `assets` > `img` folder.
2) create a gif (tips on making one [here](https://docs.google.com/document/d/1G5odCSbX1fW8vReKH5ubgvWc1sIGquLisUe7t5pR7d8/edit#heading=h.kjidkmwv6jq3); in 2024 on Mac, Beth likes Gifski) and add that gif to to the `assets` > `img` folder.
3) add the tutorial to the `internal_use/docs/source/index.rst` file, and the index file of whatever language that tutorial is in (ie if English, `internal_use/docs/source/toc_en/index.rst`)

3. Update the readme with the description and gif. If there is an associated blogpost or video, please link that using the appropriate badge. If the tutorial is particularly geared toward beginners, add the beginner badge. If the tutorial is advanced such that a user should definitely do a beginner tutorial first, use the advanced badge.
3. Update the top-level readme with the description and gif. If there is an associated blogpost or video, please link that using the appropriate badge. If the tutorial is particularly geared toward beginners, add the beginner badge. If the tutorial is advanced such that a user should definitely do a beginner tutorial first, use the advanced badge.

## Here's an example of what the markdown looks like for the Translocation tutorial:
```
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,11 +40,11 @@ This exercise will guide you through setting segmentation parameters that will b

<img class="imggif" src="assets/img/advancedsegmentation.gif" alt="example segmentation" align="right" width="250">

<a href="https://drive.google.com/file/d/1zB6Cye3nlXN3J4oc4r32upn175v0jYg_/view?usp=sharing" target="_blank"><img src="assets/img/download-button.png" alt="Download materials" width="140px"> </a>
<a href="https://drive.google.com/file/d/1qVaQiPZKqOPEsa62lYEpm7ot3th7ADqE/view?usp=sharing" target="_blank"><img src="assets/img/download-button.png" alt="Download materials" width="140px"> </a>

En español:

<a href="https://drive.google.com/file/d/1s6GrMSBwoyu67-VCPDxz9okM518JsHHq/view?usp=sharing" target="_blank"><img src="assets/img/download-button-es.png" alt="Materiales para descargar" width="140px"></a>
<a href="https://drive.google.com/file/d/1LlmSZif9gOyn31xPLftzpJSflMukEFZU/view?usp=sharing" target="_blank"><img src="assets/img/download-button-es.png" alt="Materiales para descargar" width="140px"></a>

## Translocation

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ Cell masks were made by navigating into the image folder and then running the co
1. Open up a clean copy of CellProfiler (or run File -> New Project) and drag `bonus_1_import_masks.cppipe` into the pipeline panel.
1. Drag the `images_Illum-corrected` subfolder from the main Beginner Segmentation exercise and also the `cellpose_masks_cells` subfolder from this exercise. *Do not drag in the `cellpose_masks_nuclei` folder.*
1. Put CellProfiler into TestMode <img src="./TutorialImages/startTestMode.png" width="120"/>, open the eye icon <img src="./TutorialImages/EyeOpen.png" width="50"/> next to OverlayOutlines, and then hit <img src="./TutorialImages/Step.png" width="120"/> 3 times to create a classical segmentation and compare it with the Cellpose-generated version. You can check the settings in the OverlayOutlines module to see which outline color corresponds to which segmentation in the output.
1. Optionally, open the Workspace Viewer using <img src="./TutorialImages/WorkspaceViewer.png" width="120"/> to create easily on-the-fly customizable overlays.
1. Optionally, open the Workspace Viewer using <img src="./TutorialImages/ViewWorkspace.png" width="120"/> to create easily on-the-fly customizable overlays.
1. Hit <img src="./TutorialImages/NextImageSet.png" width="120"/> and repeat a couple of times to examine the segmentations on more images.

```{admonition} Question for you
Expand All @@ -120,7 +120,7 @@ Visualization of images and objects in the Workspace Viewer

### Bonus-to-the-Bonus - add the provided nuclear segmentations as well
1. Drag and drop the `cellpose_masks_nuclei` folder in the Images module to add the nuclear masks to the image list.
1. Go to the NamesAndTypes module and configure it so both kinds of masks can be loaded (hint: there's a duplicate button!)
1. Go to the NamesAndTypes module and configure it so both kinds of masks can be loaded (hint: there's a duplicate button you can use to make a second copy of a channel!)
- You'll probably have to modify the existing settings for loading the cell masks by changing its rule or adding a second rule. Do you understand how/why?

## **Exercise 2: Running ilastik locally or from a Docker container**
Expand Down Expand Up @@ -242,6 +242,28 @@ The output of the RunCellpose module
4. As before, using OverlayOutlines and/or the WorkspaceViewer, evaluate segmentation on a few images. Where is CellProfiler doing better, and where is Cellpose doing better?
5. Use the <img src="./TutorialImages/Info.png" width="35"> button to learn more about the different parameters you can pass to Cellpose (we don't offer all of them, but many!) - how does tweaking these affect your output? How about changing the model you're using, and/or the image you're segmenting?

### Bonus-to-the-Bonus 1 - test on a more varied data set

The data we gave you in this exercise was all very clean, and all from the negative control wells of this experiment. The [folder linked here](https://drive.google.com/file/d/10kZMhr2bVR14vMP7kG5iZGujjUI3Nn3Y/view?usp=sharing) contains images with a broader variety of phenotypes - try replacing the images in the `Images` module with this folder instead and see how well the two kinds of segmentation work in different conditions!

```{figure} ../AdvancedSegmentation/TutorialImages/Fig2.png
:width: 700
:align: center
A broader range of phenotypes can be harder to consistently account for in conducting segmentation.
```

```{tip}
You’re encouraged to explore the performance in some random images on your own (you can do this from the `Test` menu with the `Random Image Set` option), but if you find yourself consistently ending up with images that look similar you can try examining images from the following list of wells- A08, A12, B12, B18, C7, D6, D19, D22, E3. You can pick these with `Test` -> `Choose Image Set`
```

### Bonus-to-the-Bonus 2 - improve Cellpose segmentation

Based on your evaluations above, can you identify some places where additional training might help fix some issues in the Cellpose model? If you happen to have Cellpose on your computer (or want to try installing it - see Exercise 1 for a link to the official install instructions), open Cellpose with some of the `Ch1` images and see if you can train a model that will perform better.

### Bonus-to-the-Bonus 3 - test your classical segmentation skills

The classical segmentation parameters provided here are based on expert tuning from a very experienced CellProfiler user - how close can you get? Add another IdentifyPrimaryObjects module to the pipeline, tune it yourself, and then look in the workspace viewer to see how it performs, especially in the more diverse image set from Bonus-to-the-Bonus 1. Compare your parameters to the expert ones - how do they differ? Do you understand why some of these settings may have been chosen?

## What next? Want to know more about CellProfliler plugins and modules?
1. Read the [CellProfiler-plugins paper](https://pubmed.ncbi.nlm.nih.gov/37690102/)
2. Watch this [video](https://www.youtube.com/watch?v=fgF_YueM1b8) to learn how to write a module

0 comments on commit c221a9a

Please sign in to comment.