Giter Club home page Giter Club logo

Comments (9)

dganguli avatar dganguli commented on May 31, 2024

One particular place in the code that needs 3D support is here: https://github.com/chanzuckerberg/starfish/blob/master/starfish/assign.py

The goal of this function is to assign 'spots' to 'cells'. The algorithm is a 2D point in polygon method based on ray tracing. This algorithm does not generalize readily to 3D data. What should the proper 3D implementation be?

from starfish.

tractatus avatar tractatus commented on May 31, 2024

Do you actually need point in polygon for assignment in 3D? It assumes that your polygon perfectly represents the cell which it hardly will so lots of transcripts that strictly do not meet the point-in-polygon requirements will be left out.

I have several examples of FISSEQ (2000-4000 amplicons per cell) with z-stack 30 steps (can share one FOV to the example data for this package if desirable). My current reasoning is however that affinity propagation clustering solves this better than point-in-polygon in 3D as well as 2D since for cases where the provided polygon is not a perfect description of the cell transcripts will be correctly assigned and also given a probability of membership to that cell.

The reason for why the probability of membership is important is because cross-linking of amplicons to tissue is not always perfect resulting in transcripts "floating around" in the tissue. If using strict point-in-polygon algorithm you will get high Poisson shot noise in your counts per cell making the analysis of low-expressing genes difficult. Being able to give different weight to transcripts based on the probability of membership is desirable.

Affinity propagation clustering:
http://www.psi.toronto.edu/affinitypropagation/FreyDueckScience07.pdf
http://scikit-learn.org/stable/modules/generated/sklearn.cluster.AffinityPropagation.html

Now a point in polygon for 3D could be nice for other reasons and probably easiest to start with one for convex polyhedrons only.

from starfish.

ambrosejcarr avatar ambrosejcarr commented on May 31, 2024

#261 touches on some ideas that we could incorporate here.

from starfish.

ttung avatar ttung commented on May 31, 2024

@dganguli can you break this up into issues for specific algorithms?

from starfish.

neuromusic avatar neuromusic commented on May 31, 2024

After consultation with @shanaxel42 and @ttung, proposing the following...

Let's make sure that we support 3D where underlying algorithms support 3D, but we shouldn't develop new 3D algorithms.

Practically, as of 0.1.9, that means the following...

Target assignment and segmentation need 3D support, but we should NOT try to upgrade the 2D spot finders.

Then we close this issue :D

from starfish.

ttung avatar ttung commented on May 31, 2024

Which spotfinders are 2D and are the underlying algorithms also 2D-only?

from starfish.

neuromusic avatar neuromusic commented on May 31, 2024

LocalMaxPeakFinder, which wraps the 2D skimage.feature.peak_local_max

https://spacetx-starfish.readthedocs.io/en/latest/api/spots/index.html#starfish.spots.FindSpots.LocalMaxPeakFinder

from starfish.

neuromusic avatar neuromusic commented on May 31, 2024

Thanks to @ttung for diving in and noting that I was wrong about LocalMaxPeakFinder (silly me for relying on our docs).

Details here: #1679

from starfish.

neuromusic avatar neuromusic commented on May 31, 2024

note from @ttung : waiting for skimage release

from starfish.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.