Skip to content

Simplify mapping arguments #260

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 17 commits into
base: main
Choose a base branch
from
Open

Simplify mapping arguments #260

wants to merge 17 commits into from

Conversation

lazappi
Copy link
Collaborator

@lazappi lazappi commented Apr 14, 2025

Simplify the mapping arguments in conversion functions to use named vectors instead of nested lists.

Related to (replaces?) #251

  • All mapping arguments now expect named vectors instead of lists
  • Complex mapping from other slots etc. is now not possible. Users will need to make these changes manually if required.
  • The exception is the reduction_mapping argument of from_Seurat()/from_SingleCellExperiment() which allows a more complex list format if users want to specify loadings etc.
  • Simple named lists will still work but are not shown in examples
  • Unnamed vectors will also work, c("item1", "item2") gets converted to c(item1 = "item1", item2 = "item2"). This is mostly to avoid simple errors and isn't shown in examples.

This helps standardise things so it will be simpler to replace from_Seurat()/from_SingleCellExperiment() with as_AnnData(). More updates to documentation will come in #253.

@lazappi lazappi marked this pull request as ready for review April 16, 2025 14:46
@lazappi lazappi requested review from rcannood and LouiseDck April 16, 2025 14:46
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