Mercurial > repos > galaxyp > data_manager_eggnog_mapper
comparison data_manager/data_manager_eggnog.py @ 2:3d82020b1e3b draft
"planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/eggnog_mapper/eggnog_mapper_data_manager commit fd234f7532b34a1b6ced0d3ac53a8f42348e23f7"
author | galaxyp |
---|---|
date | Fri, 19 Feb 2021 18:53:40 +0000 |
parents | 077cf0a99144 |
children | 5a2ffc486246 |
comparison
equal
deleted
inserted
replaced
1:077cf0a99144 | 2:3d82020b1e3b |
---|---|
37 db_version = _get_db_version(eggnog_db_path) | 37 db_version = _get_db_version(eggnog_db_path) |
38 | 38 |
39 # params = json.loads(open(args.config_file).read()) | 39 # params = json.loads(open(args.config_file).read()) |
40 dm_dict = {} | 40 dm_dict = {} |
41 dm_dict['data_tables'] = dm_dict.get('data_tables', {}) | 41 dm_dict['data_tables'] = dm_dict.get('data_tables', {}) |
42 data_table = 'eggnog_mapper_db' | 42 data_table = 'eggnog_mapper_db_versioned' |
43 dm_dict['data_tables'][data_table]\ | 43 dm_dict['data_tables'][data_table]\ |
44 = dm_dict['data_tables'].get(data_table, []) | 44 = dm_dict['data_tables'].get(data_table, []) |
45 # Versionning is super confusing: | |
46 # eggnog-mapper 1.* needed a db v4.5 (based on eggnog v4.5) | |
47 # eggnog-mapper 2.0 needs a db v2.0 (based on eggnog v5.0) | |
48 # db v4.5 are not compatible with eggnog-mapper 2.0 | |
49 version = "2.0" | |
50 if "4.5" in db_version: | |
51 version = "1.0" | |
45 data_table_entry = dict(value=db_version, name=db_version, | 52 data_table_entry = dict(value=db_version, name=db_version, |
46 path=args.install_path) | 53 path=args.install_path, version=version) |
47 dm_dict['data_tables'][data_table].append(data_table_entry) | 54 dm_dict['data_tables'][data_table].append(data_table_entry) |
48 | 55 |
49 # save info to json file | 56 # save info to json file |
50 open(args.config_file, 'w').write(json.dumps(dm_dict)) | 57 open(args.config_file, 'w').write(json.dumps(dm_dict)) |
51 | 58 |