Skip to content

Fix perturbation assay names with invalid characters#23

Open
rootze wants to merge 1 commit into
mainfrom
bugfix/perturbation-name-sanitization
Open

Fix perturbation assay names with invalid characters#23
rootze wants to merge 1 commit into
mainfrom
bugfix/perturbation-name-sanitization

Conversation

@rootze

@rootze rootze commented Jul 1, 2026

Copy link
Copy Markdown
Collaborator

.sanitize_perturbation_name() is for creating perturbation assays. It takes the user-provided name, checks that it is valid input, converts it to a safe R/Seurat-style name with make.names(), and warns if the name changed. It is used near the start of

ModulePerturbation()
TFPerturbation()
CustomPerturbation()

.resolve_perturbation_assay_name() is for finding perturbation assays that may already exist.
It checks: Does the exact name exist in seurat_obj@assays? If not, does the sanitized version exist? If neither exists, return the original name so the normal error message can say it was not found.

@rootze rootze requested a review from smorabit July 1, 2026 20:08
@rootze rootze self-assigned this Jul 1, 2026
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