Skip to content

Error in "Loading the data and QC" Step #5

@jade-minzlaff

Description

@jade-minzlaff

Hello, thank you for creating a tool for deconvolution of Visium HD data! I was very excited to find your publication and this GitHub page. I have a VisiumHD dataset and I have a table of known cell type markers for my tissue type from a public single cell RNA seq dataset. My goal is to use these known cell type markers to assign cell type labels to all 8 um bins in my dataset, which your tool, Easydecon, looks perfect for.

My issue is that when I get to the "Loading the data and QC step", I keep getting an error about my "tissue_highres_image" file, even though it exists in the expected location, it keeps throwing an error. The only difference I can see is that my full resolution image file is a .tif file instead of the .btf file used in the example notebooks, but that doesn't seem to be the source of the error. I am using the easydecon conda environment. Please let me know if you have suggestions for me to me successfully upload my data and use EasyDecon!

A screenshot is attached, this is the code I am running:

bin_size=8
sample_id="FN706"

sdata=spatialdata_io.visium_hd("C:/Users/user/Desktop/Visium HD data/Batch1_Reanalysis_112524/analysis/spaceranger/FN706/H1-PZ6GV8J_D1_FN706_mGEXv2HD/outs/binned_outputs/",fullres_image_file="C:/Users/user/Desktop/Visium HD data/Batch1_Reanalysis_112524/analysis/spaceranger/FN706/FN706 Recut.tif",
bin_size=bin_size,dataset_id=sample_id,load_all_images=True)
sdata

and I recieve the error:


KeyError Traceback (most recent call last)
Cell In[5], line 4
1 bin_size=8
2 sample_id="FN706"
----> 4 sdata=spatialdata_io.visium_hd("C:/Users/user/Desktop/Visium HD data/Batch1_Reanalysis_112524/analysis/spaceranger/FN706/H1-PZ6GV8J_D1_FN706_mGEXv2HD/outs/binned_outputs/",fullres_image_file="C:/Users/user/Desktop/Visium HD data/Batch1_Reanalysis_112524/analysis/spaceranger/FN706/FN706 Recut.tif",
5 bin_size=bin_size,dataset_id=sample_id,load_all_images=True)
6 sdata

File c:\Users\user\miniconda3\envs\easydecon\lib\site-packages\spatialdata_io\readers\visium_hd.py:292, in visium_hd(path, dataset_id, filtered_counts_file, bin_size, bins_as_squares, fullres_image_file, load_all_images, imread_kwargs, image_models_kwargs, anndata_kwargs)
286 # hires image
287 load_image(
288 path=path / VisiumHDKeys.IMAGE_HIRES_FILE,
289 suffix="_hires_image",
290 )
291 set_transformation(
--> 292 images[dataset_id + "_hires_image"],
293 {"downscaled_hires": Identity()},
294 set_all=True,
295 )
297 # lowres image
298 load_image(
299 path=path / VisiumHDKeys.IMAGE_LOWRES_FILE,
300 suffix="_lowres_image",
301 )

KeyError: 'FN706_hires_image'

Image

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions