Skip to content
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

spaceranger 2.0 renamed tissue_positions_list.csv to tissue_positions.csv #6392

Closed
simoncmo opened this issue Sep 8, 2022 · 1 comment
Closed
Labels
bug Something isn't working

Comments

@simoncmo
Copy link

simoncmo commented Sep 8, 2022

Hi Seurat team,

For the latest spaceranger 2.0 pipeline, 10x renamed the output tissue_positions_list.csv to tissue_positions.csv

image

Load10X_spatial failed at Read10X_Image

# insert reproducible example here
Load10X_spatial(SEURAT_OUTPUT_PATH)

Error in file(file, "rt") : cannot open the connection
6.
read.csv(file = file.path(image.dir, "tissue_positions_list.csv"),
col.names = c("barcodes", "tissue", "row", "col", "imagerow",
"imagecol"), header = FALSE, as.is = TRUE, row.names = 1)
5.
Read10X_Image(image.dir = file.path(data.dir, "spatial"), filter.matrix = filter.matrix)

At the moment I'm seeing this file name being hardcoded in preprocessing.R without a parameter to set it

Read10X_Image <- function(image.dir, image.name = "tissue_lowres_image.png", filter.matrix = TRUE, ...) {
  image <- readPNG(source = file.path(image.dir, image.name))
  scale.factors <- fromJSON(txt = file.path(image.dir, 'scalefactors_json.json'))
  tissue.positions <- read.csv(
    file = file.path(image.dir, 'tissue_positions_list.csv'),
    col.names = c('barcodes', 'tissue', 'row', 'col', 'imagerow', 'imagecol'),
    header = FALSE,
    as.is = TRUE,
    row.names = 1
  )

Could you please add an official fix to this function to make it compatible with both file names?
Thanks!!

@simoncmo simoncmo added the bug Something isn't working label Sep 8, 2022
@samuel-marsh
Copy link
Collaborator

Hi,

Not member of dev team but hopefully can be helpful. Have you tried the dev branch? There was PR from 10X team couple months ago to address this.

#6208 (comment)

Best,
Sam

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants