annotate data_manager/gtdbtk_database_installer.py @ 3:c4830a9870fa draft

planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/data_managers/data_manager_gtdbtk_database_installer commit 9f0b54aeff21df342d2593cff59e813b69cc7bad
author iuc
date Wed, 14 Aug 2024 18:02:46 +0000
parents 6ab422fba1a3
children 10232d2b5062
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
0
629464b96c2e planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/data_managers/data_manager_gtdbtk_database_installer commit 69da0d34ea6e72c0427ec2d3e882c86cbb90833f
iuc
parents:
diff changeset
1 #!/usr/bin/env python
629464b96c2e planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/data_managers/data_manager_gtdbtk_database_installer commit 69da0d34ea6e72c0427ec2d3e882c86cbb90833f
iuc
parents:
diff changeset
2
629464b96c2e planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/data_managers/data_manager_gtdbtk_database_installer commit 69da0d34ea6e72c0427ec2d3e882c86cbb90833f
iuc
parents:
diff changeset
3 import argparse
2
6ab422fba1a3 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/data_managers/data_manager_gtdbtk_database_installer commit ad14947c3e13babe90a6878b45608fe56a16150d
iuc
parents: 0
diff changeset
4 import gzip
0
629464b96c2e planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/data_managers/data_manager_gtdbtk_database_installer commit 69da0d34ea6e72c0427ec2d3e882c86cbb90833f
iuc
parents:
diff changeset
5 import json
629464b96c2e planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/data_managers/data_manager_gtdbtk_database_installer commit 69da0d34ea6e72c0427ec2d3e882c86cbb90833f
iuc
parents:
diff changeset
6 import os
629464b96c2e planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/data_managers/data_manager_gtdbtk_database_installer commit 69da0d34ea6e72c0427ec2d3e882c86cbb90833f
iuc
parents:
diff changeset
7 import shutil
629464b96c2e planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/data_managers/data_manager_gtdbtk_database_installer commit 69da0d34ea6e72c0427ec2d3e882c86cbb90833f
iuc
parents:
diff changeset
8 import sys
629464b96c2e planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/data_managers/data_manager_gtdbtk_database_installer commit 69da0d34ea6e72c0427ec2d3e882c86cbb90833f
iuc
parents:
diff changeset
9 import tarfile
2
6ab422fba1a3 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/data_managers/data_manager_gtdbtk_database_installer commit ad14947c3e13babe90a6878b45608fe56a16150d
iuc
parents: 0
diff changeset
10 from datetime import datetime
0
629464b96c2e planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/data_managers/data_manager_gtdbtk_database_installer commit 69da0d34ea6e72c0427ec2d3e882c86cbb90833f
iuc
parents:
diff changeset
11 from urllib.parse import urlparse
2
6ab422fba1a3 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/data_managers/data_manager_gtdbtk_database_installer commit ad14947c3e13babe90a6878b45608fe56a16150d
iuc
parents: 0
diff changeset
12 from urllib.request import Request, urlopen
6ab422fba1a3 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/data_managers/data_manager_gtdbtk_database_installer commit ad14947c3e13babe90a6878b45608fe56a16150d
iuc
parents: 0
diff changeset
13
6ab422fba1a3 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/data_managers/data_manager_gtdbtk_database_installer commit ad14947c3e13babe90a6878b45608fe56a16150d
iuc
parents: 0
diff changeset
14 # rather provide the urls based on the release, less error potential for the admins !
6ab422fba1a3 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/data_managers/data_manager_gtdbtk_database_installer commit ad14947c3e13babe90a6878b45608fe56a16150d
iuc
parents: 0
diff changeset
15 urls = {
6ab422fba1a3 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/data_managers/data_manager_gtdbtk_database_installer commit ad14947c3e13babe90a6878b45608fe56a16150d
iuc
parents: 0
diff changeset
16 "202": {
6ab422fba1a3 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/data_managers/data_manager_gtdbtk_database_installer commit ad14947c3e13babe90a6878b45608fe56a16150d
iuc
parents: 0
diff changeset
17 "full": "https://data.gtdb.ecogenomic.org/releases/release202/202.0/auxillary_files/gtdbtk_r202_data.tar.gz",
3
c4830a9870fa planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/data_managers/data_manager_gtdbtk_database_installer commit 9f0b54aeff21df342d2593cff59e813b69cc7bad
iuc
parents: 2
diff changeset
18 "meta_ar": "https://data.gtdb.ecogenomic.org/releases/release202/202.0/ar122_metadata_r202.tar.gz",
c4830a9870fa planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/data_managers/data_manager_gtdbtk_database_installer commit 9f0b54aeff21df342d2593cff59e813b69cc7bad
iuc
parents: 2
diff changeset
19 "meta_bac": "https://data.gtdb.ecogenomic.org/releases/release202/202.0/bac120_metadata_r202.tar.gz",
2
6ab422fba1a3 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/data_managers/data_manager_gtdbtk_database_installer commit ad14947c3e13babe90a6878b45608fe56a16150d
iuc
parents: 0
diff changeset
20 },
6ab422fba1a3 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/data_managers/data_manager_gtdbtk_database_installer commit ad14947c3e13babe90a6878b45608fe56a16150d
iuc
parents: 0
diff changeset
21 "207": {
6ab422fba1a3 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/data_managers/data_manager_gtdbtk_database_installer commit ad14947c3e13babe90a6878b45608fe56a16150d
iuc
parents: 0
diff changeset
22 "full": "https://data.gtdb.ecogenomic.org/releases/release207/207.0/auxillary_files/gtdbtk_r207_data.tar.gz",
3
c4830a9870fa planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/data_managers/data_manager_gtdbtk_database_installer commit 9f0b54aeff21df342d2593cff59e813b69cc7bad
iuc
parents: 2
diff changeset
23 "meta_ar": "https://data.gtdb.ecogenomic.org/releases/release207/207.0/ar53_metadata_r207.tar.gz",
c4830a9870fa planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/data_managers/data_manager_gtdbtk_database_installer commit 9f0b54aeff21df342d2593cff59e813b69cc7bad
iuc
parents: 2
diff changeset
24 "meta_bac": "https://data.gtdb.ecogenomic.org/releases/release207/207.0/bac120_metadata_r207.tar.gz",
2
6ab422fba1a3 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/data_managers/data_manager_gtdbtk_database_installer commit ad14947c3e13babe90a6878b45608fe56a16150d
iuc
parents: 0
diff changeset
25 },
6ab422fba1a3 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/data_managers/data_manager_gtdbtk_database_installer commit ad14947c3e13babe90a6878b45608fe56a16150d
iuc
parents: 0
diff changeset
26 "214": {
6ab422fba1a3 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/data_managers/data_manager_gtdbtk_database_installer commit ad14947c3e13babe90a6878b45608fe56a16150d
iuc
parents: 0
diff changeset
27 "full": "https://data.gtdb.ecogenomic.org/releases/release214/214.0/auxillary_files/gtdbtk_r214_data.tar.gz",
3
c4830a9870fa planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/data_managers/data_manager_gtdbtk_database_installer commit 9f0b54aeff21df342d2593cff59e813b69cc7bad
iuc
parents: 2
diff changeset
28 "meta_ar": "https://data.gtdb.ecogenomic.org/releases/release214/214.1/ar53_metadata_r214.tsv.gz",
c4830a9870fa planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/data_managers/data_manager_gtdbtk_database_installer commit 9f0b54aeff21df342d2593cff59e813b69cc7bad
iuc
parents: 2
diff changeset
29 "meta_bac": "https://data.gtdb.ecogenomic.org/releases/release214/214.1/bac120_metadata_r214.tsv.gz",
2
6ab422fba1a3 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/data_managers/data_manager_gtdbtk_database_installer commit ad14947c3e13babe90a6878b45608fe56a16150d
iuc
parents: 0
diff changeset
30 },
6ab422fba1a3 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/data_managers/data_manager_gtdbtk_database_installer commit ad14947c3e13babe90a6878b45608fe56a16150d
iuc
parents: 0
diff changeset
31 "220": {
6ab422fba1a3 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/data_managers/data_manager_gtdbtk_database_installer commit ad14947c3e13babe90a6878b45608fe56a16150d
iuc
parents: 0
diff changeset
32 "full": "https://data.gtdb.ecogenomic.org/releases/release220/220.0/auxillary_files/gtdbtk_package/full_package/gtdbtk_r220_data.tar.gz",
3
c4830a9870fa planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/data_managers/data_manager_gtdbtk_database_installer commit 9f0b54aeff21df342d2593cff59e813b69cc7bad
iuc
parents: 2
diff changeset
33 "meta_ar": "https://data.gtdb.ecogenomic.org/releases/release220/220.0/ar53_metadata_r220.tsv.gz",
c4830a9870fa planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/data_managers/data_manager_gtdbtk_database_installer commit 9f0b54aeff21df342d2593cff59e813b69cc7bad
iuc
parents: 2
diff changeset
34 "meta_bac": "https://data.gtdb.ecogenomic.org/releases/release220/220.0/bac120_metadata_r220.tsv.gz",
2
6ab422fba1a3 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/data_managers/data_manager_gtdbtk_database_installer commit ad14947c3e13babe90a6878b45608fe56a16150d
iuc
parents: 0
diff changeset
35 },
6ab422fba1a3 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/data_managers/data_manager_gtdbtk_database_installer commit ad14947c3e13babe90a6878b45608fe56a16150d
iuc
parents: 0
diff changeset
36 "test": { # using VERSION to check if files are there
6ab422fba1a3 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/data_managers/data_manager_gtdbtk_database_installer commit ad14947c3e13babe90a6878b45608fe56a16150d
iuc
parents: 0
diff changeset
37 "full": "https://data.gtdb.ecogenomic.org/releases/release220/220.0/VERSION.txt",
3
c4830a9870fa planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/data_managers/data_manager_gtdbtk_database_installer commit 9f0b54aeff21df342d2593cff59e813b69cc7bad
iuc
parents: 2
diff changeset
38 "meta_ar": "https://data.gtdb.ecogenomic.org/releases/release220/220.0/ar53_metadata_r220.tsv.gz",
c4830a9870fa planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/data_managers/data_manager_gtdbtk_database_installer commit 9f0b54aeff21df342d2593cff59e813b69cc7bad
iuc
parents: 2
diff changeset
39 "meta_bac": "https://data.gtdb.ecogenomic.org/releases/release220/220.0/bac120_metadata_r220.tsv.gz",
2
6ab422fba1a3 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/data_managers/data_manager_gtdbtk_database_installer commit ad14947c3e13babe90a6878b45608fe56a16150d
iuc
parents: 0
diff changeset
40 },
6ab422fba1a3 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/data_managers/data_manager_gtdbtk_database_installer commit ad14947c3e13babe90a6878b45608fe56a16150d
iuc
parents: 0
diff changeset
41 }
0
629464b96c2e planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/data_managers/data_manager_gtdbtk_database_installer commit 69da0d34ea6e72c0427ec2d3e882c86cbb90833f
iuc
parents:
diff changeset
42
629464b96c2e planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/data_managers/data_manager_gtdbtk_database_installer commit 69da0d34ea6e72c0427ec2d3e882c86cbb90833f
iuc
parents:
diff changeset
43
629464b96c2e planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/data_managers/data_manager_gtdbtk_database_installer commit 69da0d34ea6e72c0427ec2d3e882c86cbb90833f
iuc
parents:
diff changeset
44 def url_download(url, target_directory):
629464b96c2e planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/data_managers/data_manager_gtdbtk_database_installer commit 69da0d34ea6e72c0427ec2d3e882c86cbb90833f
iuc
parents:
diff changeset
45 url_parts = urlparse(url)
2
6ab422fba1a3 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/data_managers/data_manager_gtdbtk_database_installer commit ad14947c3e13babe90a6878b45608fe56a16150d
iuc
parents: 0
diff changeset
46 tarball = os.path.abspath(
6ab422fba1a3 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/data_managers/data_manager_gtdbtk_database_installer commit ad14947c3e13babe90a6878b45608fe56a16150d
iuc
parents: 0
diff changeset
47 os.path.join(target_directory, os.path.basename(url_parts.path))
6ab422fba1a3 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/data_managers/data_manager_gtdbtk_database_installer commit ad14947c3e13babe90a6878b45608fe56a16150d
iuc
parents: 0
diff changeset
48 )
0
629464b96c2e planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/data_managers/data_manager_gtdbtk_database_installer commit 69da0d34ea6e72c0427ec2d3e882c86cbb90833f
iuc
parents:
diff changeset
49 src = None
629464b96c2e planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/data_managers/data_manager_gtdbtk_database_installer commit 69da0d34ea6e72c0427ec2d3e882c86cbb90833f
iuc
parents:
diff changeset
50 dst = None
629464b96c2e planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/data_managers/data_manager_gtdbtk_database_installer commit 69da0d34ea6e72c0427ec2d3e882c86cbb90833f
iuc
parents:
diff changeset
51 try:
629464b96c2e planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/data_managers/data_manager_gtdbtk_database_installer commit 69da0d34ea6e72c0427ec2d3e882c86cbb90833f
iuc
parents:
diff changeset
52 req = Request(url)
629464b96c2e planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/data_managers/data_manager_gtdbtk_database_installer commit 69da0d34ea6e72c0427ec2d3e882c86cbb90833f
iuc
parents:
diff changeset
53 src = urlopen(req)
2
6ab422fba1a3 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/data_managers/data_manager_gtdbtk_database_installer commit ad14947c3e13babe90a6878b45608fe56a16150d
iuc
parents: 0
diff changeset
54 with open(tarball, "wb") as dst:
0
629464b96c2e planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/data_managers/data_manager_gtdbtk_database_installer commit 69da0d34ea6e72c0427ec2d3e882c86cbb90833f
iuc
parents:
diff changeset
55 while True:
629464b96c2e planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/data_managers/data_manager_gtdbtk_database_installer commit 69da0d34ea6e72c0427ec2d3e882c86cbb90833f
iuc
parents:
diff changeset
56 chunk = src.read(2**10)
629464b96c2e planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/data_managers/data_manager_gtdbtk_database_installer commit 69da0d34ea6e72c0427ec2d3e882c86cbb90833f
iuc
parents:
diff changeset
57 if chunk:
629464b96c2e planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/data_managers/data_manager_gtdbtk_database_installer commit 69da0d34ea6e72c0427ec2d3e882c86cbb90833f
iuc
parents:
diff changeset
58 dst.write(chunk)
629464b96c2e planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/data_managers/data_manager_gtdbtk_database_installer commit 69da0d34ea6e72c0427ec2d3e882c86cbb90833f
iuc
parents:
diff changeset
59 else:
629464b96c2e planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/data_managers/data_manager_gtdbtk_database_installer commit 69da0d34ea6e72c0427ec2d3e882c86cbb90833f
iuc
parents:
diff changeset
60 break
629464b96c2e planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/data_managers/data_manager_gtdbtk_database_installer commit 69da0d34ea6e72c0427ec2d3e882c86cbb90833f
iuc
parents:
diff changeset
61 except Exception as e:
629464b96c2e planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/data_managers/data_manager_gtdbtk_database_installer commit 69da0d34ea6e72c0427ec2d3e882c86cbb90833f
iuc
parents:
diff changeset
62 sys.exit(str(e))
629464b96c2e planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/data_managers/data_manager_gtdbtk_database_installer commit 69da0d34ea6e72c0427ec2d3e882c86cbb90833f
iuc
parents:
diff changeset
63 finally:
629464b96c2e planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/data_managers/data_manager_gtdbtk_database_installer commit 69da0d34ea6e72c0427ec2d3e882c86cbb90833f
iuc
parents:
diff changeset
64 if src is not None:
629464b96c2e planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/data_managers/data_manager_gtdbtk_database_installer commit 69da0d34ea6e72c0427ec2d3e882c86cbb90833f
iuc
parents:
diff changeset
65 src.close()
629464b96c2e planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/data_managers/data_manager_gtdbtk_database_installer commit 69da0d34ea6e72c0427ec2d3e882c86cbb90833f
iuc
parents:
diff changeset
66 if tarfile.is_tarfile(tarball):
2
6ab422fba1a3 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/data_managers/data_manager_gtdbtk_database_installer commit ad14947c3e13babe90a6878b45608fe56a16150d
iuc
parents: 0
diff changeset
67 fh = tarfile.open(tarball, "r:*")
0
629464b96c2e planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/data_managers/data_manager_gtdbtk_database_installer commit 69da0d34ea6e72c0427ec2d3e882c86cbb90833f
iuc
parents:
diff changeset
68 else:
2
6ab422fba1a3 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/data_managers/data_manager_gtdbtk_database_installer commit ad14947c3e13babe90a6878b45608fe56a16150d
iuc
parents: 0
diff changeset
69 # unzip metadata file
6ab422fba1a3 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/data_managers/data_manager_gtdbtk_database_installer commit ad14947c3e13babe90a6878b45608fe56a16150d
iuc
parents: 0
diff changeset
70 if ".gz" in tarball:
6ab422fba1a3 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/data_managers/data_manager_gtdbtk_database_installer commit ad14947c3e13babe90a6878b45608fe56a16150d
iuc
parents: 0
diff changeset
71 with gzip.open(tarball, "rb") as f_in:
6ab422fba1a3 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/data_managers/data_manager_gtdbtk_database_installer commit ad14947c3e13babe90a6878b45608fe56a16150d
iuc
parents: 0
diff changeset
72 unzipped_file = tarball.strip(".gz")
6ab422fba1a3 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/data_managers/data_manager_gtdbtk_database_installer commit ad14947c3e13babe90a6878b45608fe56a16150d
iuc
parents: 0
diff changeset
73 with open(unzipped_file, "wb") as f_out:
6ab422fba1a3 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/data_managers/data_manager_gtdbtk_database_installer commit ad14947c3e13babe90a6878b45608fe56a16150d
iuc
parents: 0
diff changeset
74 shutil.copyfileobj(f_in, f_out)
6ab422fba1a3 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/data_managers/data_manager_gtdbtk_database_installer commit ad14947c3e13babe90a6878b45608fe56a16150d
iuc
parents: 0
diff changeset
75 os.remove(tarball)
6ab422fba1a3 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/data_managers/data_manager_gtdbtk_database_installer commit ad14947c3e13babe90a6878b45608fe56a16150d
iuc
parents: 0
diff changeset
76 folder_of_unzipped_file = os.path.dirname(unzipped_file)
6ab422fba1a3 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/data_managers/data_manager_gtdbtk_database_installer commit ad14947c3e13babe90a6878b45608fe56a16150d
iuc
parents: 0
diff changeset
77 return folder_of_unzipped_file
6ab422fba1a3 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/data_managers/data_manager_gtdbtk_database_installer commit ad14947c3e13babe90a6878b45608fe56a16150d
iuc
parents: 0
diff changeset
78 else:
6ab422fba1a3 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/data_managers/data_manager_gtdbtk_database_installer commit ad14947c3e13babe90a6878b45608fe56a16150d
iuc
parents: 0
diff changeset
79 # this is basically only the return for the test not using a tarfile
6ab422fba1a3 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/data_managers/data_manager_gtdbtk_database_installer commit ad14947c3e13babe90a6878b45608fe56a16150d
iuc
parents: 0
diff changeset
80 return tarball
0
629464b96c2e planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/data_managers/data_manager_gtdbtk_database_installer commit 69da0d34ea6e72c0427ec2d3e882c86cbb90833f
iuc
parents:
diff changeset
81 fh.extractall(target_directory)
629464b96c2e planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/data_managers/data_manager_gtdbtk_database_installer commit 69da0d34ea6e72c0427ec2d3e882c86cbb90833f
iuc
parents:
diff changeset
82 fh.close()
629464b96c2e planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/data_managers/data_manager_gtdbtk_database_installer commit 69da0d34ea6e72c0427ec2d3e882c86cbb90833f
iuc
parents:
diff changeset
83 os.remove(tarball)
629464b96c2e planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/data_managers/data_manager_gtdbtk_database_installer commit 69da0d34ea6e72c0427ec2d3e882c86cbb90833f
iuc
parents:
diff changeset
84 # The tarball extraction will create a directory named
629464b96c2e planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/data_managers/data_manager_gtdbtk_database_installer commit 69da0d34ea6e72c0427ec2d3e882c86cbb90833f
iuc
parents:
diff changeset
85 # something like release202 in the target_directory, so
629464b96c2e planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/data_managers/data_manager_gtdbtk_database_installer commit 69da0d34ea6e72c0427ec2d3e882c86cbb90833f
iuc
parents:
diff changeset
86 # we need to move the items in that directory to the
629464b96c2e planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/data_managers/data_manager_gtdbtk_database_installer commit 69da0d34ea6e72c0427ec2d3e882c86cbb90833f
iuc
parents:
diff changeset
87 # target directory.
629464b96c2e planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/data_managers/data_manager_gtdbtk_database_installer commit 69da0d34ea6e72c0427ec2d3e882c86cbb90833f
iuc
parents:
diff changeset
88 subdir = next(os.walk(target_directory))[1][0]
629464b96c2e planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/data_managers/data_manager_gtdbtk_database_installer commit 69da0d34ea6e72c0427ec2d3e882c86cbb90833f
iuc
parents:
diff changeset
89 subdir_path = os.path.join(target_directory, subdir)
629464b96c2e planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/data_managers/data_manager_gtdbtk_database_installer commit 69da0d34ea6e72c0427ec2d3e882c86cbb90833f
iuc
parents:
diff changeset
90 items = os.listdir(subdir_path)
629464b96c2e planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/data_managers/data_manager_gtdbtk_database_installer commit 69da0d34ea6e72c0427ec2d3e882c86cbb90833f
iuc
parents:
diff changeset
91 for item in items:
629464b96c2e planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/data_managers/data_manager_gtdbtk_database_installer commit 69da0d34ea6e72c0427ec2d3e882c86cbb90833f
iuc
parents:
diff changeset
92 item_path = os.path.join(subdir_path, item)
629464b96c2e planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/data_managers/data_manager_gtdbtk_database_installer commit 69da0d34ea6e72c0427ec2d3e882c86cbb90833f
iuc
parents:
diff changeset
93 shutil.move(item_path, target_directory)
629464b96c2e planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/data_managers/data_manager_gtdbtk_database_installer commit 69da0d34ea6e72c0427ec2d3e882c86cbb90833f
iuc
parents:
diff changeset
94 os.rmdir(subdir_path)
629464b96c2e planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/data_managers/data_manager_gtdbtk_database_installer commit 69da0d34ea6e72c0427ec2d3e882c86cbb90833f
iuc
parents:
diff changeset
95 return target_directory
629464b96c2e planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/data_managers/data_manager_gtdbtk_database_installer commit 69da0d34ea6e72c0427ec2d3e882c86cbb90833f
iuc
parents:
diff changeset
96
629464b96c2e planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/data_managers/data_manager_gtdbtk_database_installer commit 69da0d34ea6e72c0427ec2d3e882c86cbb90833f
iuc
parents:
diff changeset
97
2
6ab422fba1a3 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/data_managers/data_manager_gtdbtk_database_installer commit ad14947c3e13babe90a6878b45608fe56a16150d
iuc
parents: 0
diff changeset
98 def download(database_name, release, meta, test, out_file):
0
629464b96c2e planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/data_managers/data_manager_gtdbtk_database_installer commit 69da0d34ea6e72c0427ec2d3e882c86cbb90833f
iuc
parents:
diff changeset
99
629464b96c2e planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/data_managers/data_manager_gtdbtk_database_installer commit 69da0d34ea6e72c0427ec2d3e882c86cbb90833f
iuc
parents:
diff changeset
100 with open(out_file) as fh:
629464b96c2e planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/data_managers/data_manager_gtdbtk_database_installer commit 69da0d34ea6e72c0427ec2d3e882c86cbb90833f
iuc
parents:
diff changeset
101 params = json.load(fh)
629464b96c2e planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/data_managers/data_manager_gtdbtk_database_installer commit 69da0d34ea6e72c0427ec2d3e882c86cbb90833f
iuc
parents:
diff changeset
102
2
6ab422fba1a3 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/data_managers/data_manager_gtdbtk_database_installer commit ad14947c3e13babe90a6878b45608fe56a16150d
iuc
parents: 0
diff changeset
103 target_directory = params["output_data"][0]["extra_files_path"]
0
629464b96c2e planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/data_managers/data_manager_gtdbtk_database_installer commit 69da0d34ea6e72c0427ec2d3e882c86cbb90833f
iuc
parents:
diff changeset
104 os.makedirs(target_directory)
2
6ab422fba1a3 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/data_managers/data_manager_gtdbtk_database_installer commit ad14947c3e13babe90a6878b45608fe56a16150d
iuc
parents: 0
diff changeset
105
6ab422fba1a3 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/data_managers/data_manager_gtdbtk_database_installer commit ad14947c3e13babe90a6878b45608fe56a16150d
iuc
parents: 0
diff changeset
106 if test:
6ab422fba1a3 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/data_managers/data_manager_gtdbtk_database_installer commit ad14947c3e13babe90a6878b45608fe56a16150d
iuc
parents: 0
diff changeset
107 release = "test"
6ab422fba1a3 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/data_managers/data_manager_gtdbtk_database_installer commit ad14947c3e13babe90a6878b45608fe56a16150d
iuc
parents: 0
diff changeset
108
6ab422fba1a3 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/data_managers/data_manager_gtdbtk_database_installer commit ad14947c3e13babe90a6878b45608fe56a16150d
iuc
parents: 0
diff changeset
109 # download both taxonomy metadata tables
6ab422fba1a3 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/data_managers/data_manager_gtdbtk_database_installer commit ad14947c3e13babe90a6878b45608fe56a16150d
iuc
parents: 0
diff changeset
110 if meta:
6ab422fba1a3 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/data_managers/data_manager_gtdbtk_database_installer commit ad14947c3e13babe90a6878b45608fe56a16150d
iuc
parents: 0
diff changeset
111 url = urls[release]["meta_ar"]
6ab422fba1a3 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/data_managers/data_manager_gtdbtk_database_installer commit ad14947c3e13babe90a6878b45608fe56a16150d
iuc
parents: 0
diff changeset
112 file_path = url_download(url, target_directory)
6ab422fba1a3 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/data_managers/data_manager_gtdbtk_database_installer commit ad14947c3e13babe90a6878b45608fe56a16150d
iuc
parents: 0
diff changeset
113 url = urls[release]["meta_bac"]
6ab422fba1a3 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/data_managers/data_manager_gtdbtk_database_installer commit ad14947c3e13babe90a6878b45608fe56a16150d
iuc
parents: 0
diff changeset
114 file_path = url_download(url, target_directory)
6ab422fba1a3 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/data_managers/data_manager_gtdbtk_database_installer commit ad14947c3e13babe90a6878b45608fe56a16150d
iuc
parents: 0
diff changeset
115 # download the full DB
6ab422fba1a3 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/data_managers/data_manager_gtdbtk_database_installer commit ad14947c3e13babe90a6878b45608fe56a16150d
iuc
parents: 0
diff changeset
116 else:
6ab422fba1a3 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/data_managers/data_manager_gtdbtk_database_installer commit ad14947c3e13babe90a6878b45608fe56a16150d
iuc
parents: 0
diff changeset
117 url = urls[release]["full"]
6ab422fba1a3 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/data_managers/data_manager_gtdbtk_database_installer commit ad14947c3e13babe90a6878b45608fe56a16150d
iuc
parents: 0
diff changeset
118 file_path = url_download(url, target_directory)
6ab422fba1a3 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/data_managers/data_manager_gtdbtk_database_installer commit ad14947c3e13babe90a6878b45608fe56a16150d
iuc
parents: 0
diff changeset
119
6ab422fba1a3 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/data_managers/data_manager_gtdbtk_database_installer commit ad14947c3e13babe90a6878b45608fe56a16150d
iuc
parents: 0
diff changeset
120 time = datetime.utcnow().strftime("%Y-%m-%d")
0
629464b96c2e planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/data_managers/data_manager_gtdbtk_database_installer commit 69da0d34ea6e72c0427ec2d3e882c86cbb90833f
iuc
parents:
diff changeset
121
629464b96c2e planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/data_managers/data_manager_gtdbtk_database_installer commit 69da0d34ea6e72c0427ec2d3e882c86cbb90833f
iuc
parents:
diff changeset
122 data_manager_json = {"data_tables": {}}
629464b96c2e planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/data_managers/data_manager_gtdbtk_database_installer commit 69da0d34ea6e72c0427ec2d3e882c86cbb90833f
iuc
parents:
diff changeset
123 data_manager_entry = {}
2
6ab422fba1a3 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/data_managers/data_manager_gtdbtk_database_installer commit ad14947c3e13babe90a6878b45608fe56a16150d
iuc
parents: 0
diff changeset
124 data_manager_entry["value"] = f"{database_name}_release_{release}_downloaded_{time}"
6ab422fba1a3 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/data_managers/data_manager_gtdbtk_database_installer commit ad14947c3e13babe90a6878b45608fe56a16150d
iuc
parents: 0
diff changeset
125 data_manager_entry["name"] = database_name
6ab422fba1a3 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/data_managers/data_manager_gtdbtk_database_installer commit ad14947c3e13babe90a6878b45608fe56a16150d
iuc
parents: 0
diff changeset
126 data_manager_entry["path"] = file_path
6ab422fba1a3 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/data_managers/data_manager_gtdbtk_database_installer commit ad14947c3e13babe90a6878b45608fe56a16150d
iuc
parents: 0
diff changeset
127 data_manager_entry["version"] = release
0
629464b96c2e planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/data_managers/data_manager_gtdbtk_database_installer commit 69da0d34ea6e72c0427ec2d3e882c86cbb90833f
iuc
parents:
diff changeset
128
2
6ab422fba1a3 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/data_managers/data_manager_gtdbtk_database_installer commit ad14947c3e13babe90a6878b45608fe56a16150d
iuc
parents: 0
diff changeset
129 # store in dedicated metadata table
6ab422fba1a3 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/data_managers/data_manager_gtdbtk_database_installer commit ad14947c3e13babe90a6878b45608fe56a16150d
iuc
parents: 0
diff changeset
130 if meta:
6ab422fba1a3 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/data_managers/data_manager_gtdbtk_database_installer commit ad14947c3e13babe90a6878b45608fe56a16150d
iuc
parents: 0
diff changeset
131 data_manager_json["data_tables"][
6ab422fba1a3 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/data_managers/data_manager_gtdbtk_database_installer commit ad14947c3e13babe90a6878b45608fe56a16150d
iuc
parents: 0
diff changeset
132 "gtdbtk_database_metadata_versioned"
6ab422fba1a3 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/data_managers/data_manager_gtdbtk_database_installer commit ad14947c3e13babe90a6878b45608fe56a16150d
iuc
parents: 0
diff changeset
133 ] = data_manager_entry
6ab422fba1a3 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/data_managers/data_manager_gtdbtk_database_installer commit ad14947c3e13babe90a6878b45608fe56a16150d
iuc
parents: 0
diff changeset
134 else:
6ab422fba1a3 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/data_managers/data_manager_gtdbtk_database_installer commit ad14947c3e13babe90a6878b45608fe56a16150d
iuc
parents: 0
diff changeset
135 data_manager_json["data_tables"][
6ab422fba1a3 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/data_managers/data_manager_gtdbtk_database_installer commit ad14947c3e13babe90a6878b45608fe56a16150d
iuc
parents: 0
diff changeset
136 "gtdbtk_database_versioned"
6ab422fba1a3 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/data_managers/data_manager_gtdbtk_database_installer commit ad14947c3e13babe90a6878b45608fe56a16150d
iuc
parents: 0
diff changeset
137 ] = data_manager_entry
6ab422fba1a3 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/data_managers/data_manager_gtdbtk_database_installer commit ad14947c3e13babe90a6878b45608fe56a16150d
iuc
parents: 0
diff changeset
138
6ab422fba1a3 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/data_managers/data_manager_gtdbtk_database_installer commit ad14947c3e13babe90a6878b45608fe56a16150d
iuc
parents: 0
diff changeset
139 with open(out_file, "w") as fh:
0
629464b96c2e planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/data_managers/data_manager_gtdbtk_database_installer commit 69da0d34ea6e72c0427ec2d3e882c86cbb90833f
iuc
parents:
diff changeset
140 json.dump(data_manager_json, fh, sort_keys=True)
629464b96c2e planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/data_managers/data_manager_gtdbtk_database_installer commit 69da0d34ea6e72c0427ec2d3e882c86cbb90833f
iuc
parents:
diff changeset
141
629464b96c2e planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/data_managers/data_manager_gtdbtk_database_installer commit 69da0d34ea6e72c0427ec2d3e882c86cbb90833f
iuc
parents:
diff changeset
142
629464b96c2e planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/data_managers/data_manager_gtdbtk_database_installer commit 69da0d34ea6e72c0427ec2d3e882c86cbb90833f
iuc
parents:
diff changeset
143 parser = argparse.ArgumentParser()
629464b96c2e planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/data_managers/data_manager_gtdbtk_database_installer commit 69da0d34ea6e72c0427ec2d3e882c86cbb90833f
iuc
parents:
diff changeset
144
2
6ab422fba1a3 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/data_managers/data_manager_gtdbtk_database_installer commit ad14947c3e13babe90a6878b45608fe56a16150d
iuc
parents: 0
diff changeset
145 parser.add_argument(
6ab422fba1a3 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/data_managers/data_manager_gtdbtk_database_installer commit ad14947c3e13babe90a6878b45608fe56a16150d
iuc
parents: 0
diff changeset
146 "--database_name", dest="database_name", help="GTDB-Tk database display name"
6ab422fba1a3 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/data_managers/data_manager_gtdbtk_database_installer commit ad14947c3e13babe90a6878b45608fe56a16150d
iuc
parents: 0
diff changeset
147 )
6ab422fba1a3 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/data_managers/data_manager_gtdbtk_database_installer commit ad14947c3e13babe90a6878b45608fe56a16150d
iuc
parents: 0
diff changeset
148
6ab422fba1a3 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/data_managers/data_manager_gtdbtk_database_installer commit ad14947c3e13babe90a6878b45608fe56a16150d
iuc
parents: 0
diff changeset
149 parser.add_argument("--version", dest="version", help="DB version")
6ab422fba1a3 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/data_managers/data_manager_gtdbtk_database_installer commit ad14947c3e13babe90a6878b45608fe56a16150d
iuc
parents: 0
diff changeset
150
6ab422fba1a3 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/data_managers/data_manager_gtdbtk_database_installer commit ad14947c3e13babe90a6878b45608fe56a16150d
iuc
parents: 0
diff changeset
151 parser.add_argument(
6ab422fba1a3 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/data_managers/data_manager_gtdbtk_database_installer commit ad14947c3e13babe90a6878b45608fe56a16150d
iuc
parents: 0
diff changeset
152 "--release", dest="release", help="Release of the GTDB-Tk database version"
6ab422fba1a3 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/data_managers/data_manager_gtdbtk_database_installer commit ad14947c3e13babe90a6878b45608fe56a16150d
iuc
parents: 0
diff changeset
153 )
6ab422fba1a3 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/data_managers/data_manager_gtdbtk_database_installer commit ad14947c3e13babe90a6878b45608fe56a16150d
iuc
parents: 0
diff changeset
154 parser.add_argument("--out_file", dest="out_file", help="JSON output file")
6ab422fba1a3 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/data_managers/data_manager_gtdbtk_database_installer commit ad14947c3e13babe90a6878b45608fe56a16150d
iuc
parents: 0
diff changeset
155 parser.add_argument(
6ab422fba1a3 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/data_managers/data_manager_gtdbtk_database_installer commit ad14947c3e13babe90a6878b45608fe56a16150d
iuc
parents: 0
diff changeset
156 "--meta",
6ab422fba1a3 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/data_managers/data_manager_gtdbtk_database_installer commit ad14947c3e13babe90a6878b45608fe56a16150d
iuc
parents: 0
diff changeset
157 dest="meta",
6ab422fba1a3 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/data_managers/data_manager_gtdbtk_database_installer commit ad14947c3e13babe90a6878b45608fe56a16150d
iuc
parents: 0
diff changeset
158 action="store_true",
6ab422fba1a3 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/data_managers/data_manager_gtdbtk_database_installer commit ad14947c3e13babe90a6878b45608fe56a16150d
iuc
parents: 0
diff changeset
159 help="Store meta data flag",
6ab422fba1a3 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/data_managers/data_manager_gtdbtk_database_installer commit ad14947c3e13babe90a6878b45608fe56a16150d
iuc
parents: 0
diff changeset
160 )
6ab422fba1a3 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/data_managers/data_manager_gtdbtk_database_installer commit ad14947c3e13babe90a6878b45608fe56a16150d
iuc
parents: 0
diff changeset
161
6ab422fba1a3 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/data_managers/data_manager_gtdbtk_database_installer commit ad14947c3e13babe90a6878b45608fe56a16150d
iuc
parents: 0
diff changeset
162 parser.add_argument(
6ab422fba1a3 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/data_managers/data_manager_gtdbtk_database_installer commit ad14947c3e13babe90a6878b45608fe56a16150d
iuc
parents: 0
diff changeset
163 "--test",
6ab422fba1a3 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/data_managers/data_manager_gtdbtk_database_installer commit ad14947c3e13babe90a6878b45608fe56a16150d
iuc
parents: 0
diff changeset
164 dest="test",
6ab422fba1a3 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/data_managers/data_manager_gtdbtk_database_installer commit ad14947c3e13babe90a6878b45608fe56a16150d
iuc
parents: 0
diff changeset
165 action="store_true",
6ab422fba1a3 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/data_managers/data_manager_gtdbtk_database_installer commit ad14947c3e13babe90a6878b45608fe56a16150d
iuc
parents: 0
diff changeset
166 help="Run test",
6ab422fba1a3 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/data_managers/data_manager_gtdbtk_database_installer commit ad14947c3e13babe90a6878b45608fe56a16150d
iuc
parents: 0
diff changeset
167 )
0
629464b96c2e planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/data_managers/data_manager_gtdbtk_database_installer commit 69da0d34ea6e72c0427ec2d3e882c86cbb90833f
iuc
parents:
diff changeset
168
629464b96c2e planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/data_managers/data_manager_gtdbtk_database_installer commit 69da0d34ea6e72c0427ec2d3e882c86cbb90833f
iuc
parents:
diff changeset
169 args = parser.parse_args()
629464b96c2e planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/data_managers/data_manager_gtdbtk_database_installer commit 69da0d34ea6e72c0427ec2d3e882c86cbb90833f
iuc
parents:
diff changeset
170
2
6ab422fba1a3 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/data_managers/data_manager_gtdbtk_database_installer commit ad14947c3e13babe90a6878b45608fe56a16150d
iuc
parents: 0
diff changeset
171 download(
6ab422fba1a3 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/data_managers/data_manager_gtdbtk_database_installer commit ad14947c3e13babe90a6878b45608fe56a16150d
iuc
parents: 0
diff changeset
172 args.database_name,
6ab422fba1a3 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/data_managers/data_manager_gtdbtk_database_installer commit ad14947c3e13babe90a6878b45608fe56a16150d
iuc
parents: 0
diff changeset
173 args.release,
6ab422fba1a3 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/data_managers/data_manager_gtdbtk_database_installer commit ad14947c3e13babe90a6878b45608fe56a16150d
iuc
parents: 0
diff changeset
174 args.meta,
6ab422fba1a3 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/data_managers/data_manager_gtdbtk_database_installer commit ad14947c3e13babe90a6878b45608fe56a16150d
iuc
parents: 0
diff changeset
175 args.test,
6ab422fba1a3 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/data_managers/data_manager_gtdbtk_database_installer commit ad14947c3e13babe90a6878b45608fe56a16150d
iuc
parents: 0
diff changeset
176 args.out_file,
6ab422fba1a3 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/data_managers/data_manager_gtdbtk_database_installer commit ad14947c3e13babe90a6878b45608fe56a16150d
iuc
parents: 0
diff changeset
177 )