Skip to content

Conversation

lazappi
Copy link
Collaborator

@lazappi lazappi commented Oct 14, 2025

Related to: Fixes #368

Description

  • Handle conversion of graphs that don't have an associated assay
  • Add a util functions to check dimensions of objects during conversion
  • Check dimensions in from_Seurat() and skip if they don't match the AnnData
  • Adjust documentation of default values in conversion man pages

Checklist

Before review

  • Update and regenerate man pages
  • Add/update tests
  • Add/update examples in vignettes
  • Pass CI checks

Before merge

  • Update NEWS
  • Bump devel version

Comment on lines +124 to +127
#' - If `assay_name` is the default assay, they will be _converted_ with a
#' warning
#' - if `assay_name` is not the default assay, they will be _skipped_ with a
#' warning
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

This logic might be a bit complex, we could make it always do one of these

@lazappi lazappi requested a review from rcannood October 14, 2025 10:06
Comment on lines +507 to +511
if (assay_name == SeuratObject::DefaultAssay(seurat_obj)) {
cli_warn(c(
"Graph {.val {graph_name}} does not have an associated assay",
"i" = "Assuming it belongs to the selected default assay ({.val {assay_name}})"
))
Copy link
Member

Choose a reason for hiding this comment

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

If we are in this edge case, will it still check whether the dimensions are correct?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Yes, because the check for that is at the conversion step. So it will still get skipped if the dimensions don't match.

Copy link
Member

@rcannood rcannood left a comment

Choose a reason for hiding this comment

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

LTGM!

@rcannood rcannood merged commit 0e801d3 into devel Oct 17, 2025
6 checks passed
@rcannood rcannood deleted the issue-368/seurat-graphs branch October 17, 2025 06:55
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.

Converting Seurat fails when graphs don't have a DefaultAssay

2 participants