scripts/export/generate_ftp_files.py
def validate_seed_archive(destination, rfam_accs):
    """
    Check that Rfam.seed contains the correct number of entries.
    """
    cwd = os.getcwd()
    os.chdir(destination)
    family_count = 0
    with open(os.path.join(destination, 'Rfam.seed')) as f_seed:
        for line in f_seed:
            if line.startswith('# STOCKHOLM 1.0'):
                family_count += 1
    os.chdir(cwd)
    try:
        assert(family_count == len(rfam_accs))
        print('OK: Found {} families in Rfam.seed'.format(family_count))
    except AssertionError:
        raise Exception('Error: Rfam.seed contains {} families instead of {}'.format(family_count, len(rfam_accs)))

    Check that Rfam.seed contains the correct number of entries.
    
Check that Rfam.seed contains the correct number of entries.
Check that Rfam . seed contains the correct number of entries .
def validate_seed_archive(destination, rfam_accs):
    cwd = os.getcwd()
    os.chdir(destination)
    family_count = 0
    with open(os.path.join(destination, 'Rfam.seed')) as f_seed:
        for line in f_seed:
            if line.startswith('# STOCKHOLM 1.0'):
                family_count += 1
    os.chdir(cwd)
    try:
        assert(family_count == len(rfam_accs))
        print('OK: Found {} families in Rfam.seed'.format(family_count))
    except AssertionError:
        raise Exception('Error: Rfam.seed contains {} families instead of {}'.format(family_count, len(rfam_accs)))
def validate_seed_archive ( destination , rfam_accs ) : cwd = os . getcwd ( ) os . chdir ( destination ) family_count = 0 with open ( os . path . join ( destination , 'Rfam.seed' ) ) as f_seed : for line in f_seed : if line . startswith ( '# STOCKHOLM 1.0' ) : family_count += 1 os . chdir ( cwd ) try : assert ( family_count == len ( rfam_accs ) ) print ( 'OK: Found {} families in Rfam.seed' . format ( family_count ) ) except AssertionError : raise Exception ( 'Error: Rfam.seed contains {} families instead of {}' . format ( family_count , len ( rfam_accs ) ) )
Check that Rfam.seed contains the correct number of entries.
Check that Rfam . seed contains the correct number of entries .
"""
    Check that Rfam.seed contains the correct number of entries.
    """
destination
rfam_accs