Open sarahbonnin opened 1 year ago
Hi,
I am running into the following error:
Error: Attempting to add a different number of cells and/or features
when trying to read in a .h5seurat file.
I am creating it from h5ad, and reading it back the following way:
Convert(inh5ad, dest = "h5seurat", assay="RNA", overwrite = TRUE) data <- LoadH5Seurat(inh5seurat, assays="RNA", meta.data=FALSE, misc=FALSE)
I get a couple of warning messages, with the above mentioned error. Details:
Validating h5Seurat file Warning message: “Feature names cannot have underscores ('_'), replacing with dashes ('-')” Initializing RNA with data Warning message: “Non-unique features (rownames) present in the input matrix, making unique” Adding counts for RNA Error: Attempting to add a different number of cells and/or features Traceback: 1. LoadH5Seurat(inh5seurat, assays = "RNA", meta.data = FALSE, misc = FALSE) 2. LoadH5Seurat.character(inh5seurat, assays = "RNA", meta.data = FALSE, . misc = FALSE) 3. LoadH5Seurat(file = hfile, assays = assays, reductions = reductions, . graphs = graphs, neighbors = neighbors, images = images, . meta.data = meta.data, commands = commands, misc = misc, . tools = tools, verbose = verbose, ...) 4. LoadH5Seurat.h5Seurat(file = hfile, assays = assays, reductions = reductions, . graphs = graphs, neighbors = neighbors, images = images, . meta.data = meta.data, commands = commands, misc = misc, . tools = tools, verbose = verbose, ...) 5. as.Seurat(x = file, assays = assays, reductions = reductions, . graphs = graphs, neighbors = neighbors, images = images, . meta.data = meta.data, commands = commands, misc = misc, . tools = tools, verbose = verbose, ...) 6. as.Seurat.h5Seurat(x = file, assays = assays, reductions = reductions, . graphs = graphs, neighbors = neighbors, images = images, . meta.data = meta.data, commands = commands, misc = misc, . tools = tools, verbose = verbose, ...) 7. AssembleAssay(assay = assay, file = x, slots = assays[[assay]], . verbose = verbose) 8. SetAssayData(object = obj, slot = slot, new.data = dat) 9. SetAssayData.Assay(object = obj, slot = slot, new.data = dat) 10. stop("Attempting to add a different number of cells and/or features", . call. = FALSE)
Any idea how to fix this?
Note that my h5ad file does not have duplicated .var or .obs indices, I checked before running the convertion to h5seurat.
Thank you!
Keeping an eye on this issue!
Hi,
I am running into the following error:
when trying to read in a .h5seurat file.
I am creating it from h5ad, and reading it back the following way:
I get a couple of warning messages, with the above mentioned error. Details:
Any idea how to fix this?
Note that my h5ad file does not have duplicated .var or .obs indices, I checked before running the convertion to h5seurat.
Thank you!