Import cell segmentations for VisiumHD datasets#56
Conversation
- added Visium HD mouse brain as test dataset for segmentation - added download of metrics_summary.csv files
…e_brain and 10x_visiumhd_mouse_embryo
|
An example report can be found at: |
There was a problem hiding this comment.
Pull Request Overview
This pull request implements support for loading cell segmented Visium HD datasets into scrnaseq2. The implementation includes temporary functions copied from a development Seurat branch while awaiting official support, and removes the ability to load multiple bin sizes simultaneously for VisiumHD data to simplify the codebase.
- Adds support for Visium HD cell segmentations with temporary Seurat functions
- Removes multi-bin size loading capability for VisiumHD datasets
- Updates documentation and export functionality for better tool compatibility
Reviewed Changes
Copilot reviewed 11 out of 14 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| modules/1_read_data/read_data.qmd | Removes multi-bin size support and updates spatial coordinate handling |
| modules/9_export/export.qmd | Updates documentation for metadata export and Loupe browser compatibility |
| modules/7_cluster_annotation/cluster_annotation.qmd | Fixes parameter name in function call |
| modules/10_deg_analysis/deg_analysis.qmd | Updates Seurat object saving configuration |
| R/functions_io.R | Major changes to support segmented VisiumHD data and temporary Seurat functions |
| R/functions_plotting.R | Adds temporary Seurat plotting functions for segmentation support |
| R/functions_analysis.R | Removes globals parameter from furrr options |
| R/general_configuration.R | Adds version tracking for Seurat packages |
| datasets/*/download.R | Updates dataset URLs and adds segmented data downloads |
| _quarto-scrnaseq.yml | Removes visiumhd_bin_sizes configuration |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
| # Check files | ||
| assertthat::is.readable(image_dir) | ||
| for (f in c("tissue_lowres_image.png", "scalefactors_json.json")) { | ||
| for (f in c("tissue_hires_image.png", "tissue_lowres_image.png", "scalefactors_json.json")) { |
There was a problem hiding this comment.
[nitpick] The function now checks for 'tissue_hires_image.png' in addition to the previous files, but later in the code only 'tissue_lowres_image.png' is used (line 1307). Consider documenting why the hires image check is needed or remove it if not used.
| for (f in c("tissue_hires_image.png", "tissue_lowres_image.png", "scalefactors_json.json")) { | |
| for (f in c("tissue_lowres_image.png", "scalefactors_json.json")) { |
There was a problem hiding this comment.
This is to prepare for the possibility to load the high-resolution image 'tissue_hires_image.png' as an alternative.
Co-authored-by: Copilot <[email protected]>
Co-authored-by: Copilot <[email protected]>
… into visiumhd_segmentation
This pull request implements loading of cell segmented Visium HD data into scrnaseq2.
IMPORTANT: Seurat itself does not yet support loading Visium HD cell segmentations. However, there is a development branch that seems to be close to completion and I suspect that several new functions will be included in the new release. For now, I copied these functions (temporarily) into our code so that they can be used. Once they become part of Seurat, we can remove the copies. That means do we want to wait with our release?
Furthermore I removed the possibility to load multiple bin sizes at once for VisiumHD (
visiumhd_bin_sizes) since we almost never used it and it makes the code more complicated. In the file that contains the datasets you just specify the path to one type of data (segmented or a bin size).