def parse(isatab_ref):
if os.path.isdir(isatab_ref):<EOL><INDENT>fnames = glob.glob(os.path.join(isatab_ref, "<STR_LIT>")) +glob.glob(os.path.join(isatab_ref, "<STR_LIT>"))<EOL>assert len(fnames) == <NUM_LIT:1><EOL>isatab_ref = fnames[<NUM_LIT:0>]<EOL><DEDENT>assert os.path.exists(isatab_ref), "<STR_LIT>" % isatab_ref<EOL>i_parser = InvestigationParser()<EOL>with open(isatab_ref, "<STR_LIT>") as in_handle:<EOL><INDENT>rec = i_parser.parse(in_handle)<EOL><DEDENT>s_parser = StudyAssayParser(isatab_ref)<EOL>rec = s_parser.parse(rec)<EOL>return rec<EOL>
Entry point to parse an ISA-Tab directory.
    isatab_ref can point to a directory of ISA-Tab data, in which case we
    search for the investigator file, or be a reference to the high level
    investigation file.