comparison data_manager/data_manager_eggnog.py @ 4:fcb8bdd124f4 draft

"planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/eggnog_mapper/data_manager_eggnog_mapper_abspath commit e45c15081260025e470d23975ef5a734d3f8fc66"
author galaxyp
date Tue, 25 Jan 2022 13:51:24 +0000
parents b711f5b6bd44
children
comparison
equal deleted inserted replaced
3:b711f5b6bd44 4:fcb8bdd124f4
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_versioned' 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: 45 # DB versionning was super confusing for eggnog-mapper 2.0.x:
46 # eggnog-mapper 1.* needed a db v4.5 (based on eggnog v4.5) 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) 47 # eggnog-mapper 2.x needed a db v2.0 (based on eggnog v5.0)
48 # db v4.5 are not compatible with eggnog-mapper 2.0 48 # (db v4.5 are not compatible with eggnog-mapper 2.0)
49 # Starting with eggnog-mapper 2.1.* db versioning looks better: 2.1.0 requires db v5.0.2
49 version = "2.0" 50 version = "2.0"
50 if "4.5" in db_version: 51 if "4.5" in db_version:
52 # special case: eggnog-mapper 1.x
51 version = "1.0" 53 version = "1.0"
54 elif db_version.startswith('2.'):
55 # special case: eggnog-mapper 2.0.x
56 version = "2.0"
57 else:
58 # normal case or eggno-mapper >= 2.1
59 version = db_version
52 data_table_entry = dict(value=db_version, name=db_version, 60 data_table_entry = dict(value=db_version, name=db_version,
53 path=args.install_path, version=version) 61 path=args.install_path, version=version)
54 dm_dict['data_tables'][data_table].append(data_table_entry) 62 dm_dict['data_tables'][data_table].append(data_table_entry)
55 63
56 # save info to json file 64 # save info to json file