Skip to content

Conversation

@jaspreetishar
Copy link
Contributor

No description provided.

@jaspreetishar
Copy link
Contributor Author

jaspreetishar commented Jul 25, 2025

In this PR:

  1. Added image dimensions to landscape_parameters.json

  2. Removed the technology argument from dega.viz.Landscape(): the technology field is now inferred from landscape_parameters.json. Implemented a fallback: if the technology is neither provided nor present in landscape_parameters.json, it defaults to "Xenium", with relevant warnings and errors logged.

  3. Added a check to ensure gene list uniqueness before generating cbg files

  4. Transformation matrix addition: while this PR originally included a task to save the transformation matrix within the landscape files directory, that functionality has already been addressed in PR #123 for both currently supported technologies (Xenium and MERSCOPE)

  5. Fixed viz-related unit tests

  6. Merged in new changes from main

Tested notebooks on Xenium Pancreas public dataset only:

✅ Xenium_pre-process.ipynb
✅ Custom_Segmentation.ipynb

Copy link
Collaborator

@cornhundred cornhundred left a comment

Choose a reason for hiding this comment

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

I requested some changes. Once these are done, I can test the notebook on my end. Can you also address the quality/test issues that are showing up?

@cornhundred cornhundred requested a review from Copilot July 25, 2025 17:56

This comment was marked as outdated.

@jaspreetishar
Copy link
Contributor Author

Thank you for the review @cornhundred! All requested changes from both you and Copilot have been implemented. All quality checks and pytests are passing successfully, and the latest changes from main have been merged.

Copy link
Collaborator

@cornhundred cornhundred left a comment

Choose a reason for hiding this comment

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

I requested some changes and made one commit to set the default for image_tile_layer to all - otherwise only the DAPI layer is processed. Later we can change the image_tile_layer to allow a list and we should probably rename it image_tile_layers - but we can do this later.

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR adds transformation matrix functionality to landscape files, enhances the Landscape widget to dynamically fetch technology information, and improves gene handling with deduplication logic.

  • Modifies the Landscape widget to dynamically fetch technology from landscape_parameters.json when not explicitly provided
  • Adds transformation matrix support for coordinate transformation in landscape files
  • Implements gene deduplication logic to handle duplicate gene names consistently

Reviewed Changes

Copilot reviewed 9 out of 9 changed files in this pull request and generated 5 comments.

Show a summary per file
File Description
src/celldega/viz/widget.py Enhanced Landscape widget with dynamic technology fetching and frontend message handling
src/celldega/pre/init.py Added gene deduplication functions and updated landscape parameter saving with image dimensions
src/celldega/pre/run_pre_processing.py Modified preprocessing pipeline to include gene alignment and image dimension parameters
js/widget.js Added frontend technology fetching logic with fallback handling
tests/unit/test_viz/test_widget.py Updated tests with mocking for technology fetching and syntax fixes
tests/unit/test_viz/test_landscape_colors.py Added mocking for technology fetching in color tests
pyproject.toml Added minimum Python version requirement
notebooks/ Updated notebook examples to remove explicit technology parameter

@jaspreetishar jaspreetishar marked this pull request as draft July 28, 2025 20:54
@jaspreetishar
Copy link
Contributor Author

All feedback from @cornhundred and Copilot has been addressed. Changes from main have been merged, and the working Celldega version is up to date (0.13.0a9). All pytest checks are passing, and ruff formatting and linting are complete.

@jaspreetishar jaspreetishar marked this pull request as ready for review July 30, 2025 11:37
@jaspreetishar
Copy link
Contributor Author

@cornhundred @huanlity — this PR is ready for review. Summary here: #178 (comment)

All prior feedback from @cornhundred and Copilot has been addressed. Latest changes from main have been merged, the working Celldega version is up to date (0.13.0), all pytest checks are passing, and ruff formatting/linting is complete.

@cornhundred cornhundred changed the title DEGA-333-Add-transformation-matrix-to-LandscapeFiles DEGA-333-transformation-matrix-etc Sep 2, 2025
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