CellScopes.jl
CellScopes.jl copied to clipboard
subset_fov Function Fails with UndefVarError for VisiumHD Data
Dear CellScopes Team,
I encountered an error while running the subset_fov function for VisiumHD data using the following code:
df = cs.subset_fov(hd, [89,109], 26, 20)
Here is the error message I received:
UndefVarError: x_col not defined
Stacktrace: [1] subset_fov(sp::CellScopes.VisiumHDObject, fov::Vector{Int64}, n_fields_x::Int64, n_fields_y::Int64) @ CellScopes ~/.julia/packages/CellScopes/pM38e/src/spatial/sp_utils.jl:241 [2] top-level scope @ In[12]:1
While reviewing the function definition, I noticed the following line:
rename!(df, [:barcode, :pxl_row_in_fullres, :pxl_col_in_fullres] .=>> [:cell, Symbol(x_col), Symbol(y_col)])
I was wondering if perhaps the .=>> should be replaced with .=>. I am not entirely sure if this change is appropriate. This function has worked excellently with other Visium data sets, and this issue seems to be specific to VisiumHD.
Any guidance or clarification you could provide would be greatly appreciated.