Exemple #1
0
def _update_msg(tum, feat):
    meta = load_data.get_tumor_meta(tum)
    return TUMOR_INFO_TEMPLATE.format(url=meta['pub_url'],
                                      name=meta['pub_name'],
                                      typpe=meta['cancer_type'],
                                      sex=meta['sex'],
                                      grade=meta['grade'],
                                      stage=meta['stage'],
                                      gen=meta['genomic_alteration'])
Exemple #2
0
def build_tumor_dropdown(html_id, width=None):
    all_tumors = load_data.get_all_tumors()
    tum_to_type = {
        tum: load_data.get_tumor_meta(tum)['cancer_type_abbrev']
        for tum in all_tumors
    }
    options = [{
        'label': '{} ({})'.format(tum, tum_to_type[tum]),
        'value': tum
    } for tum in sorted(all_tumors)]
    if width:
        style = {"width": width}
    else:
        style = None
    return dcc.Dropdown(options=options,
                        value='GSE70630.MGH124.10x',
                        id=html_id,
                        style=style)