Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

added imaging tutorial #1534

Merged
merged 29 commits into from
Aug 13, 2019
Merged

added imaging tutorial #1534

merged 29 commits into from
Aug 13, 2019

Conversation

ThomasWollmann
Copy link

No description provided.

Copy link
Member

@shiltemann shiltemann left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yay for an imaging topic, awesome!

If you could think of some question boxes for learners maybe that could be great? Just to get them to think about the outputs and what they are doing, and to check if they understood the most important points.

and could you add a workflow file? :)

topics/imaging/tutorials/imaging-introduction/tutorial.md Outdated Show resolved Hide resolved
topics/imaging/tutorials/imaging-introduction/tutorial.md Outdated Show resolved Hide resolved
topics/imaging/tutorials/imaging-introduction/tutorial.md Outdated Show resolved Hide resolved

# Getting data

The dataset required for this tutorial contains a screen of DAPI stained HeLa nuclei ([more information](https://zenodo.org/record/3358874#.XUQ9oi1XZUM)). We will use a sample image from this dataset for training basic imaging skills in Galaxy.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you give a bit more of an introduction/motivation? what are these images? what is the research/biological question we are trying to answer in this tutorial?

Copy link
Author

@ThomasWollmann ThomasWollmann Aug 2, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This tutorial is just introductory to image handling there is no research/biological question. "We will use a sample image from this dataset for training basic imaging skills in Galaxy."

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it doesn't have to be much, even if it is just "we have an image of cells and want to detect the nuclei and segment the image"

just a thought, is it possible to add a step at the end that counts the number of cells? because that would be a neat little result maybe (but no worries if not possible)

topics/imaging/tutorials/imaging-introduction/tutorial.md Outdated Show resolved Hide resolved
@shiltemann
Copy link
Member

I just ran through the tutorial, it was fun, thanks!

  • I would maybe add some of the png image outputs to the manual, they are cool, and if people don't have time to finish or if they mess up, then they can at least see the output they were supposed to get, what do you think?

  • The input dataset is large (500Mb) and we only use one image (2.6Mb) from it, could we just upload the single file to zenodo? or if unzipping is something you want to teach them, maybe just create a zip file with only that image and possibly one or two others? it will save some time on import and some disk space on the server

  • Please still add a workflow file btw (since I just performed the tutorial I could extract it from my history too if you prefer)

again, very cool, thanks a lot!

@ThomasWollmann
Copy link
Author

ThomasWollmann commented Aug 2, 2019

I just ran through the tutorial, it was fun, thanks!

  • I would maybe add some of the png image outputs to the manual, they are cool, and if people don't have time to finish or if they mess up, then they can at least see the output they were supposed to get, what do you think?

Yes this would be nice! Since, you already have the result images you can maybe just upload them :)

  • The input dataset is large (500Mb) and we only use one image (2.6Mb) from it, could we just upload the single file to zenodo? or if unzipping is something you want to teach them, maybe just create a zip file with only that image and possibly one or two others? it will save some time on import and some disk space on the server

Soon, I will add a second tutorial, which is using the whole dataset and should be teached along with this tutorial. Therefore, I think we can just keep the large dataset. Also makes sense to teach people from the beginning that imaging datasets are often not just single files.

  • Please still add a workflow file btw (since I just performed the tutorial I could extract it from my history too if you prefer)

Would be nice if you can add it, since you have it already. Thank you in advance!

again, very cool, thanks a lot!

You're welcome! Also checkout https://www.denbi.de/training/73-microscopy-image-analysis-course were we will teach a whole course on microscopy imaging and hopefully will use this workflow.

@shiltemann
Copy link
Member

@ThomasWollmann ok, no problem, I will add the images and workflow on Monday :)

and cool about the workshop! have a great weekend!

@shiltemann
Copy link
Member

Hi @ThomasWollmann I added the images and workflow, could you please check if it looks ok to you?

In the final image, I get a yellow label of 65535 on the image, is that meant to happen or did I do something wrong somewhere? and if not, maybe explain what this label signifies?

> - {% icon param-file %} *"Input Image"*: `input_smoothed_normalized` file (output of **Histogram equalization** {% icon tool %})
> - *"Output data type"*: `PNG`
> 6. Rename {% icon galaxy-pencil %} the generated file to `viz_smoothed_normalized`
> 7. Click on the {% icon galaxy-eye %} (eye) icon next to the file name, to look at the file content and compare the result with `viz_normalized`.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

here you ask them to compare the two images, could you maybe write a sentence about what they should observe (maybe under the image below)?

@ThomasWollmann
Copy link
Author

Hi @ThomasWollmann I added the images and workflow, could you please check if it looks ok to you?

In the final image, I get a yellow label of 65535 on the image, is that meant to happen or did I do something wrong somewhere? and if not, maybe explain what this label signifies?

Yes, I missed a step. I'll add it to the tutorial and then you can try again ;)

@ThomasWollmann
Copy link
Author

@shiltemann I changed the description. Can you please try it again and update the results?

> 3. **Binary 2 Label** {% icon tool %} with the following parameters to segment the image:
> - {% icon param-file %} *"Binary Image File"*: `input_segmented` file (output of **Auto Threshold** {% icon tool %})
> 4. Rename {% icon galaxy-pencil %} the generated file to `input_segmented_labeled`
> 5. **Convert image** {% icon tool %} with the following parameters to convert the image to PNG:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@ThomasWollmann was just testing this to extract the updated workflow, but this image now looks completely black, is that expected?

