Skip to content

Uploader improvements and misc fixes - #1326

Merged
adkinsrs merged 33 commits into
mainfrom
devel
Sep 19, 2026
Merged

adkinsrs merged 33 commits into
mainfrom
devel

Conversation

@adkinsrs

Copy link
Copy Markdown
Member

This pull request introduces several improvements and fixes across the codebase, focusing on standardizing and validating observation metadata, improving resource management for consumers, and enhancing spatial data handling. The most important changes are outlined below.

Observation Metadata Standardization and Validation

  • Replaced the old observation metadata sanitization and categorization logic in anndata_processor.py with a new _sanitize_and_flag_obs_columns method. This method standardizes and sanitizes the obs table, flags ambiguous columns (e.g., numeric columns that may be categorical), and records them in metadata.json for uploader review. The new logic is consistently applied across all supported data formats, improving downstream data quality and user experience. [1] [2] [3] [4] [5] [6] [7] [8] [9] [10] [11] [12]
  • Updated the spatial data processing pipeline to standardize and flag ambiguous observation columns before writing the Zarr store, ensuring consistency with the main AnnData processing workflow. [1] [2]

Resource Management and Reliability

  • Added documentation and example configuration for setting per-worker memory caps and RabbitMQ consumer timeouts. This prevents runaway memory usage and duplicate job processing by the projectr-consumer, improving reliability and stability of the system.

Spatial Data Handling Improvements

  • Added a zarr_path property to the SpatialHandler class, with getter and setter, to consistently manage the Zarr file path. Updated the get_adata method in analysis.py to load AnnData directly from the Zarr file, improving reliability and error handling. [1] [2] [3]
  • Ensured that Ensembl IDs in adata.var are made unique before downstream analysis in both the primary analysis pipeline and spatial data QC/embedding computation, preventing errors caused by duplicate IDs. [1] [2]

Dependency and Documentation Updates

  • Removed the unused kaleido dependency from requirements and installation scripts. [1] [2]
  • Updated Apache and systemd setup documentation for more robust and streamlined service management, including enabling new consumers and reloading the systemd daemon. [1] [2]

These changes collectively improve data integrity, reliability, and maintainability of the system.

adkinsrs and others added 30 commits September 14, 2026 10:07
…ation and enhance user experience during uploads
…a-is-categorical-or-numerical-before-upload

229 indicate if observation metadata is categorical or numerical before upload
Comment thread www/api/resources/projectr.py Fixed
Comment thread www/api/resources/projectr.py Fixed
Comment thread www/api/resources/projectr.py Fixed
Comment thread www/api/resources/projectr.py Fixed
Comment thread lib/gear/analysis.py
raise e No newline at end of file
table_path = self.zarr_path / "tables" / "table"
import anndata

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Will address later

questionable = flag_ambiguous_obs_columns(adata.obs)

metadata_file = self.staging_area / 'metadata.json'
with open(metadata_file, 'r') as f:

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Will address later

# can skip straight past that step.
metadata['obs_dtype_reviewed'] = not bool(questionable)

with open(metadata_file, 'w') as f:

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Will address later

adkinsrs and others added 3 commits September 18, 2026 23:39
…ed in path expression'

Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
…ed in path expression'

Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
…ed in path expression'

Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
@adkinsrs
adkinsrs merged commit 873a7eb into main Sep 19, 2026
6 of 7 checks passed
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.

3 participants