drighelli / SpatialExperiment

55 stars 20 forks source link

Error when uploading Visium data #118

Closed martina-morchio closed 2 years ago

martina-morchio commented 2 years ago

When I try to upload 10X visium data with the following code:

se <- SpatialExperiment::read10xVisium(samples = f, type = "sparse", data = "filtered")

I get the following output Error in names(xyz) <- names(sfs) <- sids : 'names' attribute [1] must be the same length as the vector [0]

I'm sure the folder structure is correct, do you know what the issue might be?

Thank you!

drighelli commented 2 years ago

Hi @martina-boop, thanks for your message.

Are you totally sure about the folder structure? what's inside the f?

Maybe it would be more helpful to have a more reproducible example of your situation. Could you please provide the value of f and the folder tree?

Thanks, Dario

martina-morchio commented 2 years ago

Hi @drighelli, thanks for your reply!

f is the folder path to the directory f <- "./visiumTutorial/"

This is the folder tree C:. V1_Adult_Mouse_Brain_filtered_feature_bc_matrix.tar.gz V1_Adult_Mouse_Brain_spatial.tar.gz
+---filtered_feature_bc_matrix barcodes.tsv.gz features.tsv.gz matrix.mtx.gz

---spatial aligned_fiducials.jpg detected_tissue_image.jpg scalefactors_json.json tissue_hires_image.png tissue_lowres_image.png tissue_positions_list.csv

drighelli commented 2 years ago

I'm not sure if it's a requirement, but have you tried to put an outs folder inside your visiumTutorial folder?

something like: visiumTutorial/outs/

and then all the rest that you have already

we also added this to our test data because it's the standard output of spaceranger

martina-morchio commented 2 years ago

This worked! Thank you so much!!

drighelli commented 2 years ago

good, you're welcome!