Copy link
Author

@ThomasWollmann ThomasWollmann Aug 6, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@shiltemann Guess this is the desired output. However, it is not nicely visible due to the low label ids. Try running histogram normalization before converting it. If this works, we can add it to the tutorial.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@ThomasWollmann ah yes, that's nicer :) I was thinking, what if we also do a Count objects step at the end, that would be a nice little result/objective maybe "here is an image, how many cells does it contain"? what do you think?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@shiltemann Nice idea. Feel free to add the result, since you already have the files in history. I'll add the text except the number.

@ThomasWollmann
Copy link
Author

@shiltemann I added the extra step and some questions regarding this issue to the tutorial. Do you think 30 minutes is too optimistic for this tutorial?

@ThomasWollmann
Copy link
Author

@shiltemann I changed the dataset and the description. I think the second tutorial is now more useful for practitioners. Please take a look!

@ThomasWollmann
Copy link
Author

@bgruening Now, the splitted dataset is small and only two subsets are required for the tutorials. This should solve the issues for EU?

@bgruening
Copy link
Member

@bgruening Now, the splitted dataset is small and only two subsets are required for the tutorials. This should solve the issues for EU?

Did you had issues? I could run the other completely. I would like to keep the old datasets and workflow for testing. I think its a cool example where we can benchmark the system.

@ThomasWollmann
Copy link
Author

ThomasWollmann commented Aug 8, 2019

@bgruening Now, the splitted dataset is small and only two subsets are required for the tutorials. This should solve the issues for EU?

Did you had issues? I could run the other completely. I would like to keep the old datasets and workflow for testing. I think its a cool example where we can benchmark the system.

I just took time. The workflow is still the same. Now I splitted the dataset into the different treatments and in the course you can actually compare phenotypes visually or apply machine learning on the extracted features.

The full dataset is still on Zenodo. I think it is a good example for preparing Galaxy for large scale imaging datasets. Keep in mind that this dataset is still very small ;)

@shiltemann
Copy link
Member

thanks a lot @ThomasWollmann :) The second tutorial looks good, I like that they also learn about workflows a bit at the same time :)

I reworked the last hands_on section of the first tutorial a bit, because using the normalized image resulted in higher IDs that overlapped in the final image and didnt look as nice

image

so please check that it all still looks ok to you :)

@ThomasWollmann
Copy link
Author

thanks a lot @ThomasWollmann :) The second tutorial looks good, I like that they also learn about workflows a bit at the same time :)

I reworked the last hands_on section of the first tutorial a bit, because using the normalized image resulted in higher IDs that overlapped in the final image and didnt look as nice

image

so please check that it all still looks ok to you :)

Hmm since the image contains many objects, we probably should not display the ids. In the overlay tool you can set "Plot Labels" to "No". I think this looks much more useful. @shiltemann What do you think?

@shiltemann Thank you for putting so much effort in improving the quality of the tutorials!

@shiltemann
Copy link
Member

shiltemann commented Aug 9, 2019

oh, that was just how it looked before, to explain why I changed it back. ..without the histogram equalization step it looks quite ok now:

image

So I just reverted to your original steps, and made the histogram equalization step an exercise to help explain the completely black looking image they get, but use the original image for the segmentation mask overlay. What do you think?

@ThomasWollmann
Copy link
Author

oh, that was just how it looked before, to explain why I changed it back. ..without the histogram equalization step it looks quite ok now:

image

So I just reverted to your original steps, and made the histogram equalization step an exercise to help explain the completely black looking image they get, but use the original image for the segmentation mask overlay. What do you think?

Sounds good! Now everything looks fine :)

@ThomasWollmann
Copy link
Author

@shiltemann @bgruening still something missing for this tutorial?

@@ -95,7 +101,7 @@ The dataset required for this tutorial contains a screen of DAPI stained HeLa nu
> 9. Rename {% icon galaxy-pencil %} the collection to `PLK1`
> 9. Upload {% icon galaxy-upload %} the following segmentation filter rules as a new pasted file (format: `tabular`):
> ```
> area eccentricity
> area eccentricity
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

that looks wrong here. the first one

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why? The file has three columns. The first column has no heading.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You are correct. I have seen two ... but it seems to be just one.

👍 from me.

@shiltemann
Copy link
Member

@shiltemann @bgruening still something missing for this tutorial?

Hi @ThomasWollmann oh, you mentioned you were planning to add more biological motivation so I thought you were still working on this

Could you just add some key_points to the tutorial metadata? just the main conclusions/take home messages you want people to remember from the tutorials.

Also: do we need to cite the person who created the dataset somehow? was it part of a publication or project we can refer to?

@ThomasWollmann
Copy link
Author

@shiltemann The data was created by Manuel Gunkel as part of de.NBI Systematic Phenotyping. I do not think that we need additional citations, since we have the zenodo record.

@ThomasWollmann
Copy link
Author

@shiltemann Now, I added some more motivation and key_points ;)

@shiltemann
Copy link
Member

@ThomasWollmann thanks! This looks great!

@ThomasWollmann
Copy link
Author

Wow, @shiltemann awesome work. Thank you for the support!

@shiltemann shiltemann merged commit f150522 into galaxyproject:master Aug 13, 2019
@shiltemann
Copy link
Member

🎉

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants