A possible implementation can look like the below, but probably can be done more efficiently than by relying on an indirects call to summarize.contexts and samples_in_context.
def loaded_tags():
loaded_tags = set()
contexts = redbiom.summarize.contexts()
for context in contexts['ContextName']:
samples = redbiom.fetch.samples_in_context(context, unambiguous=True)
loaded_tags.update({s.split('_'. 1)[0] for s in samples})
return loaded_tags
A possible implementation can look like the below, but probably can be done more efficiently than by relying on an indirects call to
summarize.contexts
andsamples_in_context
.