-
Notifications
You must be signed in to change notification settings - Fork 927
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Error with LoadXenium #8265
Comments
Hi! I'm unable to reproduce your error without the object - could you copy/paste your |
When I run traceback this is the result: > xenium.obj <- LoadXenium(path, fov = "fov")
Here's the list of present files:
|
Likely, your cell centroids file is not being converted to a data frame correctly when reading in the file; one way to check is to use |
When running debug(ReadXenium), it does give me a data file with no errors, but when I try to run data$centroids it doesn't seem to exist.
When running just the centroids section of code:
Browse[2]> if (has_dt) {
debug at #2: cell_info <- as.data.frame(data.table::fread(file.path(data.dir,
Browse[3]> cell_info <- read.csv(file.path(data.dir, "cells.csv.gz"))
Browse[3]> pcents(type = "finish") The same thing happens with segmentation:
debug at #2: cell_boundaries_df <- as.data.frame(data.table::fread(file.path(data.dir, But if I run the same code outside of the block - (each line individually) I can load in cell_boundaries_df
Browse[4]> names(cell_boundaries_df) <- c("cell", "x", "y") Any thoughts? |
@SarahE97 which
|
You are probably reading recent Xenium data. The When you remove this: if("Blank Codeword" %in% names(data$matrix))
xenium.obj[["BlankCodeword"]] <- CreateAssayObject(counts = data$matrix[["Blank Codeword"]])
else
xenium.obj[["BlankCodeword"]] <- CreateAssayObject(counts = data$matrix[["Unassigned Codeword"]])
from the |
@alikhuseynov |
@veldsla
|
Ok, so data it not the problem then. I think that there might be a bug.
|
@alikhuseynov data %>% str
|
ok, thanks. The good news is that it does seem to read what is needed, but for some reason it stores each variable as vector. So, there is definitely a bug. I'm not from Seurat develop team, but I can take a look tomorrow to see if there can be a quick fix. the
|
I think the bug is using |
@alikhuseynov |
no problem :) |
I can confirm that this was also an issue on my end. I totally forgot about having changed it as well. |
..see issue satijalab#8265
just did a PR to fix that. |
Thanks so much to all of you for the suggestions, unfortunately I tried adding simplify = FALSE, and got some different errors: This is my fix (ReadXenium) code: This is the error I get:
when I rerun with debug: |
|
@alikhuseynov thanks for the help on this! I added on a quick one liner here that will fix an issue that this will eventually hit (unrelated to the Once it merges then @SarahE97 can [edit] merged, so feel free to install from alikhuseynov's branch and you should be good to go until this lands in a Seurat release! |
Thanks @jsicherman, just merged that. Then users are all set 😊 |
It worked!!! Thank you all SO much. Really really appreciate it, you all are the best :) |
I ran 2 different xenium runs and when trying to use the LoadXenium function to create a seurat object, one of them works great, the other responds with this error:
Any ideas where I can start troubleshooting it? Is it possibly a data issue?
Thanks
The text was updated successfully, but these errors were encountered: