scripts/validation/genome_download_validator.py
def domain_download_validator(domain_dir, filename=None):
    """
    Lists all proteome directories in dest_dir and creates a list
    of the genomes that were not downloaded successfully. If filename
    is provided then the Upids will be listed in filename.list

    domain_dir: Destination directory, could be one of the four domains
    filename: A filename for the UPID list/ validation report
    returns: None if filename is provided, otherwise it will return a list
    of upids
    """

    recovery_list = []

    updirs = os.listdir(domain_dir)

    for updir in updirs:
        lsf_output_file = os.path.join(domain_dir, os.path.join(updir, "download.out"))
        status = check_genome_download_status(lsf_output_file)
        if status == 0:
            recovery_list.append(updir)

    if filename is not None:
        recovery_file = open(os.path.join(domain_dir, filename + '.list'))
        for upid in recovery_list:
            recovery_file.write(upid + '\n')
        recovery_file.close()

    else:
        return recovery_list

    return None

    Lists all proteome directories in dest_dir and creates a list
    of the genomes that were not downloaded successfully. If filename
    is provided then the Upids will be listed in filename.list

    domain_dir: Destination directory, could be one of the four domains
    filename: A filename for the UPID list/ validation report
    returns: None if filename is provided, otherwise it will return a list
    of upids
    
Lists all proteome directories in dest_dir and creates a list
of the genomes that were not downloaded successfully. If filename
is provided then the Upids will be listed in filename.list

Destination directory, could be one of the four domains
filename: A filename for the UPID list/ validation report
returns: None if filename is provided, otherwise it will return a list
of upids
Lists all proteome directories in dest_dir and creates a list of the genomes that were not downloaded successfully . If filename is provided then the Upids will be listed in filename . list Destination directory could be one of the four domains filename : A filename for the UPID list / validation report returns : None if filename is provided otherwise it will return a list of upids
def domain_download_validator(domain_dir, filename=None):
    recovery_list = []
    updirs = os.listdir(domain_dir)
    for updir in updirs:
        lsf_output_file = os.path.join(domain_dir, os.path.join(updir, "download.out"))
        status = check_genome_download_status(lsf_output_file)
        if status == 0:
            recovery_list.append(updir)
    if filename is not None:
        recovery_file = open(os.path.join(domain_dir, filename + '.list'))
        for upid in recovery_list:
            recovery_file.write(upid + '\n')
        recovery_file.close()
    else:
        return recovery_list
    return None
def domain_download_validator ( domain_dir , filename = None ) : recovery_list = [ ] updirs = os . listdir ( domain_dir ) for updir in updirs : lsf_output_file = os . path . join ( domain_dir , os . path . join ( updir , "download.out" ) ) status = check_genome_download_status ( lsf_output_file ) if status == 0 : recovery_list . append ( updir ) if filename is not None : recovery_file = open ( os . path . join ( domain_dir , filename + '.list' ) ) for upid in recovery_list : recovery_file . write ( upid + '\n' ) recovery_file . close ( ) else : return recovery_list return None
Lists all proteome directories in dest_dir and creates a list
of the genomes that were not downloaded successfully.
Lists all proteome directories in dest_dir and creates a list of the genomes that were not downloaded successfully .
"""
    Lists all proteome directories in dest_dir and creates a list
    of the genomes that were not downloaded successfully. If filename
    is provided then the Upids will be listed in filename.list

    domain_dir: Destination directory, could be one of the four domains
    filename: A filename for the UPID list/ validation report
    returns: None if filename is provided, otherwise it will return a list
    of upids
    """
domain_dir
filename