Coder Social home page Coder Social logo

Comments (7)

lewlin avatar lewlin commented on June 7, 2024 1

The file contains the coordinates of each cells (center): to obtain that, the cells needs to be segmented in the histological image. To my knowledge, the file has no SpaceRanger analogue. A simple way to segment by yourself is to use the software ilastik (publicly available) on your H&E/Nissl stained image.

You cannot bypass this step if you want to deconvolve your Visium data using Tangram (because you need to tell the method how many cells are contained in each voxel). But you can circumvent this step if you simply want to perform a probabilistic mapping (for example, for correcting dropouts): in this case you can estimate the density "by eye" or use a public source such as the Blue Brain Cell Atlas (in our paper we treat both cases).

from tangram.

lewlin avatar lewlin commented on June 7, 2024

Hi Cartal,

First: I updated all the links. Please pull from repo and find updated notebook and README file. The Allen1_cell_centroids file contains the centroids of each cell to be superimposed to the histological image. That is a result of out segmentation. You can download the file here:

https://storage.googleapis.com/tommaso-brain-data/tangram_demo/Allen-Visium_Allen1_cell_centroids.pkl

Please do not hesitate to ask more questions if I am not being clear.

from tangram.

cartal avatar cartal commented on June 7, 2024

Thanks for the quick reply!

Ok, so I understand what is the file now. But then my question is, which is the equivalent file from a SpaceRanger run? And, do I need this file if I haven't done any segmentation? Could I bypass it?

Many thanks

from tangram.

cartal avatar cartal commented on June 7, 2024

Thanks so much! This has been super useful!

from tangram.

sokratiag avatar sokratiag commented on June 7, 2024

Hi,

I would also like to test Tangram on Visium data (for deconvolution) but I am struggling a bit with extracting the cell centroids information from the histological image as you indicated. Did you use the 'voxel segmentation workflow' on ilastik? Would it be possible to share more info on how to extract this information? Thanks in advance!

from tangram.

ravasthi-broad avatar ravasthi-broad commented on June 7, 2024

Hello Sokratia,
Thank you for your email. No, we did not use 'voxel segmentation workflow' but below is given the process how we calculated cell centroids for each voxel using the histological visium images.
To find cell centroids you can try "pixel classification" in Ilastik. Mark the cells as one label and background as another, I would suggest using the "live updates" feature while marking the labels and continuing the process of marking until you are satisfied with the results, then you may use "4. Prediction Export" with source set as "simple segmentation" to export your result as either an HDF5 or png file and read it using python as the file would be a matrix with 2/3 unique labels with one of the labels depicting cells. You may then convert it into a binary image and process it using "skimage" package to find cell_centroids.
You may find voxel centroids in the visium gene expression anndata file.
Below is the format for the cell_centroid pickle file.
column_1: x-coordinate of the centroid of the voxel - int
column_2: y-coordinate of the centroid of the voxel - int
column_3: number of cells detected in the voxel - int
column_4: list the centroids of cells in the voxel - int

from tangram.

sokratiag avatar sokratiag commented on June 7, 2024

Thanks a lot ravasthi that was really helpful.

from tangram.

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.