scripts/validation/genome_search_validator.py
def check_search_err_files(search_output_dir):
    """
    Lookup all output subdirectories and check for cases that .err files are
    not empty

    search_output_dir: search output directory as organised by genome_search

    returns: A dictionary with all erroneous cases
    """

    search_err_cases = {}

    output_subdirs = os.listdir(search_output_dir)

    for subdir in output_subdirs:
        subdir_loc = os.path.join(search_output_dir, subdir)
        updirs = os.listdir(subdir_loc)
        for updir in updirs:
            updir_loc = os.path.join(subdir_loc, updir)
            err_files = [x for x in os.listdir(updir_loc) if x.endswith(".err")]
            gen_err_cases = []
            for err_file in err_files:
                if os.path.getsize(os.path.join(updir_loc,err_file))>0:
                    gen_err_cases.append(err_file[0:-4])

            if len(gen_err_cases) > 0:
                if subdir not in search_err_cases.keys():
                    search_err_cases[subdir] = {updir: gen_err_cases}
                else:
                    search_err_cases[subdir][updir] = gen_err_cases

    return search_err_cases

    Lookup all output subdirectories and check for cases that .err files are
    not empty

    search_output_dir: search output directory as organised by genome_search

    returns: A dictionary with all erroneous cases
    
Lookup all output subdirectories and check for cases that .err files are
not empty

search output directory as organised by genome_search

A dictionary with all erroneous cases
Lookup all output subdirectories and check for cases that . err files are not empty search output directory as organised by genome_search A dictionary with all erroneous cases
def check_search_err_files(search_output_dir):
    search_err_cases = {}
    output_subdirs = os.listdir(search_output_dir)
    for subdir in output_subdirs:
        subdir_loc = os.path.join(search_output_dir, subdir)
        updirs = os.listdir(subdir_loc)
        for updir in updirs:
            updir_loc = os.path.join(subdir_loc, updir)
            err_files = [x for x in os.listdir(updir_loc) if x.endswith(".err")]
            gen_err_cases = []
            for err_file in err_files:
                if os.path.getsize(os.path.join(updir_loc,err_file))>0:
                    gen_err_cases.append(err_file[0:-4])
            if len(gen_err_cases) > 0:
                if subdir not in search_err_cases.keys():
                    search_err_cases[subdir] = {updir: gen_err_cases}
                else:
                    search_err_cases[subdir][updir] = gen_err_cases
    return search_err_cases
def check_search_err_files ( search_output_dir ) : search_err_cases = { } output_subdirs = os . listdir ( search_output_dir ) for subdir in output_subdirs : subdir_loc = os . path . join ( search_output_dir , subdir ) updirs = os . listdir ( subdir_loc ) for updir in updirs : updir_loc = os . path . join ( subdir_loc , updir ) err_files = [ x for x in os . listdir ( updir_loc ) if x . endswith ( ".err" ) ] gen_err_cases = [ ] for err_file in err_files : if os . path . getsize ( os . path . join ( updir_loc , err_file ) ) > 0 : gen_err_cases . append ( err_file [ 0 : - 4 ] ) if len ( gen_err_cases ) > 0 : if subdir not in search_err_cases . keys ( ) : search_err_cases [ subdir ] = { updir : gen_err_cases } else : search_err_cases [ subdir ] [ updir ] = gen_err_cases return search_err_cases
Lookup all output subdirectories and check for cases that .err files are
not empty
Lookup all output subdirectories and check for cases that . err files are not empty
"""
    Lookup all output subdirectories and check for cases that .err files are
    not empty

    search_output_dir: search output directory as organised by genome_search

    returns: A dictionary with all erroneous cases
    """
search_output_dir