missing h5 files from Zenodo
Dantferno opened this issue · 9 comments
Hi,
I would like to have a look at your spatial data, however the h5 files are missing.
Could you please add it ?
Thank you
Apologies for the slow response.
Unfortunately we can't add h5
files to the Zenodo repo without breaking the doi link to the paper. However, h5
files are available on request. Please reach out if you still need these files.
You may also be able to create a Seurat spatial object from scratch using the publicly available data using the suggestions in this thread: satijalab/seurat#2790
Hi,
I would have exactly the same request.
I'm wondering if there is a way to recover the h5 files somewhere ?
Tks !
Hi. I have searched high and low, but only found the .h5
files for two samples and it appears that we did not consistently archive the .h5
files. I think the rationale was that they were redundant because they contain exactly the same information as their MEX format equivalents. I'm curious if there are use cases where only HDF5 format will do?
In the meantime, you can load the counts and images via either Seurat's Load10X_Spatial() or Scanpy's sc.read_visium().
If you really, really need .h5
files in HDF5 format then you might be able to recreate them via pandas.HDFStore
(see this tutorial, for example) and following the file hierarchy described here: https://support.10xgenomics.com/single-cell-atac/software/pipelines/latest/advanced/h5_matrices
You can 't load counts with Load10X_Spatial() without h5 files.
Almost sure that the same with Scanpy's but can't tell 100%, not a scanpy user... Because they are based on a strict directory content.
h5 files for two samples it's fine.
My bet is that you have the Two TNBCs (1142243F and 1160920F) processed by independant lab... and that is exactly what I'm looking for. So I'm still interested to grap these two if possible.
Thank you
You're right -- Load10X_Spatial()
requires a .h5
file and this is probably the easiest way to load Visium data into Seurat.
Without the .h5
files I think you can still get the data into Seurat doing something like the following:
my_object <- CreateSeuratObject(
counts = Read10X( data.dir = '/path/to/directory/containing/matrix.mtx/etc'),
assay = 'Spatial'
)
my_image <- Read10X_Image( image.dir = 'path/to/spatial/images' )
my_image <- image[Cells(x = my_object)]
DefaultAssay(object = my_image) <- 'Spatial'
my_object[['Slice1']] <- my_image
This is approach is appropriated from the code for Load10X_Spatial()
here: https://github.com/satijalab/seurat/blob/master/R/preprocessing.R
I'll send the two h5
files that we do have via email.
You were absolutely right.
I think here there is a mistake but the whole idea is good :
my_image <- Read10X_Image( image.dir = 'path/to/spatial/images' )
my_image <- image[Cells(x = my_object)]
I ended up with :
`
print(as.character(dirname(file_tisspos)))
print(as.character(dirname(file_features)))
"/home/docker/LR/LR/bench//spatial/BreastVisiumNoH5/spatial/1160920F_spatial"
"/home/docker/LR/LR/bench//spatial/BreastVisiumNoH5/filtered_count_matrices//1160920F_filtered_count_matrix"
X <- Read10X_Image(
as.character(dirname(file_tisspos)),
image.name = "tissue_lowres_image.png",
filter.matrix = TRUE
)
# gene.column = 2 by default and that was causing an error, update to 1 for last version with gziped
my_object <- CreateSeuratObject(
counts = Read10X( data.dir = as.character(dirname(file_features)) , gene.column = 1),
assay = 'Spatial'
)
my_image <- Read10X_Image( image.dir = as.character(dirname(file_tisspos)))
image <- my_image[Cells(x = my_object)]
DefaultAssay(object = image) <- 'Spatial'
my_object[['Slice1']] <- image
Juste note that the gz in /path/to/directory/containing/matrix.mtx are not really gziped. They have the extension but are just simple file...
Thanks for your help, and the files. :)
You're welcome, and thanks for the feedback on loading the Zenodo data.
I'll make a note in the readme pointing people to this code snippet.
I'll also make a feature request for the Seurat developers to make a wrapper function that does basically this.
Hello @johnyaku, I'd be very glad if you could send me the 2 h5 files too, as I wanted to have a quick look at the data.
Thank you in advance!
maria.zopoglou@student.uibk.ac.at
Hi @johnyaku, I'm also very interessed in the 2 "h5" files you have :)
If you can share it it would be nice !
Thank you in advance
paul.alayrac@pasteur.fr