Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MRG: adjust default threshold-bp to 50kb for fastgather and fastmultigather #44

Merged
merged 1 commit into from
Aug 24, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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