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

Remove super-expressing cells from analysis? #45

Closed
jstitlow opened this issue Mar 17, 2021 · 2 comments
Closed

Remove super-expressing cells from analysis? #45

jstitlow opened this issue Mar 17, 2021 · 2 comments

Comments

@jstitlow
Copy link

Super-expressing cells are slowing down the analysis and I'm not confident that they are being quantified accurately.

Any ideas on how to remove these cells from the quantification within bigfish?

My thought would be to have a segment-first mode where you segmented the cells first, and then run spot detection on each cell individually. But I don't know how much this would slow things down.

The super-expressing cells could then be treated as one big cluster, and then the number of spots could be estimated based on integrated density of an average single spot.

image

Is this problem too obscure?

@muellerflorian
Copy link
Member

Hi Josh,

your problem doesn't sound obscure. the proposed solution is also interesting. however, big-fish is currently designed to detect spots in the entire image and will then assign them to cells in an (optional) postprocessing step.

i think that inversing the process would require a substantial reorganization of the code, which will be difficult.

another angle would be to understand why the code is so slow (your issue #44). if we could solve this, we could remove highly expressing cells during the post-processing step.

So I would propose that we focus on this first.

@Henley13
Copy link
Member

Hi @jstitlow ,

In addition to @muellerflorian's comment, if you do not provide a 'threshold' parameter for your spot detection, the algorithm will try to find one automatically and this process works better with multiple spots in the frame. If you run spot detection cell by cell there is a risk that the threshold automatically set won't be accurate enough (if there are not enough spots in the cell).

Otherwise, one quick solution to test would be to:

  1. Segment cells.
  2. Loop over cell instances.
  3. for each instance, mask out every other cells in your filtered FISH channel (set pixels to 0).
  4. for each instance, run spot detection.

@Henley13 Henley13 closed this as completed Feb 5, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants