Mercurial > repos > iuc > data_manager_metaphlan_database_downloader
comparison data_manager/data_manager_metaphlan_download.py @ 2:5fe20c915fa6 draft
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/data_managers/data_manager_metaphlan_database_downloader commit 57df6e8a0ffd145e560f7c7e20cfedbbe2ce01d2
author | iuc |
---|---|
date | Tue, 28 Mar 2023 18:54:12 +0000 |
parents | 169b08c9713c |
children |
comparison
equal
deleted
inserted
replaced
1:9c43baa60906 | 2:5fe20c915fa6 |
---|---|
104 table_name, | 104 table_name, |
105 dict( | 105 dict( |
106 dbkey=index, | 106 dbkey=index, |
107 value='%s-%s' % (index, date.today().strftime("%d%m%Y")), | 107 value='%s-%s' % (index, date.today().strftime("%d%m%Y")), |
108 name="MetaPhlAn clade-specific marker genes (%s)" % index, | 108 name="MetaPhlAn clade-specific marker genes (%s)" % index, |
109 path=str(db_dp))) | 109 path=str(db_dp), |
110 db_version='SGB' if 'SGB' in index else 'legacy')) | |
110 | 111 |
111 | 112 |
112 if __name__ == "__main__": | 113 if __name__ == "__main__": |
113 print("Starting...") | 114 print("Starting...") |
114 | 115 |
127 print("Making %s" % target_dp) | 128 print("Making %s" % target_dp) |
128 target_dp.mkdir(parents=True, exist_ok=True) | 129 target_dp.mkdir(parents=True, exist_ok=True) |
129 | 130 |
130 # Set up data tables dictionary | 131 # Set up data tables dictionary |
131 data_tables = create_data_tables_dict() | 132 data_tables = create_data_tables_dict() |
132 add_data_table(data_tables, "metaphlan_database") | 133 add_data_table(data_tables, "metaphlan_database_versioned") |
133 | 134 |
134 # Fetch data from specified data sources | 135 # Fetch data from specified data sources |
135 print("Download and build database") | 136 print("Download and build database") |
136 download_metaphlan_db( | 137 download_metaphlan_db( |
137 data_tables, | 138 data_tables, |
138 args.index, | 139 args.index, |
139 "metaphlan_database", | 140 "metaphlan_database_versioned", |
140 target_dp) | 141 target_dp) |
141 | 142 |
142 # Write output JSON | 143 # Write output JSON |
143 print("Outputting JSON") | 144 print("Outputting JSON") |
144 with open(json_fp, 'w') as fh: | 145 with open(json_fp, 'w') as fh: |