ireceptor-plus / issues

0 stars 0 forks source link

Can the count endpoints in stats API return all counts with an empty query? #90

Open schristley opened 2 years ago

schristley commented 2 years ago

Just like the repertoire endpoint in the ADC will return all the repertoires with an empty query, can we do the similar thing for the count endpoints in the stats API? I think maybe that can be faster than sending hundreds (or thousands in VDJServer's case) of repertoire_ids in the request and parsing/querying that on the server side?

VDJServer's use case is to show those counts, so it's more efficient to issue one query to get all of them, versus issuing hundreds/thousands of individual queries.

bcorrie commented 2 years ago

@bzimonja comments - seems like this would be simple, any gotchas?

@schristley would you want to do this just for the count endpoints? As you know I like symmetry but doing this on the other endpoints would result in a lot of data...

bzimonja commented 2 years ago

Should we send only results that have counts, or grab all repertoire ids first, and report the ones that have 0 counts?

schristley commented 2 years ago

@schristley would you want to do this just for the count endpoints? As you know I like symmetry but doing this on the other endpoints would result in a lot of data...

I don't have a use case where I'd want all that data in one shot. I think VDJServer's usage will be very similar to the Gateway's in that it will be shown on request by the user, and I'm comfortable with lazy-loading the data as needed. I haven't written any code to utilize those endpoints yet though.

schristley commented 2 years ago

Should we send only results that have counts, or grab all repertoire ids first, and report the ones that have 0 counts?

I think I'd prefer only results that have counts, similar to facets. I guess it's okay to assume a 0 count means no stats are available if that's somehow easier...

bzimonja commented 2 years ago

For me, it's easier to only pull stuff that has counts, since I have them in a collection separate from repertoires, so anything with no stats shouldn't be in it :) But not that difficult to add "count > 0" to the query or post-processing.