V1 prep#149
Open
parashardhapola wants to merge 47 commits into
Open
Conversation
- Added entries to .gitignore for *.egg-info, .venv, .ruff_cache, and coverage files. - Removed the coverage.xml file as it is no longer needed. - Updated pyproject.toml to include 'obstore' in optional dependencies. - Modified various files to implement prefetching of blocks for improved performance in data processing. - Introduced a new method in RNAassay for saving normalized data with optional renormalization. - Enhanced data handling in several modules to support new storage options and improve efficiency.
Cache executed myst-nb outputs under docs/.jupyter_cache so Read the Docs can build with nb_execution_mode=cache. Add local execute scripts, replace gensim LSI with TruncatedSVD, fix integrate_assays and get_markers compat, auto-compute norm stats for mapping, and resolve zarr v2 CORAL writes. Co-authored-by: Cursor <cursoragent@cursor.com>
…nhance mypy configuration and add new dependencies for development. Refactor print statements in documentation scripts for improved readability. Clean up notebook code for consistency in string formatting and function calls.
- Updated .gitignore to include test environment files and prevent unnecessary tracking. - Removed 'joblib' dependency from pyproject.toml and uv.lock to streamline requirements. - Introduced a new method in RNAassay for optimized reading of blocks from zarr arrays, improving data access efficiency. - Refactored marker statistics computation in markers.py to utilize Numba for performance gains. - Adjusted plotting functions to handle groupings more effectively and improve visual output. - Enhanced DataStore class to support memory budget configurations for better resource management during data processing.
- Introduced a new script to download bundled test datasets for CI and local development. - Updated the GitHub Actions workflow to include a step for downloading test fixtures before running tests with pytest. - The new script allows for optional downloading of specific datasets, enhancing test setup flexibility.
- Added a new function to build and compress a directory fixture for the 1K PBMC CITE-seq dataset, including matrix and feature files. - Integrated the new fixture creation into the existing download process to ensure availability for tests. - Updated test prefetching to set a resource budget for improved performance during testing.
…llel IO Replace static per-profile chunk/shard tables and one-off prefetch/thread loops with matrix_layout() and shared parallel.py primitives (map_shards, stream_shards), plus staged-normed mirroring to avoid a remote read-back.
The fixture was gitignored, so CI downloaded the stale copy from master and failed after deterministic marker sorting changed tie order. Co-authored-by: Cursor <cursoragent@cursor.com>
Avoid live notebook execution on memory-constrained builders and replace broken image substitutions with valid links. Co-authored-by: Cursor <cursoragent@cursor.com>
|
Bugbot is not enabled for your account, so this pull request was not reviewed. Enable Bugbot in the Cursor dashboard to get automatic reviews on future PRs. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Scarf 1.0 redesigns storage and I/O for local and cloud workflows, adds faster feature-wise analytics, a new plotting API, batch-aware reference mapping, stronger integration metrics, and much broader tests.
Existing Zarr v2 stores remain supported. No store conversion is required.
Quick upgrade checklist
scarf[extra].zarrand smoke-test your workflowscarf.plottingcountsTto existing v3 storesrepack_zarrEnvironment
requirements.txt+setup.pypyproject.tomlpip install scarf[extra]uv pip install scarf[extra]conda create -n scarf_v1 python=3.12 conda activate scarf_v1 uv pip install 'scarf[extra]'Dependency changes
zarr>=3.1.2,numpy>=2,numcodecs>=0.16obstore>=0.5.1dask,polars,pyarrow,joblib,importlib_metadata,gensim,cmoceanExisting Zarr stores
countsTautomatically to old stores?countsTOptional performance tools
repack_zarrwrite_counts_tcountsTto an existing v3 assayuv run python -m scarf.tools.repack_zarr old.zarr new.zarr --profile fast_local # or --profile cloudrepack_zarrdoes not automatically createcountsT.Breaking changes
dask.array.ArrayChunkedArrayNaboH5Reader/NaboH5ToZarrto_polars_dataframeto_pandas_dataframesave_normed_for_query,use_prenormed, precache kwargs__all__ThreadSynchronizerusedDask migration
Custom norm methods must be
(Assay, ChunkedArray) -> ChunkedArray.Kept names (no Dask underneath):
dask_to_zarr,show_dask_progress.Renames and deprecations
ZarrMergeAssayMergemetric_integrationmetric_label_concordancemetric_batch_mixingmetrics.integration_scoremetrics.label_concordance_scoreexclude_missing=Truemissing_feature_policy="intersection"run_coral=Trueref_mu/ref_sigmads.plot_*as primary docs pathscarf.plottingBehaviour / default changes
cell_key=None"I"cell_key="I"if neededmissing_feature_policy"zero"/"intersection"/"error"(+"reference_mean"for refs)mark_hvgs(max_cells=...)None(unlimited)np.infrun_marker_search(gene_batch_size=...)None(auto)make_graph(local_cache=...)"auto"run_pseudotime_scoring(component_policy=...)"largest"nan_cluster_valueintstrno longer allowedmagma_rfloat32ValueErrorWhen to recompute
build_mapping_referenceStorage and performance
Resource budget knobs
mem_budgetSCARF_MEM_BUDGETnthreads/ writernthreadsSCARF_WORKERSworking_copiesSCARF_WORKING_COPIESzarrProfileSCARF_ZARR_PROFILEfast_localorcloudWhat changes for new v3 writes
countsT(nFeatures, nCells)ann_idx_bytescountsTcountsT?countscountsTcountsUsed by:
gene_batch_sizecountsTfeature chunks when presentTrade-off: roughly one extra compressed copy of counts at ingest. No opt-out on new v3 writes.
Cloud support
s3://,gs://, other obstore-backed URLsstorage_options=...local_cache="auto"stages normed data locallystorage_optionsNew features
Plotting (
scarf.plotting)embeddingembedding_rasterunified_embeddingdotplot/matrixplotcomposition/distributionqc,elbow,graph_qc,highly_variable_features,marker_heatmap,cluster_tree,pseudotime_heatmapds.plot_layoutviridis#bdbdbdkminimalMapping reference + Symphony
build_mapping_referenceget_mapping_referenceMappingReference.map_queryrun_mapping(..., query_batches=...)project_mapping_layoutget_target_label_evidencecalibrate_label_transfer_thresholdDoublet detection
cluster_keysimulation_ratio1.0heterotypic_fraction0.8labeldoublet_scoreIntegration metrics
metric_label_concordancemetric_batch_mixingmetric_lisiperplexity=30)metric_silhouetteHarmony
run_harmony/fit_harmonyHarmonyResultmake_graph(..., harmony_params=...)Other notable API changes
compact_v2; old marker trees still loadcomponent_policy; stricter source/sink / regressor checkspeaks_coordsstorage_optionsann_idx_bytes; legacy filesystem index still readableBug fixes
kcomponent_policycompleteflagMappingReferencepersistenceTests and CI
scarf/teststests/pytest-xdistscarfMajor new coverage areas: Zarr/
countsT/budget/chunked/parallel, mapping + Symphony, WNN, markers, doublets, pseudotime, merge, plotting, readers/writers, metrics, Harmony/UMAP.Docs and packaging
0.32.3→1.0.0pyproject.toml, dynamicVERSION, uv lockfileImport cheat sheet