-
Notifications
You must be signed in to change notification settings - Fork 612
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
updated read_visium() to read in spaceranger 2.0 files #2424
Conversation
Codecov Report
Additional details and impacted files@@ Coverage Diff @@
## master #2424 +/- ##
=======================================
Coverage 71.87% 71.87%
=======================================
Files 98 98
Lines 11496 11496
=======================================
Hits 8263 8263
Misses 3233 3233
|
10x Visium data from both space ranger 1.0.0 and 2.0.0 can be read in using space ranger 1.0.0 data from 10x plotted with squidpy's space ranger 2.0.0 data from 10x plotted with squidpy's |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@giovp feel free to approve and merge. One request first:
Can this get a release note?
sure, will do |
LGTM thanks @LLehner ! |
hi @LLehner, why is this |
hi @flying-sheep, you are right. Header should be 0, otherwise the first row with values (besides the barcode) will be turned into headers and then overwritten. Didn't catch that before, since it didn't cause issues in the plotting examples. |
Folks. Forgive my ignorance if I am completely wrong but it seems read_visium still reads it wrong. another edit: Lines 466 to 482 in 89804c2
Basically line 476 is fixes the switch and makes the barcode coordinates in (x,y). I apologise for the confusion. |
With scverse/spatialdata-io#102 we could consider replacing def read_visium(*args, **kwargs):
import spatialdata_io
return spatialdata_io.visium(*args, **kwargs).to_legacy_anndata() and avoid maintaing the annoying spaceranger output parsing in multiple locations. |
Can now read in spaceranger 2.0 files where the tissue position file name is different and a header is included. Code adapated from squidpy's read.visium() in response to scverse/squidpy#599 and scverse/scanpy#2296.