-
-
Notifications
You must be signed in to change notification settings - Fork 12
Convert to TRUE
/FALSE
mapping arguments
#274
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
base: main
Are you sure you want to change the base?
Conversation
There was a problem hiding this 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 transitions conversion mapping arguments from NULL
/empty lists to explicit TRUE
/FALSE
flags, where TRUE
triggers default guessing and FALSE
disables that slot. It updates core conversion functions, introduces a get_mapping
helper, and refreshes vignettes, tests, and man pages to reflect the new API.
- Refactor: conversion functions now use
get_mapping(mapping, guesser, ...)
with boolean defaults. - Documentation: vignettes and Rd files updated to show
TRUE
/FALSE
usage. - Tests: replaced legacy
from_Seurat
calls withas_AnnData
and adjusted mapping arguments.
Reviewed Changes
Copilot reviewed 14 out of 14 changed files in this pull request and generated 2 comments.
Show a summary per file
File | Description |
---|---|
vignettes/usage_singlecellexperiment.Rmd | Examples updated to use as_SingleCellExperiment and boolean mappings |
vignettes/singlecellexperiment_mapping.Rmd | Revised narrative and examples for FALSE mapping; adjusted bullet points |
vignettes/seurat_mapping.Rmd | Updated Seurat conversion examples to use FALSE mappings |
tests/testthat/test-Seurat.R | Switched from from_Seurat to as_AnnData in tests |
man/as_SingleCellExperiment.Rd | Changed default mapping args from NULL to TRUE |
man/as_Seurat.Rd | Changed default mapping args from NULL to TRUE |
man/as_AnnData.Rd | Changed default mapping args from NULL to TRUE |
man/AbstractAnnData.Rd | Updated default mapping args and usage examples |
R/utils.R | Added get_mapping() helper and its documentation |
R/as.R | Refreshed commented examples to use boolean defaults |
R/SingleCellExperiment.R | Refactored mapping logic to use get_mapping() ; replaced simple with dataframe mapping |
R/Seurat.R | Refactored mapping logic to use get_mapping() |
R/AnnData.R | Updated generics and methods to use boolean defaults; changed signatures |
R/AbstractAnnData.R | Updated R6 methods to default mapping args to TRUE |
Comments suppressed due to low confidence (1)
R/AnnData.R:247
- The
assay_name
parameter inas_AnnData.SingleCellExperiment
was changed to defaultTRUE
, but it should remainNULL
(or a character) to properly select which assay to map. Please revert it toNULL
.
assay_name = TRUE,
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Update mapping arguments to use
TRUE
/FALSE
instead ofNULL
/c()
TRUE
uses the default guessed mappingFALSE
maps nothing for that slotFixes #268