@click.command(short_help='<STR_LIT>')<EOL>@click.argument('<STR_LIT>')<EOL>@click.option('<STR_LIT>', '<STR_LIT>', help='<STR_LIT>')<EOL>@click.option('<STR_LIT>', '<STR_LIT>', is_flag=True, help='<STR_LIT>')<EOL>@click.option('<STR_LIT>', is_flag=True, help='<STR_LIT>')<EOL>@click.option('<STR_LIT>', is_flag=True, help='<STR_LIT>')<EOL>@click.option('<STR_LIT>', is_flag=True, help='<STR_LIT>')<EOL>@click.option('<STR_LIT>', is_flag=True, help='<STR_LIT>')<EOL>@click.option('<STR_LIT>', is_flag=True, help='<STR_LIT>')<EOL>@click.option('<STR_LIT>', is_flag=True, help='<STR_LIT>')<EOL>@click.option('<STR_LIT>', is_flag=True, help='<STR_LIT>')<EOL>@click.option('<STR_LIT>', help='<STR_LIT>')<EOL>@click.option('<STR_LIT>', type=int, help='<STR_LIT>')<EOL>@click.option('<STR_LIT>', type=int, help='<STR_LIT>')<EOL>@click.option('<STR_LIT>', type=int, help='<STR_LIT>')<EOL>@click.option('<STR_LIT>', help='<STR_LIT>')<EOL>@click.option('<STR_LIT>', default=<NUM_LIT:5>, help='<STR_LIT>',<EOL>show_default=True)<EOL>@click.pass_context<EOL>def variants(context, case_id, institute, force, cancer, cancer_research, sv, <EOL>sv_research, snv, snv_research, str_clinical, chrom, start, end, hgnc_id, <EOL>hgnc_symbol, rank_treshold):
LOG.info("<STR_LIT>")<EOL>adapter = context.obj['<STR_LIT>']<EOL>if institute:<EOL><INDENT>case_id = "<STR_LIT>".format(institute, case_id)<EOL><DEDENT>else:<EOL><INDENT>institute = case_id.split('<STR_LIT:->')[<NUM_LIT:0>]<EOL><DEDENT>case_obj = adapter.case(case_id=case_id)<EOL>if case_obj is None:<EOL><INDENT>LOG.info("<STR_LIT>")<EOL>context.abort()<EOL><DEDENT>files = [<EOL>{'<STR_LIT>': '<STR_LIT>', '<STR_LIT>': '<STR_LIT>', '<STR_LIT>': cancer},<EOL>{'<STR_LIT>': '<STR_LIT>', '<STR_LIT>': '<STR_LIT>', '<STR_LIT>': cancer_research},<EOL>{'<STR_LIT>': '<STR_LIT>', '<STR_LIT>': '<STR_LIT>', '<STR_LIT>': sv},<EOL>{'<STR_LIT>': '<STR_LIT>', '<STR_LIT>': '<STR_LIT>', '<STR_LIT>': sv_research},<EOL>{'<STR_LIT>': '<STR_LIT>', '<STR_LIT>': '<STR_LIT>', '<STR_LIT>': snv},<EOL>{'<STR_LIT>': '<STR_LIT>', '<STR_LIT>': '<STR_LIT>', '<STR_LIT>': snv_research},<EOL>{'<STR_LIT>': '<STR_LIT:str>', '<STR_LIT>': '<STR_LIT>', '<STR_LIT>': str_clinical},<EOL>]<EOL>gene_obj = None<EOL>if (hgnc_id or hgnc_symbol):<EOL><INDENT>if hgnc_id:<EOL><INDENT>gene_obj = adapter.hgnc_gene(hgnc_id)<EOL><DEDENT>if hgnc_symbol:<EOL><INDENT>for res in adapter.gene_by_alias(hgnc_symbol):<EOL><INDENT>gene_obj = res<EOL><DEDENT><DEDENT>if not gene_obj:<EOL><INDENT>LOG.warning("<STR_LIT>")<EOL>context.abort()<EOL><DEDENT><DEDENT>i = <NUM_LIT:0><EOL>for file_type in files:<EOL><INDENT>variant_type = file_type['<STR_LIT>']<EOL>category = file_type['<STR_LIT>']<EOL>if file_type['<STR_LIT>']:<EOL><INDENT>i += <NUM_LIT:1><EOL>if variant_type == '<STR_LIT>':<EOL><INDENT>if not (force or case_obj['<STR_LIT>']):<EOL><INDENT>LOG.warn("<STR_LIT>")<EOL>context.abort()<EOL><DEDENT><DEDENT>LOG.info("<STR_LIT>".format(<EOL>variant_type, category, case_id))<EOL>adapter.delete_variants(case_id=case_obj['<STR_LIT>'], <EOL>variant_type=variant_type,<EOL>category=category)<EOL>LOG.info("<STR_LIT>".format(<EOL>variant_type, category, case_id))<EOL>try:<EOL><INDENT>adapter.load_variants(<EOL>case_obj=case_obj, <EOL>variant_type=variant_type, <EOL>category=category,<EOL>rank_threshold=rank_treshold, <EOL>chrom=chrom, <EOL>start=start, <EOL>end=end,<EOL>gene_obj=gene_obj<EOL>)<EOL><DEDENT>except Exception as e:<EOL><INDENT>LOG.warning(e)<EOL>context.abort()<EOL><DEDENT><DEDENT><DEDENT>if i == <NUM_LIT:0>:<EOL><INDENT>LOG.info("<STR_LIT>")<EOL><DEDENT>
Upload variants to a case

        Note that the files has to be linked with the case, 
        if they are not use 'scout update case'.