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

bedbase object representation #11

Open
nsheff opened this issue Oct 11, 2024 · 1 comment
Open

bedbase object representation #11

nsheff opened this issue Oct 11, 2024 · 1 comment

Comments

@nsheff
Copy link

nsheff commented Oct 11, 2024

I think the representation you get when you print the bedbase client to screen is confusing:

api <- BEDbase()
api
service: bedbase
tags(); use bedbase$<tab completion>:
# A tibble: 32 x 3
   tag   operation                                                       summary
   <chr> <chr>                                                           <chr>  
 1 base  get_bedbase_db_stats_v1_stats_get                               Get su~
 2 base  service_info_v1_service_info_get                                GA4GH ~
 3 bed   bed_to_bed_search_v1_bed_search_bed_post                        Search~
 4 bed   get_bed_classification_v1_bed__bed_id__metadata_classification~ Get cl~
 5 bed   get_bed_embedding_v1_bed__bed_id__embedding_get                 Get em~
 6 bed   get_bed_files_v1_bed__bed_id__metadata_files_get                Get me~
 7 bed   get_bed_metadata_v1_bed__bed_id__metadata_get                   Get me~
 8 bed   get_bed_pephub_v1_bed__bed_id__metadata_raw_get                 Get ra~
 9 bed   get_bed_plots_v1_bed__bed_id__metadata_plots_get                Get pl~
10 bed   get_bed_stats_v1_bed__bed_id__metadata_stats_get                Get st~
# i 22 more rows
# i Use `print(n = ...)` to see more rows
tag values:
  base, bed, bedset, home, objects, search, NA
schemas():
  AccessMethod, AccessURL, BedClassification, BedEmbeddingResult,
  BedFiles
  # ... with 34 more elements

First, it says "use bedbase$ [tab completion]" -- but this doesn't work. It would be great if we could use tab completion (related to #10)

Then, I don't understand what is meant by "service" and "tags()"

The summaries of the operations in the table not actually visible.

Basically, I would suggest we think about the string representation and make it something more friendly to the user. Something like:

  • what API are we connected to?
  • how many BED files are available?
  • where can I find more information?
  • what functions can I use? (maybe?)
@jwokaty
Copy link
Collaborator

jwokaty commented Oct 11, 2024

Hm, tab completion works for me with, for example

library(bedbaser)
api <- BEDbase()
api$get_ # start typing this and tab complete

This information is coming from the AnVIL service class. I think tags are the top level organizational headings in the API and the service in this case is "bedbase". I see that I forgot to include tags in the NAMESPACE, which I can correct, as well as link to AnVIL documentation in the vignette where I provide an example of how to use this. My thought on bedbaser--and this is just a guess--is that most users might use the convenience functions I created because they just need to get a bed file and do something with it but maybe there might be power users who want to do other things, so that's where the endpoints exposed by AnVIL will be useful. I think some of your questions can be answered with #9.

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

No branches or pull requests

2 participants