Mercurial > repos > iuc > data_manager_snpeff
annotate data_manager/data_manager_snpEff_download.py @ 9:08d7998c3afb draft
"planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/data_managers/data_manager_snpeff commit 036feef4f46b5aedabc5080c8fa4bc00d9c30d95"
author | iuc |
---|---|
date | Wed, 12 Feb 2020 18:33:53 -0500 |
parents | d107d20dc6bd |
children | c6fbc5421697 |
rev | line source |
---|---|
0 | 1 #!/usr/bin/env python |
1
85a23e2dd92b
planemo upload for repository https://github.com/galaxyproject/tools-devteam/tree/master/data_managers/data_manager_snpeff commit 88c982c5adcd32b11d98428fc554a4fdfcc19584
iuc
parents:
0
diff
changeset
|
2 import json |
85a23e2dd92b
planemo upload for repository https://github.com/galaxyproject/tools-devteam/tree/master/data_managers/data_manager_snpeff commit 88c982c5adcd32b11d98428fc554a4fdfcc19584
iuc
parents:
0
diff
changeset
|
3 import optparse |
0 | 4 import os |
5 import re | |
6 import subprocess | |
1
85a23e2dd92b
planemo upload for repository https://github.com/galaxyproject/tools-devteam/tree/master/data_managers/data_manager_snpeff commit 88c982c5adcd32b11d98428fc554a4fdfcc19584
iuc
parents:
0
diff
changeset
|
7 import sys |
0 | 8 |
9 | |
10 def stop_err(msg): | |
11 sys.stderr.write(msg) | |
12 sys.exit(1) | |
13 | |
14 | |
5
3d9dd4b9fb09
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/data_managers/data_manager_snpeff commit 5c6d595ecbf2e4e39c25662a165c9e475e01ecd1-dirty
iuc
parents:
4
diff
changeset
|
15 def fetch_databases(genome_list=None): |
0 | 16 snpDBs = dict() |
1
85a23e2dd92b
planemo upload for repository https://github.com/galaxyproject/tools-devteam/tree/master/data_managers/data_manager_snpeff commit 88c982c5adcd32b11d98428fc554a4fdfcc19584
iuc
parents:
0
diff
changeset
|
17 databases_path = 'databases.out' |
85a23e2dd92b
planemo upload for repository https://github.com/galaxyproject/tools-devteam/tree/master/data_managers/data_manager_snpeff commit 88c982c5adcd32b11d98428fc554a4fdfcc19584
iuc
parents:
0
diff
changeset
|
18 databases_output = open(databases_path, 'w') |
5
3d9dd4b9fb09
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/data_managers/data_manager_snpeff commit 5c6d595ecbf2e4e39c25662a165c9e475e01ecd1-dirty
iuc
parents:
4
diff
changeset
|
19 args = ['snpEff', 'databases'] |
3d9dd4b9fb09
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/data_managers/data_manager_snpeff commit 5c6d595ecbf2e4e39c25662a165c9e475e01ecd1-dirty
iuc
parents:
4
diff
changeset
|
20 return_code = subprocess.call(args=args, shell=False, stdout=databases_output.fileno()) |
0 | 21 if return_code: |
9
08d7998c3afb
"planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/data_managers/data_manager_snpeff commit 036feef4f46b5aedabc5080c8fa4bc00d9c30d95"
iuc
parents:
8
diff
changeset
|
22 sys.exit(return_code) |
0 | 23 databases_output.close() |
24 try: | |
1
85a23e2dd92b
planemo upload for repository https://github.com/galaxyproject/tools-devteam/tree/master/data_managers/data_manager_snpeff commit 88c982c5adcd32b11d98428fc554a4fdfcc19584
iuc
parents:
0
diff
changeset
|
25 fh = open(databases_path, 'r') |
85a23e2dd92b
planemo upload for repository https://github.com/galaxyproject/tools-devteam/tree/master/data_managers/data_manager_snpeff commit 88c982c5adcd32b11d98428fc554a4fdfcc19584
iuc
parents:
0
diff
changeset
|
26 for i, line in enumerate(fh): |
0 | 27 fields = line.split('\t') |
28 if len(fields) >= 2: | |
29 genome_version = fields[0].strip() | |
30 if genome_list and genome_version not in genome_list: | |
31 continue | |
32 if genome_version.startswith("Genome") or genome_version.startswith("-"): | |
33 continue | |
34 description = fields[1].strip() | |
1
85a23e2dd92b
planemo upload for repository https://github.com/galaxyproject/tools-devteam/tree/master/data_managers/data_manager_snpeff commit 88c982c5adcd32b11d98428fc554a4fdfcc19584
iuc
parents:
0
diff
changeset
|
35 snpDBs[genome_version] = description |
85a23e2dd92b
planemo upload for repository https://github.com/galaxyproject/tools-devteam/tree/master/data_managers/data_manager_snpeff commit 88c982c5adcd32b11d98428fc554a4fdfcc19584
iuc
parents:
0
diff
changeset
|
36 except Exception as e: |
9
08d7998c3afb
"planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/data_managers/data_manager_snpeff commit 036feef4f46b5aedabc5080c8fa4bc00d9c30d95"
iuc
parents:
8
diff
changeset
|
37 stop_err('Error parsing %s %s\n' % (databases_path, str(e))) |
0 | 38 else: |
39 fh.close() | |
40 return snpDBs | |
41 | |
1
85a23e2dd92b
planemo upload for repository https://github.com/galaxyproject/tools-devteam/tree/master/data_managers/data_manager_snpeff commit 88c982c5adcd32b11d98428fc554a4fdfcc19584
iuc
parents:
0
diff
changeset
|
42 |
5
3d9dd4b9fb09
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/data_managers/data_manager_snpeff commit 5c6d595ecbf2e4e39c25662a165c9e475e01ecd1-dirty
iuc
parents:
4
diff
changeset
|
43 def getOrganismNames(genomes, organisms): |
0 | 44 genome_list = genomes.split(',') |
45 organism_list = organisms.split(',') if organisms else [] | |
46 if len(genome_list) != len(organism_list): | |
47 descriptions = [] | |
5
3d9dd4b9fb09
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/data_managers/data_manager_snpeff commit 5c6d595ecbf2e4e39c25662a165c9e475e01ecd1-dirty
iuc
parents:
4
diff
changeset
|
48 snpDBdict = fetch_databases(genome_list=genome_list) |
0 | 49 for genome in snpDBdict: |
50 descriptions.append(snpDBdict[genome] if genome in snpDBdict else genome) | |
51 return ','.join(descriptions) | |
1
85a23e2dd92b
planemo upload for repository https://github.com/galaxyproject/tools-devteam/tree/master/data_managers/data_manager_snpeff commit 88c982c5adcd32b11d98428fc554a4fdfcc19584
iuc
parents:
0
diff
changeset
|
52 return organisms |
85a23e2dd92b
planemo upload for repository https://github.com/galaxyproject/tools-devteam/tree/master/data_managers/data_manager_snpeff commit 88c982c5adcd32b11d98428fc554a4fdfcc19584
iuc
parents:
0
diff
changeset
|
53 |
0 | 54 |
5
3d9dd4b9fb09
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/data_managers/data_manager_snpeff commit 5c6d595ecbf2e4e39c25662a165c9e475e01ecd1-dirty
iuc
parents:
4
diff
changeset
|
55 def getSnpeffVersion(): |
0 | 56 snpeff_version = 'SnpEff ?.?' |
57 stderr_path = 'snpeff.err' | |
1
85a23e2dd92b
planemo upload for repository https://github.com/galaxyproject/tools-devteam/tree/master/data_managers/data_manager_snpeff commit 88c982c5adcd32b11d98428fc554a4fdfcc19584
iuc
parents:
0
diff
changeset
|
58 stderr_fh = open(stderr_path, 'w') |
5
3d9dd4b9fb09
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/data_managers/data_manager_snpeff commit 5c6d595ecbf2e4e39c25662a165c9e475e01ecd1-dirty
iuc
parents:
4
diff
changeset
|
59 args = ['snpEff', '-h'] |
3d9dd4b9fb09
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/data_managers/data_manager_snpeff commit 5c6d595ecbf2e4e39c25662a165c9e475e01ecd1-dirty
iuc
parents:
4
diff
changeset
|
60 return_code = subprocess.call(args=args, shell=False, stderr=stderr_fh.fileno()) |
0 | 61 if return_code != 255: |
9
08d7998c3afb
"planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/data_managers/data_manager_snpeff commit 036feef4f46b5aedabc5080c8fa4bc00d9c30d95"
iuc
parents:
8
diff
changeset
|
62 sys.exit(return_code) |
0 | 63 stderr_fh.close() |
1
85a23e2dd92b
planemo upload for repository https://github.com/galaxyproject/tools-devteam/tree/master/data_managers/data_manager_snpeff commit 88c982c5adcd32b11d98428fc554a4fdfcc19584
iuc
parents:
0
diff
changeset
|
64 fh = open(stderr_path, 'r') |
0 | 65 for line in fh: |
8
d107d20dc6bd
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/data_managers/data_manager_snpeff commit a4b0969b33a68a0ea9ba12291f6694aec24f13ed
iuc
parents:
7
diff
changeset
|
66 m = re.match(r'^[Ss]npEff version (SnpEff)\s*(\d+\.\d+).*$', line) |
0 | 67 if m: |
68 snpeff_version = m.groups()[0] + m.groups()[1] | |
69 break | |
70 fh.close() | |
71 return snpeff_version | |
72 | |
1
85a23e2dd92b
planemo upload for repository https://github.com/galaxyproject/tools-devteam/tree/master/data_managers/data_manager_snpeff commit 88c982c5adcd32b11d98428fc554a4fdfcc19584
iuc
parents:
0
diff
changeset
|
73 |
85a23e2dd92b
planemo upload for repository https://github.com/galaxyproject/tools-devteam/tree/master/data_managers/data_manager_snpeff commit 88c982c5adcd32b11d98428fc554a4fdfcc19584
iuc
parents:
0
diff
changeset
|
74 # Download human database 'hg19' |
85a23e2dd92b
planemo upload for repository https://github.com/galaxyproject/tools-devteam/tree/master/data_managers/data_manager_snpeff commit 88c982c5adcd32b11d98428fc554a4fdfcc19584
iuc
parents:
0
diff
changeset
|
75 # java -jar snpEff.jar download -v hg19 |
85a23e2dd92b
planemo upload for repository https://github.com/galaxyproject/tools-devteam/tree/master/data_managers/data_manager_snpeff commit 88c982c5adcd32b11d98428fc554a4fdfcc19584
iuc
parents:
0
diff
changeset
|
76 # |
85a23e2dd92b
planemo upload for repository https://github.com/galaxyproject/tools-devteam/tree/master/data_managers/data_manager_snpeff commit 88c982c5adcd32b11d98428fc554a4fdfcc19584
iuc
parents:
0
diff
changeset
|
77 # <command>java -jar \$SNPEFF_JAR_PATH/snpEff.jar download -c \$JAVA_JAR_PATH/snpEff.config $genomeVersion > $logfile </command> |
85a23e2dd92b
planemo upload for repository https://github.com/galaxyproject/tools-devteam/tree/master/data_managers/data_manager_snpeff commit 88c982c5adcd32b11d98428fc554a4fdfcc19584
iuc
parents:
0
diff
changeset
|
78 # |
85a23e2dd92b
planemo upload for repository https://github.com/galaxyproject/tools-devteam/tree/master/data_managers/data_manager_snpeff commit 88c982c5adcd32b11d98428fc554a4fdfcc19584
iuc
parents:
0
diff
changeset
|
79 # snpEffectPredictor.bin |
85a23e2dd92b
planemo upload for repository https://github.com/galaxyproject/tools-devteam/tree/master/data_managers/data_manager_snpeff commit 88c982c5adcd32b11d98428fc554a4fdfcc19584
iuc
parents:
0
diff
changeset
|
80 # regulation_HeLa-S3.bin |
85a23e2dd92b
planemo upload for repository https://github.com/galaxyproject/tools-devteam/tree/master/data_managers/data_manager_snpeff commit 88c982c5adcd32b11d98428fc554a4fdfcc19584
iuc
parents:
0
diff
changeset
|
81 # regulation_pattern = 'regulation_(.+).bin' |
5
3d9dd4b9fb09
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/data_managers/data_manager_snpeff commit 5c6d595ecbf2e4e39c25662a165c9e475e01ecd1-dirty
iuc
parents:
4
diff
changeset
|
82 def download_database(data_manager_dict, target_directory, genome_version, organism): |
1
85a23e2dd92b
planemo upload for repository https://github.com/galaxyproject/tools-devteam/tree/master/data_managers/data_manager_snpeff commit 88c982c5adcd32b11d98428fc554a4fdfcc19584
iuc
parents:
0
diff
changeset
|
83 # get data_dir from config |
85a23e2dd92b
planemo upload for repository https://github.com/galaxyproject/tools-devteam/tree/master/data_managers/data_manager_snpeff commit 88c982c5adcd32b11d98428fc554a4fdfcc19584
iuc
parents:
0
diff
changeset
|
84 # --- |
85a23e2dd92b
planemo upload for repository https://github.com/galaxyproject/tools-devteam/tree/master/data_managers/data_manager_snpeff commit 88c982c5adcd32b11d98428fc554a4fdfcc19584
iuc
parents:
0
diff
changeset
|
85 # Databases are stored here |
85a23e2dd92b
planemo upload for repository https://github.com/galaxyproject/tools-devteam/tree/master/data_managers/data_manager_snpeff commit 88c982c5adcd32b11d98428fc554a4fdfcc19584
iuc
parents:
0
diff
changeset
|
86 # E.g.: Information for 'hg19' is stored in data_dir/hg19/ |
85a23e2dd92b
planemo upload for repository https://github.com/galaxyproject/tools-devteam/tree/master/data_managers/data_manager_snpeff commit 88c982c5adcd32b11d98428fc554a4fdfcc19584
iuc
parents:
0
diff
changeset
|
87 # |
85a23e2dd92b
planemo upload for repository https://github.com/galaxyproject/tools-devteam/tree/master/data_managers/data_manager_snpeff commit 88c982c5adcd32b11d98428fc554a4fdfcc19584
iuc
parents:
0
diff
changeset
|
88 # Note: Since version 2.1 you can use tilde ('~') as first character to refer to your home directory |
0 | 89 data_dir = target_directory |
5
3d9dd4b9fb09
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/data_managers/data_manager_snpeff commit 5c6d595ecbf2e4e39c25662a165c9e475e01ecd1-dirty
iuc
parents:
4
diff
changeset
|
90 args = ['snpEff', 'download', '-dataDir', data_dir, '-v', genome_version] |
3d9dd4b9fb09
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/data_managers/data_manager_snpeff commit 5c6d595ecbf2e4e39c25662a165c9e475e01ecd1-dirty
iuc
parents:
4
diff
changeset
|
91 return_code = subprocess.call(args=args, shell=False) |
0 | 92 if return_code: |
9
08d7998c3afb
"planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/data_managers/data_manager_snpeff commit 036feef4f46b5aedabc5080c8fa4bc00d9c30d95"
iuc
parents:
8
diff
changeset
|
93 sys.exit(return_code) |
1
85a23e2dd92b
planemo upload for repository https://github.com/galaxyproject/tools-devteam/tree/master/data_managers/data_manager_snpeff commit 88c982c5adcd32b11d98428fc554a4fdfcc19584
iuc
parents:
0
diff
changeset
|
94 # search data_dir/genome_version for files |
0 | 95 regulation_pattern = 'regulation_(.+).bin' |
1
85a23e2dd92b
planemo upload for repository https://github.com/galaxyproject/tools-devteam/tree/master/data_managers/data_manager_snpeff commit 88c982c5adcd32b11d98428fc554a4fdfcc19584
iuc
parents:
0
diff
changeset
|
96 genome_path = os.path.join(data_dir, genome_version) |
5
3d9dd4b9fb09
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/data_managers/data_manager_snpeff commit 5c6d595ecbf2e4e39c25662a165c9e475e01ecd1-dirty
iuc
parents:
4
diff
changeset
|
97 snpeff_version = getSnpeffVersion() |
1
85a23e2dd92b
planemo upload for repository https://github.com/galaxyproject/tools-devteam/tree/master/data_managers/data_manager_snpeff commit 88c982c5adcd32b11d98428fc554a4fdfcc19584
iuc
parents:
0
diff
changeset
|
98 key = snpeff_version + '_' + genome_version |
0 | 99 if os.path.isdir(genome_path): |
100 for root, dirs, files in os.walk(genome_path): | |
101 for fname in files: | |
102 if fname.startswith('snpEffectPredictor'): | |
103 # if snpEffectPredictor.bin download succeeded | |
1
85a23e2dd92b
planemo upload for repository https://github.com/galaxyproject/tools-devteam/tree/master/data_managers/data_manager_snpeff commit 88c982c5adcd32b11d98428fc554a4fdfcc19584
iuc
parents:
0
diff
changeset
|
104 name = genome_version + (' : ' + organism if organism else '') |
85a23e2dd92b
planemo upload for repository https://github.com/galaxyproject/tools-devteam/tree/master/data_managers/data_manager_snpeff commit 88c982c5adcd32b11d98428fc554a4fdfcc19584
iuc
parents:
0
diff
changeset
|
105 data_table_entry = dict(key=key, version=snpeff_version, value=genome_version, name=name, path=data_dir) |
9
08d7998c3afb
"planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/data_managers/data_manager_snpeff commit 036feef4f46b5aedabc5080c8fa4bc00d9c30d95"
iuc
parents:
8
diff
changeset
|
106 _add_data_table_entry(data_manager_dict, 'snpeffv_genomedb', data_table_entry) |
0 | 107 else: |
1
85a23e2dd92b
planemo upload for repository https://github.com/galaxyproject/tools-devteam/tree/master/data_managers/data_manager_snpeff commit 88c982c5adcd32b11d98428fc554a4fdfcc19584
iuc
parents:
0
diff
changeset
|
108 m = re.match(regulation_pattern, fname) |
0 | 109 if m: |
110 name = m.groups()[0] | |
1
85a23e2dd92b
planemo upload for repository https://github.com/galaxyproject/tools-devteam/tree/master/data_managers/data_manager_snpeff commit 88c982c5adcd32b11d98428fc554a4fdfcc19584
iuc
parents:
0
diff
changeset
|
111 data_table_entry = dict(key=key, version=snpeff_version, genome=genome_version, value=name, name=name) |
9
08d7998c3afb
"planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/data_managers/data_manager_snpeff commit 036feef4f46b5aedabc5080c8fa4bc00d9c30d95"
iuc
parents:
8
diff
changeset
|
112 _add_data_table_entry(data_manager_dict, 'snpeffv_regulationdb', data_table_entry) |
0 | 113 return data_manager_dict |
114 | |
1
85a23e2dd92b
planemo upload for repository https://github.com/galaxyproject/tools-devteam/tree/master/data_managers/data_manager_snpeff commit 88c982c5adcd32b11d98428fc554a4fdfcc19584
iuc
parents:
0
diff
changeset
|
115 |
9
08d7998c3afb
"planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/data_managers/data_manager_snpeff commit 036feef4f46b5aedabc5080c8fa4bc00d9c30d95"
iuc
parents:
8
diff
changeset
|
116 def _add_data_table_entry(data_manager_dict, data_table, data_table_entry): |
08d7998c3afb
"planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/data_managers/data_manager_snpeff commit 036feef4f46b5aedabc5080c8fa4bc00d9c30d95"
iuc
parents:
8
diff
changeset
|
117 data_manager_dict['data_tables'] = data_manager_dict.get('data_tables', {}) |
08d7998c3afb
"planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/data_managers/data_manager_snpeff commit 036feef4f46b5aedabc5080c8fa4bc00d9c30d95"
iuc
parents:
8
diff
changeset
|
118 data_manager_dict['data_tables'][data_table] = data_manager_dict['data_tables'].get(data_table, []) |
08d7998c3afb
"planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/data_managers/data_manager_snpeff commit 036feef4f46b5aedabc5080c8fa4bc00d9c30d95"
iuc
parents:
8
diff
changeset
|
119 data_manager_dict['data_tables'][data_table].append(data_table_entry) |
0 | 120 return data_manager_dict |
121 | |
1
85a23e2dd92b
planemo upload for repository https://github.com/galaxyproject/tools-devteam/tree/master/data_managers/data_manager_snpeff commit 88c982c5adcd32b11d98428fc554a4fdfcc19584
iuc
parents:
0
diff
changeset
|
122 |
0 | 123 def main(): |
124 parser = optparse.OptionParser() | |
9
08d7998c3afb
"planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/data_managers/data_manager_snpeff commit 036feef4f46b5aedabc5080c8fa4bc00d9c30d95"
iuc
parents:
8
diff
changeset
|
125 parser.add_option('-g', '--genome_version', dest='genome_version', action='store', type="string", default=None, help='genome_version') |
08d7998c3afb
"planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/data_managers/data_manager_snpeff commit 036feef4f46b5aedabc5080c8fa4bc00d9c30d95"
iuc
parents:
8
diff
changeset
|
126 parser.add_option('-o', '--organism', dest='organism', action='store', type="string", default=None, help='organism name') |
0 | 127 (options, args) = parser.parse_args() |
128 | |
129 filename = args[0] | |
130 | |
9
08d7998c3afb
"planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/data_managers/data_manager_snpeff commit 036feef4f46b5aedabc5080c8fa4bc00d9c30d95"
iuc
parents:
8
diff
changeset
|
131 params = json.loads(open(filename).read()) |
08d7998c3afb
"planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/data_managers/data_manager_snpeff commit 036feef4f46b5aedabc5080c8fa4bc00d9c30d95"
iuc
parents:
8
diff
changeset
|
132 target_directory = params['output_data'][0]['extra_files_path'] |
08d7998c3afb
"planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/data_managers/data_manager_snpeff commit 036feef4f46b5aedabc5080c8fa4bc00d9c30d95"
iuc
parents:
8
diff
changeset
|
133 os.mkdir(target_directory) |
0 | 134 data_manager_dict = {} |
135 | |
1
85a23e2dd92b
planemo upload for repository https://github.com/galaxyproject/tools-devteam/tree/master/data_managers/data_manager_snpeff commit 88c982c5adcd32b11d98428fc554a4fdfcc19584
iuc
parents:
0
diff
changeset
|
136 # Create SnpEff Reference Data |
5
3d9dd4b9fb09
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/data_managers/data_manager_snpeff commit 5c6d595ecbf2e4e39c25662a165c9e475e01ecd1-dirty
iuc
parents:
4
diff
changeset
|
137 for genome_version, organism in zip(options.genome_version.split(','), getOrganismNames(options.genome_version, options.organism).split(',')): |
9
08d7998c3afb
"planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/data_managers/data_manager_snpeff commit 036feef4f46b5aedabc5080c8fa4bc00d9c30d95"
iuc
parents:
8
diff
changeset
|
138 download_database(data_manager_dict, target_directory, genome_version, organism) |
0 | 139 |
1
85a23e2dd92b
planemo upload for repository https://github.com/galaxyproject/tools-devteam/tree/master/data_managers/data_manager_snpeff commit 88c982c5adcd32b11d98428fc554a4fdfcc19584
iuc
parents:
0
diff
changeset
|
140 # save info to json file |
9
08d7998c3afb
"planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/data_managers/data_manager_snpeff commit 036feef4f46b5aedabc5080c8fa4bc00d9c30d95"
iuc
parents:
8
diff
changeset
|
141 open(filename, 'w').write(json.dumps(data_manager_dict, sort_keys=True)) |
0 | 142 |
4
847b0f43c0e5
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/data_managers/data_manager_snpeff commit 8652f36a3a3838dca989426961561e81432acf4f
iuc
parents:
1
diff
changeset
|
143 |
1
85a23e2dd92b
planemo upload for repository https://github.com/galaxyproject/tools-devteam/tree/master/data_managers/data_manager_snpeff commit 88c982c5adcd32b11d98428fc554a4fdfcc19584
iuc
parents:
0
diff
changeset
|
144 if __name__ == "__main__": |
85a23e2dd92b
planemo upload for repository https://github.com/galaxyproject/tools-devteam/tree/master/data_managers/data_manager_snpeff commit 88c982c5adcd32b11d98428fc554a4fdfcc19584
iuc
parents:
0
diff
changeset
|
145 main() |