# HG changeset patch # User bebatut # Date 1488448361 18000 # Node ID 75898d1aabc3e512491500f6a43508f0e911a040 # Parent 71114ccf1026f300c5b7661f7b08071dba8f1124 planemo upload for repository https://github.com/ASaiM/galaxytools/tree/master/data_managers/data_manager_humann2_database_downloader commit b'318eb33ea866441cc9b2f98bdda88dd594037a0e\n'-dirty diff -r 71114ccf1026 -r 75898d1aabc3 data_manager/data_manager_humann2_download.py --- a/data_manager/data_manager_humann2_download.py Thu Mar 02 03:24:06 2017 -0500 +++ b/data_manager/data_manager_humann2_download.py Thu Mar 02 04:52:41 2017 -0500 @@ -108,20 +108,23 @@ target_dir: directory to put copy or link to the data file """ - today = datetime.date.today() - db_target_dir = os.path.join(target_dir, database, build) - os.makedirs(db_target_dir) + value = "%s_%s_%s" % (database, build, datetime.date.today().isoformat()) + db_target_dir = os.path.join(target_dir, database) + build_target_dir = os.path.join(db_target_dir, build) + os.makedirs(build_target_dir) cmd = "humann2_databases --download %s %s %s" % (database, build, db_target_dir) subprocess.check_call(cmd, shell=True) + os.rename(os.path.join(db_target_dir, database), build_target_dir) add_data_table_entry( data_tables, table_name, dict( dbkey=build, - value=today.isoformat(), - name=HUMANN2_REFERENCE_DATA[build], path=db_target_dir)) + value=value, + name=HUMANN2_REFERENCE_DATA[build], + path=db_target_dir)) if __name__ == "__main__":