@variants_bp.route('<STR_LIT>', methods=['<STR_LIT:POST>'])<EOL>def upload_panel(institute_id, case_name):
file = form.symbol_file.data<EOL>if file.filename == '<STR_LIT>':<EOL><INDENT>flash('<STR_LIT>', '<STR_LIT>')<EOL>return redirect(request.referrer)<EOL><DEDENT>try:<EOL><INDENT>stream = io.StringIO(file.stream.read().decode('<STR_LIT:utf-8>'), newline=None)<EOL><DEDENT>except UnicodeDecodeError as error:<EOL><INDENT>flash("<STR_LIT>", '<STR_LIT>')<EOL>return redirect(request.referrer)<EOL><DEDENT>category = request.args.get('<STR_LIT>')<EOL>if(category == '<STR_LIT>'):<EOL><INDENT>form = SvFiltersForm(request.args)<EOL><DEDENT>else:<EOL><INDENT>form = FiltersForm(request.args)<EOL><DEDENT>hgnc_symbols = set(form.hgnc_symbols.data)<EOL>new_hgnc_symbols = controllers.upload_panel(store, institute_id, case_name, stream)<EOL>hgnc_symbols.update(new_hgnc_symbols)<EOL>form.hgnc_symbols.data = '<STR_LIT:U+002C>'.join(hgnc_symbols)<EOL>form.gene_panels.data = '<STR_LIT>'<EOL>if(category == '<STR_LIT>'):<EOL><INDENT>return redirect(url_for('<STR_LIT>', institute_id=institute_id, case_name=case_name,<EOL>**form.data), code=<NUM_LIT>)<EOL><DEDENT>else:<EOL><INDENT>return redirect(url_for('<STR_LIT>', institute_id=institute_id, case_name=case_name,<EOL>**form.data), code=<NUM_LIT>)<EOL><DEDENT>
Parse gene panel file and fill in HGNC symbols for filter.