comparison data_manager/data_manager_eggnog.py @ 3:b711f5b6bd44 draft

"planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/eggnog_mapper/data_manager_eggnog_mapper_abspath commit fd234f7532b34a1b6ced0d3ac53a8f42348e23f7"
author galaxyp
date Fri, 19 Feb 2021 18:54:00 +0000
parents 269f0970d762
children fcb8bdd124f4
comparison
equal deleted inserted replaced
2:2aec8d30ff42 3:b711f5b6bd44
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