Skip to content

Added compressed parameter to read_10x_mtx to support STARsolo output #3564

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

Merged
merged 6 commits into from
Apr 10, 2025

Conversation

KuthuruTejaswini
Copy link
Contributor

@KuthuruTejaswini KuthuruTejaswini commented Apr 5, 2025

  • Closes read_10x_mtx assumes mtx.gz #3541
  • Tests included or not required because: The change maintains backward compatibility and existing tests cover the functionality
  • Release notes not necessary because:

Description

This PR adds a new compressed parameter to the read_10x_mtx function to support reading uncompressed matrix files produced by tools like STARsolo.

The current implementation assumes all Cell Ranger v3+ files are gzipped (.gz), forcing users to compress STARsolo output files unnecessarily before using them with Scanpy.

Changes

  • Added a new compressed parameter (default: True) to read_10x_mtx
  • Updated the internal _read_10x_mtx function to respect this parameter

@KuthuruTejaswini
Copy link
Contributor Author

I noticed the CI check for milestone is failing. As a new contributor, I don't seem to have permissions to add labels. Could a maintainer please add the appropriate milestone or "no milestone" label? Thank you!

@Zethson
Copy link
Member

Zethson commented Apr 9, 2025

The test failures are unrelated, no worries.

Copy link
Member

@Zethson Zethson left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I didn't really see any tests related to the different versions and them being compressed. I think a test in https://github.com/scverse/scanpy/blob/main/tests/test_read_10x.py would be beneficial.

Could you please also add a release note?

@KuthuruTejaswini
Copy link
Contributor Author

Let me know if anything else is needed.

@flying-sheep flying-sheep added this to the 1.12.0 milestone Apr 10, 2025
@flying-sheep flying-sheep merged commit f11789e into scverse:main Apr 10, 2025
15 of 17 checks passed
@flying-sheep
Copy link
Member

Thanks!

selmanozleyen pushed a commit to selmanozleyen/scanpy that referenced this pull request Apr 14, 2025
…scverse#3564)

Co-authored-by: MacBook Air <[email protected]>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
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.

read_10x_mtx assumes mtx.gz
3 participants