comparison data_manager/data_manager_plant_tribes_scaffolds_download.py @ 2:b3fc4b35e3f5 draft

Uploaded
author iuc
date Tue, 14 Feb 2017 13:50:55 -0500
parents f5e3438468c7
children fe92a529ed01
comparison
equal deleted inserted replaced
1:f5e3438468c7 2:b3fc4b35e3f5
75 data_manager_dict = {} 75 data_manager_dict = {}
76 data_table_entry = {} 76 data_table_entry = {}
77 # Download the scaffolds data. 77 # Download the scaffolds data.
78 work_directory = os.path.abspath(os.path.join(os.getcwd(), 'scaffolds')) 78 work_directory = os.path.abspath(os.path.join(os.getcwd(), 'scaffolds'))
79 make_directory(work_directory) 79 make_directory(work_directory)
80 file_path = url_download(web_url) 80 file_path = url_download(web_url, work_directory)
81 extract_archive(file_path, work_directory) 81 extract_archive(file_path, work_directory)
82 os.remove(file_path) 82 os.remove(file_path)
83 # Move the scaffolds data files into defined output directory. 83 # Move the scaffolds data files into defined output directory.
84 target_directory = make_directory(target_file_path) 84 target_directory = make_directory(target_file_path)
85 move_files(work_directory, target_directory) 85 move_files(work_directory, target_directory)
93 data_table_entry['path'] = full_path 93 data_table_entry['path'] = full_path
94 data_table_entry['description'] = description 94 data_table_entry['description'] = description
95 # Download the default configuration files. 95 # Download the default configuration files.
96 work_directory = os.path.abspath(os.path.join(os.getcwd(), 'configs')) 96 work_directory = os.path.abspath(os.path.join(os.getcwd(), 'configs'))
97 make_directory(work_directory) 97 make_directory(work_directory)
98 file_path = url_download(config_web_url) 98 file_path = url_download(config_web_url, work_directory)
99 extract_archive(file_path, work_directory) 99 extract_archive(file_path, work_directory)
100 os.remove(file_path) 100 os.remove(file_path)
101 shutil.rmtree(target_directory) 101 shutil.rmtree(target_directory)
102 # Move the scaffolds data files into defined output directory. 102 # Move the scaffolds data files into defined output directory.
103 target_directory = make_directory(target_file_path) 103 target_directory = make_directory(target_file_path)