Mercurial > repos > dfornika > blast_report_basic
changeset 3:386a88793078 draft
Uploaded
author | dfornika |
---|---|
date | Tue, 03 Mar 2020 01:09:56 +0000 |
parents | 0dbaa4e68866 |
children | 7223a2e98bf8 |
files | blast_report.py |
diffstat | 1 files changed, 9 insertions(+), 6 deletions(-) [+] |
line wrap: on
line diff
--- a/blast_report.py Tue Mar 03 01:04:15 2020 +0000 +++ b/blast_report.py Tue Mar 03 01:09:56 2020 +0000 @@ -1,8 +1,12 @@ #!/usr/bin/env python + +from __future__ import print_function + '''Report on BLAST results. python blast_report.py input_tab cheetah_tmpl output_html output_tab [-f [filter_pident]:[filterkw1,...,filterkwN]] [-b bin1_label=bin1_path[,...binN_label=binN_path]] ''' + import argparse import re import sys @@ -72,15 +76,14 @@ parser = argparse.ArgumentParser() parser.add_argument('-f', '--filter', - type='string', dest='filter', ) parser.add_argument('-b', '--bins', - type='string', dest='bins' ) -parser.add_argument('-r', '--redundant', - dest='redundant', +parser.add_argument('-r', '--discard-redundant', + dest='discard_redundant', + type=bool, default=False, action='store_true' ) @@ -108,7 +111,7 @@ filter_kws = pident_kws[-1].split(',') print('filter_pident: %s filter_kws: %s' % (str(filter_pident), str(filter_kws))) -if args.redundant: +if args.discard_redundant: print('Throwing out redundant hits...') #RESULTS! @@ -134,7 +137,7 @@ stop_err("Problem with splitting:" + cols[SUBJ_ID_COL]) #hsp option: keep best (first) hit only for each query and accession id. - if args.redundant: + if args.discard_redundant: if accs[0] in queries[-1].match_accessions: continue #don't save the result and skip to the next else: