comparison kraken_taxonomy_report.py @ 3:b11b3ac48bb9 draft

planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/kraken_taxonomy_report commit a4b0969b33a68a0ea9ba12291f6694aec24f13ed
author iuc
date Tue, 30 Oct 2018 18:58:54 -0400
parents 528a1d91b066
children 27d65c78863c
comparison
equal deleted inserted replaced
2:528a1d91b066 3:b11b3ac48bb9
66 RANK_INT_TO_CODE[ RANK_NAMES.index( name ) ] = name[0] 66 RANK_INT_TO_CODE[ RANK_NAMES.index( name ) ] = name[0]
67 RANK_INT_TO_CODE[ RANK_NAMES.index( 'superkingdom' ) ] = 'd' 67 RANK_INT_TO_CODE[ RANK_NAMES.index( 'superkingdom' ) ] = 'd'
68 PRIMARY_RANK_NAMES.append( 'superkingdom' ) 68 PRIMARY_RANK_NAMES.append( 'superkingdom' )
69 69
70 NAME_STUB = "%s__%s" 70 NAME_STUB = "%s__%s"
71 NAME_RE = re.compile( "(\t| |\||\.;)" ) 71 NAME_RE = re.compile(r"(\t| |\||\.;)")
72 NAME_REPL = "_" 72 NAME_REPL = "_"
73 73
74 74
75 def get_kraken_db_path( db ): 75 def get_kraken_db_path( db ):
76 assert db, ValueError( "You must provide a kraken database" ) 76 assert db, ValueError( "You must provide a kraken database" )
216 parser.add_option( '', '--name-id', dest='name_id', action='store_true', default=False, help='Use Taxa ID instead of Name' ) 216 parser.add_option( '', '--name-id', dest='name_id', action='store_true', default=False, help='Use Taxa ID instead of Name' )
217 parser.add_option( '', '--name-long', dest='name_long', action='store_true', default=False, help='Use Long taxa ID instead of base name' ) 217 parser.add_option( '', '--name-long', dest='name_long', action='store_true', default=False, help='Use Long taxa ID instead of base name' )
218 parser.add_option( '', '--taxonomy', dest='taxonomy', action='store_true', default=False, help='Output taxonomy in last column' ) 218 parser.add_option( '', '--taxonomy', dest='taxonomy', action='store_true', default=False, help='Output taxonomy in last column' )
219 parser.add_option( '', '--cluster', dest='cluster', action='store', type="string", default=None, help='Cluster counts to specified rank' ) 219 parser.add_option( '', '--cluster', dest='cluster', action='store', type="string", default=None, help='Cluster counts to specified rank' )
220 parser.add_option( '', '--summation', dest='summation', action='store_true', default=False, help='Add summation of child counts to each taxa' ) 220 parser.add_option( '', '--summation', dest='summation', action='store_true', default=False, help='Add summation of child counts to each taxa' )
221 parser.add_option( '', '--sanitize-names', dest='sanitize_names', action='store_true', default=False, help='Replace special chars (\t| |\||\.;) with underscore (_)' ) 221 parser.add_option('', '--sanitize-names', dest='sanitize_names', action='store_true', default=False, help=r'Replace special chars (\t| |\||\.;) with underscore (_)')
222 parser.add_option( '', '--show-rank', dest='show_rank', action='store_true', default=False, help='Output column with Rank name' ) 222 parser.add_option( '', '--show-rank', dest='show_rank', action='store_true', default=False, help='Output column with Rank name' )
223 parser.add_option( '', '--db', dest='db', action='store', type="string", default=None, help='Name of Kraken database' ) 223 parser.add_option( '', '--db', dest='db', action='store', type="string", default=None, help='Name of Kraken database' )
224 parser.add_option( '', '--output', dest='output', action='store', type="string", default=None, help='Name of output file' ) 224 parser.add_option( '', '--output', dest='output', action='store', type="string", default=None, help='Name of output file' )
225 parser.add_option( '', '--output-tree', dest='output_tree', action='store', type="string", default=None, help='Name of output file to place newick tree' ) 225 parser.add_option( '', '--output-tree', dest='output_tree', action='store', type="string", default=None, help='Name of output file to place newick tree' )
226 (options, args) = parser.parse_args() 226 (options, args) = parser.parse_args()