comparison kraken_taxonomy_report.py @ 2:528a1d91b066 draft

planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/kraken_taxonomy_report commit 11ee7ac206d41894c0b6a11f2439aaea490824f0
author iuc
date Thu, 09 Nov 2017 14:06:54 -0500
parents b97694b21bc3
children b11b3ac48bb9
comparison
equal deleted inserted replaced
1:b97694b21bc3 2:528a1d91b066
6 # Licensed under the Academic Free License version 3.0 6 # Licensed under the Academic Free License version 3.0
7 # https://github.com/blankenberg/Kraken-Taxonomy-Report 7 # https://github.com/blankenberg/Kraken-Taxonomy-Report
8 8
9 from __future__ import print_function 9 from __future__ import print_function
10 10
11 import optparse
12 import os
13 import re
11 import sys 14 import sys
12 import os
13 import optparse
14 import re
15 15
16 __VERSION__ = '0.0.2' 16 __VERSION__ = '0.0.2'
17 17
18 __URL__ = "https://github.com/blankenberg/Kraken-Taxonomy-Report" 18 __URL__ = "https://github.com/blankenberg/Kraken-Taxonomy-Report"
19 19
244 else: 244 else:
245 options.cluster = None # make empty string into None 245 options.cluster = None # make empty string into None
246 ranks_to_report = RANK_NAMES_INTS 246 ranks_to_report = RANK_NAMES_INTS
247 247
248 if options.output: 248 if options.output:
249 output_fh = open( options.output, 'wb+' ) 249 output_fh = open(options.output, 'w')
250 else: 250 else:
251 output_fh = sys.stdout 251 output_fh = sys.stdout
252 252
253 db_path = get_kraken_db_path( options.db ) 253 db_path = get_kraken_db_path( options.db )
254 ( child_lists, name_map, rank_map ) = load_taxonomy( db_path, sanitize_names=options.sanitize_names ) 254 ( child_lists, name_map, rank_map ) = load_taxonomy( db_path, sanitize_names=options.sanitize_names )