def get_valid_report_types(): reporter_infos = au.get_local_module_infos(types=['reporter']) report_types = [x.name.split('reporter')[0] for x in reporter_infos] report_types = [ v for v in report_types if not v in ['text', 'pandas', 'stdout', 'example'] ] return report_types
def get_annotators(request): out = {} for local_info in au.get_local_module_infos(types=['annotator']): module_name = local_info.name if local_info.type == 'annotator': out[module_name] = { 'name': module_name, 'version': local_info.version, 'type': local_info.type, 'title': local_info.title, 'description': local_info.description, 'developer': local_info.developer } return web.json_response(out)
async def load_live_modules(module_names=[]): global live_modules global live_mapper global include_live_modules global exclude_live_modules print('populating live annotators') conf = au.get_system_conf() if 'live' in conf: live_conf = conf['live'] if 'include' in live_conf: include_live_modules = live_conf['include'] else: include_live_modules = [] if 'exclude' in live_conf: exclude_live_modules = live_conf['exclude'] else: exclude_live_modules = [] else: include_live_modules = [] exclude_live_modules = [] if live_mapper is None: cravat_conf = au.get_cravat_conf() if 'genemapper' in cravat_conf: default_mapper = cravat_conf['genemapper'] else: default_mapper = 'hg38' live_mapper = get_live_mapper(default_mapper) modules = au.get_local_module_infos(types=['annotator']) for module in modules: if module.name in live_modules: continue if module.name not in module_names: if module.name in exclude_live_modules: continue if len(include_live_modules ) > 0 and module.name not in include_live_modules: continue if 'secondary_inputs' in module.conf: continue annotator = get_live_annotator(module.name) if annotator is None: continue live_modules[module.name] = annotator print('done populating live annotators')
def get_valid_report_types(): reporter_infos = au.get_local_module_infos(types=['reporter']) report_types = [x.name.split('reporter')[0] for x in reporter_infos] return report_types