scverse / squidpy

Spatial Single Cell Analysis in Python
https://squidpy.readthedocs.io/en/stable/
BSD 3-Clause "New" or "Revised" License
403 stars 73 forks source link

Reading in MERSCOPE sample data with squidpy.read.vizgen() doesn't work for every dataset? #686

Open Laura-Waechter opened 1 year ago

Laura-Waechter commented 1 year ago

Dear all, I tried to follow this workflow (https://squidpy.readthedocs.io/en/stable/external_tutorials/tutorial_vizgen_mouse_liver.html) for the Human Liver cancer dataset (https://info.vizgen.com/ffpe-showcase) instead. But when using squidpy.read.vizgen(), the obsm and var from the AnnData object are only filled with NaN, despite the documents containing the same information as the mouse liver dataset. Did anyone have this problem before and knows how to solve it? Thanks very much in advance!

giovp commented 1 year ago

hi @Laura-Waechter ,

could you try to install form main? pip install git+https://github.com/scverse/squidpy@main

let me know if it works,

Laura-Waechter commented 1 year ago

Thanks for your fast reply @giovp . I now tried to install it the way you suggested, but the matrix is still empty...

giovp commented 1 year ago

can you try with #679 ?

Laura-Waechter commented 1 year ago

I replaced the code of the function with this: coords = coords.astype("str") coords.index = coords.index.astype(adata.obs.index.dtype) but that still doesn't help

dfhannum commented 1 year ago

This issue should be resolved now.

giovp commented 1 year ago

it is in main, thank you again @dfhannum . Am trying to cut release asap but encountering few hiccups, but should manage to do it this week.

ghar1821 commented 8 months ago

Hi guys, I'm encountering the same issue.

The read_vizgen function in master threw me the following error:

'DataFrameView' object has no attribute '_view_args'

from this line of code in read function (line 168): adata.obs.drop(columns=["center_x", "center_y"], inplace=True)

Using the version in conda, I managed to run the function, but then the fov, volume, and center obs data is NaN.

And I'm using the Human Breast Cancer data that is publicly available on vizgen website.

parkerstevenson commented 3 months ago

Hi all, I'm still encountering this issue using squidpy.read.vizgen(), the obs from the AnnData object are only filled with NaN after changing line 164 of the squidpy.read.vizgen() function from coords.set_index(coords.index.astype("str"), inplace=True) to coords.set_index(coords.index.astype(adata.obs.index.dtype), inplace=True)

giovp commented 3 months ago

hi both, I think the version in conda is not up to date yet, so please use the pip installable version