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

A memory efficient implementation of the .mtx reading function #3389

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

Conversation

gjeuken
Copy link

@gjeuken gjeuken commented Nov 28, 2024

  • Closes #
  • Tests included or not required because: test_datasets.py already implemented
  • Release notes not necessary because: This is a backend change

Pandas read_csv function is very memory intensive, and this makes loading data (especially large datasets from EBI Single Cell Expression Atlas) impossible on computers with 16gb of ram or less. The subsequent analysis of such datasets with scanpy, however, works well on such computers.

Loading the data into chunks, using the same pandas function, solves this problem.

Copy link

codecov bot commented Nov 28, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 76.50%. Comparing base (7131500) to head (fa91b73).

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #3389   +/-   ##
=======================================
  Coverage   76.50%   76.50%           
=======================================
  Files         111      111           
  Lines       12874    12877    +3     
=======================================
+ Hits         9849     9852    +3     
  Misses       3025     3025           
Files with missing lines Coverage Δ
src/scanpy/datasets/_ebi_expression_atlas.py 94.18% <100.00%> (+0.21%) ⬆️

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

Successfully merging this pull request may close these issues.

3 participants