Skip to content

Seurat uploader fixes + more spatial viewer stuff - #1311

Merged
adkinsrs merged 3 commits into
mainfrom
devel
Aug 10, 2026
Merged

Seurat uploader fixes + more spatial viewer stuff#1311
adkinsrs merged 3 commits into
mainfrom
devel

Conversation

@adkinsrs

Copy link
Copy Markdown
Member

This pull request focuses on improving error handling, user feedback, and code robustness across several modules related to dataset upload, processing, and visualization. The most significant changes include replacing abrupt process exits with exceptions, providing more informative error messages, and improving logging for debugging and user communication.

Error handling and robustness improvements:

  • Replaced sys.exit() calls with appropriate exceptions (e.g., ImportError, ValueError) in lib/gear/seuratuploader.py to allow for better error propagation and handling in upstream code. [1] [2]
  • Added try/except blocks to catch and report errors when reading RDS files, writing h5ad files, and processing reductions, ensuring users receive clear feedback and making failures easier to debug. [1] [2] [3]
  • Updated process_seurat in www/cgi/process_uploaded_expression_dataset.cgi to handle missing share UIDs and conversion errors gracefully, writing status updates and error messages for the user interface. [1] [2]

User feedback and logging:

  • Improved error reporting in the UI by ensuring error messages from backend processing are surfaced to the user, both in the backend status and in the frontend display logic in www/js/upload_dataset.js.
  • Enhanced logging and error traceability for image extraction in www/api/resources/spatialpanel.py, including writing tracebacks to a log file and cleaning up error logs on success.

API and argument parsing improvements:

  • Updated argument parsing in www/api/resources/tsne_data.py to specify the location="json" for boolean and dictionary arguments, ensuring correct extraction of parameters from JSON requests.

Minor code and documentation updates:

  • Removed the unused generate_spatial_image_df function and its docstring from spatialpanel.py for code clarity.
  • Added a TODO note to check for valid RDS objects in store_expression_dataset.cgi.
  • Added missing imports (datetime, traceback) for improved error handling.

These changes collectively improve the reliability, maintainability, and user experience of the dataset upload and processing pipeline.

…ort errors, add detailed error messages for RDS reading and writing, and validate Share UID in process_seurat function.
@adkinsrs
adkinsrs merged commit 1ec3bb3 into main Aug 10, 2026
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.

1 participant