def load_panel(panel_path, adapter, date=None, display_name=None, version=None, panel_type=None, <EOL>panel_id=None, institute=None):
panel_lines = get_file_handle(panel_path)<EOL>try:<EOL><INDENT>panel_info = get_panel_info(<EOL>panel_lines=panel_lines,<EOL>panel_id=panel_id,<EOL>institute=institute,<EOL>version=version,<EOL>date=date,<EOL>display_name=display_name<EOL>)<EOL><DEDENT>except Exception as err:<EOL><INDENT>raise err<EOL><DEDENT>version = None<EOL>if panel_info.get('<STR_LIT:version>'):<EOL><INDENT>version = float(panel_info['<STR_LIT:version>'])<EOL><DEDENT>panel_id = panel_info['<STR_LIT>']<EOL>display_name = panel_info['<STR_LIT>'] or panel_id<EOL>institute = panel_info['<STR_LIT>']<EOL>date = panel_info['<STR_LIT:date>']<EOL>if not institute:<EOL><INDENT>raise SyntaxError("<STR_LIT>")<EOL><DEDENT>if not adapter.institute(institute):<EOL><INDENT>raise SyntaxError("<STR_LIT>".format(institute))<EOL><DEDENT>if not panel_id:<EOL><INDENT>raise SyntaxError("<STR_LIT>")<EOL><DEDENT>if version:<EOL><INDENT>existing_panel = adapter.gene_panel(panel_id, version)<EOL><DEDENT>else:<EOL><INDENT>existing_panel = adapter.gene_panel(panel_id)<EOL>version = <NUM_LIT:1.0><EOL>LOG.info("<STR_LIT>", version)<EOL><DEDENT>if existing_panel:<EOL><INDENT>LOG.info("<STR_LIT>")<EOL>if version == existing_panel['<STR_LIT:version>']:<EOL><INDENT>LOG.warning("<STR_LIT>")<EOL>LOG.info("<STR_LIT>")<EOL>raise SyntaxError()<EOL><DEDENT>display_name = display_name or existing_panel['<STR_LIT>']<EOL>institute = institute or existing_panel['<STR_LIT>']<EOL><DEDENT>parsed_panel = parse_gene_panel(<EOL>path=panel_path,<EOL>institute=institute,<EOL>panel_type=panel_type,<EOL>date=date,<EOL>version=version,<EOL>panel_id=panel_id,<EOL>display_name=display_name,<EOL>)<EOL>try:<EOL><INDENT>adapter.load_panel(parsed_panel=parsed_panel)<EOL><DEDENT>except Exception as err:<EOL><INDENT>raise err<EOL><DEDENT>
Load a manually curated gene panel into scout

    Args:
        panel_path(str): path to gene panel file
        adapter(scout.adapter.MongoAdapter)
        date(str): date of gene panel on format 2017-12-24
        display_name(str)
        version(float)
        panel_type(str)
        panel_id(str)
        institute(str)