Git Product home page Git Product logo

Comments (7)

AnnaChristina avatar AnnaChristina commented on May 27, 2024

Hi @ankitbioinfo,

I created a branch for your dataloader called wang_dataloader. I already created the basic structure, but some parts need to be adjusted depending on your input.

  1. Coarseness of cell type annotation

    ncem/ncem/data.py

    Line 2702 in 7bc1b22

    cell_type_merge_dict = {

In your dataset I saw a quite granular annotation for different cell types. We currently recommend to use a cell type annotation that does not specify sub-classes as we inspected that ncem can directly infer spatially dependent sub-states.

The posted link shows a grouping logic as a dictionary to create a coarser annotation. Please feel free to adjust this if you only want to use the data_exploration section of ncem and if you are only interested in analyzing your data and not using the provided model classes.

  1. Lateral resolution and spatial omnics technique.
    Could you also provide the lateral resolution of your dataset and the spatial omnics technique of the dataset you provided? Additionally, are the x and y coordinates of your cells given in microns or pixels?

  2. Image information (optionally)
    Are your samples aquired from one image/sample or multiple ones?

Thanks!

from ncem.

ankitbioinfo avatar ankitbioinfo commented on May 27, 2024

Hi Anna,

Many thanks for creating the data loader wang_dataloader. I have installed the updated ncem now and when I use the following command

interpreter.get_data(
    data_origin='wang_dataloader',
    data_path=datadir + '/wang/',
    radius=50,
    node_label_space_id='type',
    node_feature_space_id='standard',
)

and I see no data_origin wang_dataloader. I think I am still missing something.

<bound method Estimator.get_data of <ncem.interpretation.interpreter.InterpreterGraph object at 0x7f8dac02ee20>>
---------------------------------------------------------------------------
ValueError                                Traceback (most recent call last)
<ipython-input-6-a3613e995f3e> in <module>
      1 interpreter = ncem.interpretation.interpreter.InterpreterGraph()
      2 print(interpreter.get_data)
----> 3 interpreter.get_data(
      4     data_origin='wang_dataloader',
      5     data_path=datadir + '/wang/',

~/Desktop/FabianGNN/wang_ncem/ncem/estimators/base_estimator.py in get_data(self, data_origin, data_path, radius, graph_covar_selection, node_label_space_id, node_feature_space_id, use_covar_node_position, use_covar_node_label, use_covar_graph_covar, domain_type)
    189             graph_covar_selection = []
    190         labels_to_load = graph_covar_selection
--> 191         self._load_data(
    192             data_origin=data_origin,
    193             data_path=data_path,

~/Desktop/FabianGNN/wang_ncem/ncem/estimators/base_estimator.py in _load_data(self, data_origin, data_path, radius, label_selection)
    136             ]
    137         else:
--> 138             raise ValueError(f"data_origin {data_origin} not recognized")
    139 
    140         self.data = DataLoader(data_path, radius=radius, label_selection=label_selection)

ValueError: data_origin wang_dataloader not recognized

from ncem.

AnnaChristina avatar AnnaChristina commented on May 27, 2024

Hi @ankitbioinfo,

the dataloader is still in development as we haven't pushed it to the main branch yet.

We first need to clarify the above mentioned three points before I can merge the pull request to release and then with the newest update it will be included.

Could we provide information to the points 1.-3. from my note above? Thank you!

from ncem.

ankitbioinfo avatar ankitbioinfo commented on May 27, 2024

Hi @AnnaChristina

(1) I am not sure whether subclasses of cell types can be inferred because as such no clear marker exist in the gene datset.
If ncem can predict the subclasses of coarser cell types it would be great so whatever you have mentioned in the data.py
it is okay.
(2) The spatial omics technique here is MERFISH and the lateral resolution is 107.9 nm per pixel. The coordinates are in microns.
(3) The samples are from multiple fovs but from one sample.
Thank you.

from ncem.

AnnaChristina avatar AnnaChristina commented on May 27, 2024

Hi @ankitbioinfo, thanks for clarifying. Regarding 3): Do you also have a column in your dataset that gives the fov id?

I am asking because we frequently inspected that adding the fov as covariate to ncem can enhance prediction.

from ncem.

ankitbioinfo avatar ankitbioinfo commented on May 27, 2024

Hi @AnnaChristina, I thought FOV ids are not helpful. So I did not mention in nuclei_data_table.xlsx file.
I uploaded the updated one in the following dropbox link. Thanks for helping me to figure it out.
https://www.dropbox.com/scl/fi/thlcj3mfpygfht81lhaez/nuclei_data_table1.xlsx?dl=0&rlkey=6xpyp4a9n5pqxwq2dk3otlzjv

from ncem.

AnnaChristina avatar AnnaChristina commented on May 27, 2024

Hi @ankitbioinfo,

we added a dataloader for your dataset. It will be available with the newest release of ncem version 0.3.1

You can already find an initial analysis here.

from ncem.

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.