Skip to content
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

Allow feature/varialble name to be next to ) #219

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

maxim-h
Copy link
Contributor

@maxim-h maxim-h commented Sep 2, 2024

I've always had problems when using some more involved patterns with subset.Seurat, e.g.:

> subset(seurat, subset = !grepl("cycling", celltype))
Error in `FetchData()`:
! None of the requested variables were found: 
Run `rlang::last_trace()` to see where the error occurred.

Turns out the WhichCells strips the opening bracket, but not the closing one, when searching for feature/variable names in expression.

I've fixed the issue for myself with this small change, but not sure if this was on purpose and my change breaks something else.

@maxim-h
Copy link
Contributor Author

maxim-h commented Sep 2, 2024

Actually, after taking another look I've found the base R function that seems to do exactly what is needed here without the manual tinkering with strings. Hence the second commit.

Maybe that's a more robust approach.

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