comparison data_manager/data_manager_build_amrfinderplus.py @ 2:a5921c09b7b7 draft default tip

planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/data_managers/data_manager_build_amrfinderplus commit 991998a3bb25e0059a8441975c652c7a75063709
author iuc
date Thu, 30 May 2024 13:06:37 +0000
parents eea0c38a9afd
children
comparison
equal deleted inserted replaced
1:592ef3959907 2:a5921c09b7b7
13 """ 13 """
14 Create the json file with database information for galaxy data manager 14 Create the json file with database information for galaxy data manager
15 """ 15 """
16 16
17 def __init__(self, 17 def __init__(self,
18 amrfinderplus_database="amrfinderplus_database", 18 amrfinderplus_database="amrfinderplus_versioned_database",
19 db_name="amrfinderplus-db", 19 db_name="amrfinderplus-db",
20 amrfinderplus_version="latest", 20 amrfinderplus_version="latest",
21 date_version=None): 21 date_version=None):
22 self.data_table_name = amrfinderplus_database 22 self.data_table_name = amrfinderplus_database
23 self._db_name = db_name 23 self._db_name = db_name
48 f"_{self._amrfinderplus_date_version}" 48 f"_{self._amrfinderplus_date_version}"
49 amrfinderplus_name = f"V{self._amrfinderplus_version}" \ 49 amrfinderplus_name = f"V{self._amrfinderplus_version}" \
50 f"-{self._amrfinderplus_date_version}" 50 f"-{self._amrfinderplus_date_version}"
51 data_info = dict(value=amrfinderplus_value, 51 data_info = dict(value=amrfinderplus_value,
52 name=amrfinderplus_name, 52 name=amrfinderplus_name,
53 db_version=self._amrfinderplus_version,
53 path=self._db_name) 54 path=self._db_name)
54 self.amrfinderplus_table_list["data_tables"][self.data_table_name] = [data_info] 55 self.amrfinderplus_table_list["data_tables"][self.data_table_name] = [data_info]
55 return self.amrfinderplus_table_list 56 return self.amrfinderplus_table_list
56 57
57 58
108 """ 109 """
109 Download the amrfinderplus database from the ncbi ftp server 110 Download the amrfinderplus database from the ncbi ftp server
110 """ 111 """
111 self.amrfinderplus_db_path = f'{self._output_dir}/{self._db_name}' 112 self.amrfinderplus_db_path = f'{self._output_dir}/{self._db_name}'
112 os.makedirs(self.amrfinderplus_db_path) 113 os.makedirs(self.amrfinderplus_db_path)
113 if self._amrfinderplus_version == 'latest':
114 self.get_amrfinderplus_version()
115 114
116 amrfinderplus_ftp_path = f"ftp://{self._login}:" \ 115 amrfinderplus_ftp_path = f"ftp://{self._login}:" \
117 f"{self._password}@{self._ncbi_ftp_url}/" \ 116 f"{self._password}@{self._ncbi_ftp_url}/" \
118 f"{self._ncbi_database_path}/" \ 117 f"{self._ncbi_database_path}/" \
119 f"{self._amrfinderplus_version}/" \ 118 f"{self._amrfinderplus_version}/" \