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

✨ Add filtering for artifacts #139

Open
SHerresthal opened this issue Jan 23, 2025 · 1 comment
Open

✨ Add filtering for artifacts #139

SHerresthal opened this issue Jan 23, 2025 · 1 comment
Labels
enhancement New feature or request

Comments

@SHerresthal
Copy link

Hi,
is it possible to filter for artifacts in the R Client? I could not find it in the docs and this gives me Error: attempt to apply non-function

db <- connect() 
db$Artifact$filter(key__endswith=".h5ad")$df()

I was expecting this to work similarly to the python code:

ln.Artifact.filter(key__endswith=".h5ad").df()

Thank you!

@lazappi lazappi changed the title Filter for artifacts Add filtering for artifacts Jan 28, 2025
@lazappi lazappi added the enhancement New feature or request label Jan 28, 2025
@lazappi lazappi changed the title Add filtering for artifacts ✨ Add filtering for artifacts Jan 28, 2025
@lazappi
Copy link
Collaborator

lazappi commented Jan 28, 2025

Hi @SHerresthal

Currently we haven't implemented the filtering functionality. This is on our roadmap but for now I would suggest getting the whole artifacts table and filtering it in R. Here is an example using {dplyr} but there are lots of ways to do this.

db <- db$Artifact$df()
artifact_df |>
  dplyr::filter(stringr::str_ends(key, ".h5ad"))

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants