|
15 | 15 | import typing
|
16 | 16 | import uuid
|
17 | 17 |
|
18 |
| -__version__ = '1.2.6' |
| 18 | +__version__ = '1.2.7' |
19 | 19 |
|
20 | 20 | DEFAULT_THREAD_COUNT = min(multiprocessing.cpu_count(), 64)
|
21 | 21 |
|
|
33 | 33 | 'qidx', 'ridx', 'query', 'reference', 'tani', 'gani', 'ani', 'qcov',
|
34 | 34 | 'rcov', 'num_alns', 'len_ratio', 'qlen', 'rlen', 'nt_match', 'nt_mismatch',
|
35 | 35 | ]
|
36 |
| -# vclust align output formats |
| 36 | +# Vclust align output formats |
37 | 37 | ALIGN_OUTFMT = {
|
38 | 38 | 'lite': ALIGN_FIELDS[:2] + ALIGN_FIELDS[4:11],
|
39 | 39 | 'standard': ALIGN_FIELDS[:11],
|
@@ -546,6 +546,14 @@ def ranged_float_type(value):
|
546 | 546 | help='Show this help message and exit'
|
547 | 547 | )
|
548 | 548 |
|
| 549 | + # Info parser |
| 550 | + info_parser = subparsers.add_parser( |
| 551 | + 'info', |
| 552 | + help='Show information about the tool and its dependencies', |
| 553 | + formatter_class=fmt, |
| 554 | + add_help=False, |
| 555 | + ) |
| 556 | + |
549 | 557 | # Show help message if the script is run without any arguments.
|
550 | 558 | if len(sys.argv[1:]) == 0:
|
551 | 559 | parser.print_help()
|
@@ -1137,6 +1145,13 @@ def cmd_clusty(
|
1137 | 1145 | return cmd
|
1138 | 1146 |
|
1139 | 1147 |
|
| 1148 | +def vclust_info(): |
| 1149 | + print(f'Vclust {__version__}') |
| 1150 | + for bin_path in [BIN_KMERDB, BIN_FASTASPLIT, BIN_LZANI, BIN_CLUSTY]: |
| 1151 | + validate_binary(bin_path) |
| 1152 | + print(f'{bin_path.name:<20} ok') |
| 1153 | + |
| 1154 | + |
1140 | 1155 | class CustomHelpFormatter(argparse.HelpFormatter):
|
1141 | 1156 | """Custom help message formatter for argparse."""
|
1142 | 1157 |
|
@@ -1166,11 +1181,16 @@ def main():
|
1166 | 1181 | # Initialize logger
|
1167 | 1182 | logger = create_logger(
|
1168 | 1183 | name='vclust',
|
1169 |
| - log_level=logging.INFO if args.verbose else logging.ERROR, |
| 1184 | + log_level=(logging.INFO |
| 1185 | + if (hasattr(args, 'verbose') and args.verbose) |
| 1186 | + else logging.ERROR), |
1170 | 1187 | )
|
1171 | 1188 |
|
| 1189 | + # Info |
| 1190 | + if args.command == 'info': |
| 1191 | + vclust_info() |
1172 | 1192 | # Prefilter
|
1173 |
| - if args.command == 'prefilter': |
| 1193 | + elif args.command == 'prefilter': |
1174 | 1194 | args.bin_kmerdb = validate_binary(args.bin_kmerdb)
|
1175 | 1195 | args = validate_args_prefilter(args, parser)
|
1176 | 1196 | args = validate_args_fasta_input(args, parser)
|
|
0 commit comments