Skip to content

Commit

Permalink
adjust default threshold-bp
Browse files Browse the repository at this point in the history
  • Loading branch information
ctb committed Aug 24, 2023
1 parent e90fb95 commit 8203323
Showing 1 changed file with 20 additions and 10 deletions.
30 changes: 20 additions & 10 deletions src/python/pyo3_branchwater/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,15 +16,17 @@ def __init__(self, p):
help="a text file containing paths to .sig/.sig.gz files")
p.add_argument('against_paths',
help="a text file containing paths to .sig/.sig.gz files")
p.add_argument('-o', '--output', required=True)
p.add_argument('-o', '--output', required=True,
help='CSV output file for matches')
p.add_argument('-t', '--threshold', default=0.01, type=float,
help="containment threshold for matches")
help='containment threshold for reporting matches')
p.add_argument('-k', '--ksize', default=31, type=int,
help="k-mer size for which to load sketches & do search")
help='k-mer size at which to select sketches')
p.add_argument('-s', '--scaled', default=1000, type=int,
help="scaled value for which to load sketches & do search")
help='scaled factor at which to do comparisons')

def main(self, args):
notify(f"ksize: {args.ksize} / scaled: {args.scaled} / threshold: {args.threshold}")
num_threads = pyo3_branchwater.get_num_threads()
notify(f"searching all sketches in '{args.query_paths}' against '{args.against_paths}' using {num_threads} threads")
super().main(args)
Expand All @@ -51,11 +53,15 @@ def __init__(self, p):
help="save gather output (minimum metagenome cover) to this file")
p.add_argument('--output-prefetch',
help="save prefetch output (all overlaps) to this file")
p.add_argument('-t', '--threshold-bp', default=100000, type=float)
p.add_argument('-k', '--ksize', default=31, type=int)
p.add_argument('-s', '--scaled', default=1000, type=int)
p.add_argument('-t', '--threshold-bp', default=50000, type=float,
help='threshold in estimated base pairs, for reporting matches (default: 50kb)')
p.add_argument('-k', '--ksize', default=31, type=int,
help='k-mer size at which to do comparisons (default: 31)')
p.add_argument('-s', '--scaled', default=1000, type=int,
help='scaled factor at which to do comparisons (default: 1000)')

def main(self, args):
notify(f"ksize: {args.ksize} / scaled: {args.scaled} / threshold bp: {args.threshold_bp}")
num_threads = pyo3_branchwater.get_num_threads()
notify(f"gathering all sketches in '{args.query_sig}' against '{args.against_paths}' using {num_threads} threads")
super().main(args)
Expand All @@ -81,11 +87,15 @@ def __init__(self, p):
super().__init__(p)
p.add_argument('query_paths', help="a text file containing paths to .sig/.sig.gz files to query")
p.add_argument('against_paths', help="a text file containing paths to .sig/.sig.gz files to search against")
p.add_argument('-t', '--threshold-bp', default=100000, type=float)
p.add_argument('-k', '--ksize', default=31, type=int)
p.add_argument('-s', '--scaled', default=1000, type=int)
p.add_argument('-t', '--threshold-bp', default=50000, type=float,
help='threshold in estimated base pairs, for reporting matches (default: 50kb)')
p.add_argument('-k', '--ksize', default=31, type=int,
help='k-mer size at which to do comparisons (default: 31)')
p.add_argument('-s', '--scaled', default=1000, type=int,
help='scaled factor at which to do comparisons (default: 1000)')

def main(self, args):
notify(f"ksize: {args.ksize} / scaled: {args.scaled} / threshold bp: {args.threshold_bp}")
num_threads = pyo3_branchwater.get_num_threads()
notify(f"gathering all sketches in '{args.query_paths}' against '{args.against_paths}' using {num_threads} threads")
super().main(args)
Expand Down

0 comments on commit 8203323

Please sign in to comment.