satijalab / seurat

R toolkit for single cell genomics

Home Page:http://www.satijalab.org/seurat

Repository from Github https://github.comsatijalab/seuratRepository from Github https://github.comsatijalab/seurat

LoadVizgen error

Xinyue-B opened this issue · comments

Dear Seurat team,

I have same error to issue #8956, I can't load my data. My Seurat version is 5.2.1 downloaded with @alikhuseynov 's script.

I use this code:

obj <-

LoadVizgen(data.dir = "E:/R22-07_region_0/",
fov = "merfish.test",
assay = "Vizgen",
metadata = c("volume", "fov"), # add cell volume info
type = c("segmentations", "centroids"), # type of cell spatial coord matrices
z = 3L,
add.zIndex = TRUE, # add z slice section to a cell
update.object = TRUE,
use.BiocParallel = TRUE,
workers.MulticoreParam = 14, # for 'BiocParallel' processing
min.area = 5, # minimal polygon area to use as a threshold for filtering segmentation geometries
add.molecules = TRUE, # if to add "molecules" coordinates to FOV of the object
verbose = TRUE
)

And the error said:

Error in LoadVizgen(data.dir = "E:/R22-07_region_0/", :
unused arguments (metadata = c("volume", "fov"), type = c("segmentations", "centroids"), add.zIndex = TRUE, update.object = TRUE, use.BiocParallel = TRUE, workers.MulticoreParam = 14, min.area = 5, add.molecules = TRUE, verbose = TRUE)

Then I checked the arguments in my LoadVizgen by args(LoadVizgen), and got:

function (data.dir, fov, assay = "Vizgen", z = 3L)
NULL

Could you please help me know what I can do to fix the error? Thank you for your help.

I've also checked my LoadVizgen with getAnywhere function, and got:

A single object matching ‘LoadVizgen’ was found
It was found in the following places
package:Seurat
namespace:Seurat
with value

function (data.dir, fov, assay = "Vizgen", z = 3L)
{
data <- ReadVizgen(data.dir = data.dir, filter = "^Blank-",
type = c("centroids", "segmentations"), z = z)
segs <- CreateSegmentation(data$segmentations)
cents <- CreateCentroids(data$centroids)
segmentations.data <- list(centroids = cents, segmentation = segs)
coords <- CreateFOV(coords = segmentations.data, type = c("segmentation",
"centroids"), molecules = data$microns, assay = assay)
obj <- CreateSeuratObject(counts = data$transcripts, assay = assay)
coords <- subset(x = coords, cells = intersect(x = Cells(x = coords[["segmentation"]]),
y = Cells(x = obj)))
obj[[fov]] <- coords
return(obj)
}
<bytecode: 0x0000020faa65c948>
<environment: namespace:Seurat>

You need to install PR for Vizgen as suggested here:

Thank you @alikhuseynov , I finally used v4 as the code for installing v5 didn't work. Now I can load my data!

Going to close this issue now, but please feel free to reopen with additional comments/questions!