Exemplo n.º 1
0
def download_hmm_database(level):
    level_base_path = get_level_base_path(level)
    url = 'http://beta-eggnogdb.embl.de/download/eggnog_4.5/eggnog-mapper-data/hmmdb_levels/%s/' %level_base_path
    if not args.force:
        flag = '-N'
    else:
        flag = ''
    cmd = 'mkdir -p %s; cd %s; wget %s -nH --user-agent=Mozilla/5.0 --relative -r --no-parent --reject "index.html*" --cut-dirs=4 -e robots=off %s' %(HMMDB_PATH, HMMDB_PATH, flag, url)
    run(cmd)
Exemplo n.º 2
0
def download_hmm_database(level):
    level_base_path = get_level_base_path(level)
    url = 'http://beta-eggnogdb.embl.de/download/eggnog_4.5/eggnog-mapper-data/hmmdb_levels/%s/' %level_base_path
    if not args.force:
        flag = '-N'
    else:
        flag = ''
    cmd = 'mkdir -p %s; cd %s; wget %s -nH --user-agent=Mozilla/5.0 --relative -r --no-parent --reject "index.html*" --cut-dirs=4 -e robots=off %s' %(HMMDB_PATH, HMMDB_PATH, flag, url)
    run(cmd)
def download_hmm_database(level):
    level_base_path = get_level_base_path(level)
    target_dir = os.path.split(get_db_info(level)[0])[0]
    if not os.path.exists(target_dir):
        os.makedirs(target_dir)

    url = 'http://eggnogdb.embl.de/download/emapperdb-%s/hmmdb_levels/%s/' % (
        DATABASE_VERSION, level_base_path)
    if not args.force:
        flag = '-N'
    else:
        flag = ''
    cmd = 'mkdir -p %s; cd %s; wget %s -nH --user-agent=Mozilla/5.0 --relative -r --no-parent --reject "index.html*" --cut-dirs=4 -e robots=off %s' % (
        target_dir, target_dir, flag, url)
    run(cmd)