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

Restore image argument to Load10X_Spatial() for seurat5 #7837

Open
wants to merge 1 commit into
base: seurat5
Choose a base branch
from

Conversation

jasonratcliff
Copy link

The image argument appears to have been removed from Load10X_Spatial() upstream from the seurat5 development branch in a merge commit here. This PR fixes #7560 and resolves #7608 which note the following issues:

  1. Checking is.null(x = image) evaluates to FALSE, raising an inheritance error from:
    • if (!inherits(x = image, what = "VisiumV1"))

This might be due to a namespace conflict with the standard generic graphics::image. When image is not set to NULL in the function scope, the check evaluates to FALSE given an existing method:

% Rscript --vanilla -e 'is.null(image)' -e 'image'
[1] FALSE
function (x, ...) 
UseMethod("image")
<bytecode: 0x14c0a71f8>
<environment: namespace:graphics>
  1. Specifying an input to image (e.g., with a call to Read10X_Image) raises an unused argument error
> Load10X_Spatial(data.dir = tempdir(), image = NULL)

Error in Read10X_h5(filename = file.path(data.dir, filename), ...) (preprocessing.R#534): unused argument (image = NULL)
Show stack trace

> names(formals(Read10X_h5))
[1] "filename"        "use.names"       "unique.features"

Note

Thanks for your interest in contributing! Please make your PR to the develop branch. You can check out our wiki for the current developers guide.

I am submitting this PR directly to the seurat5 branch from an up-to-date fork instead of the develop branch, given the issue appears to be localized to the v5 development branch. Hope that is alright!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant