Skip to content

Commit

Permalink
rm threshold
Browse files Browse the repository at this point in the history
  • Loading branch information
bluegenes committed Aug 29, 2023
1 parent 39b9f23 commit 569db63
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 8 deletions.
6 changes: 2 additions & 4 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -763,7 +763,6 @@ fn build_template(ksize: u8, scaled: usize) -> Sketch {
fn index<P: AsRef<Path>>(
siglist: P,
template: Sketch,
threshold: f64,
output: P,
save_paths: bool,
colors: bool,
Expand All @@ -777,7 +776,7 @@ fn index<P: AsRef<Path>>(
let db = RevIndex::create(output.as_ref(), colors);

// Index the signatures using the loaded template, threshold, and save_paths option
db.index(index_sigs, &template, threshold, save_paths);
db.index(index_sigs, &template, 0.0, save_paths);

Ok(())
}
Expand Down Expand Up @@ -1134,14 +1133,13 @@ fn set_global_thread_pool(num_threads: usize) -> PyResult<usize> {
fn do_index(siglist: String,
ksize: u8,
scaled: usize,
threshold: f64,
output: String,
save_paths: bool,
colors: bool,
) -> anyhow::Result<u8>{
// build template from ksize, scaled
let template = build_template(ksize, scaled);
match index(siglist, template, threshold, output,
match index(siglist, template, output,
save_paths, colors) {
Ok(_) => Ok(0),
Err(e) => {
Expand Down
5 changes: 1 addition & 4 deletions src/python/pyo3_branchwater/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -159,8 +159,6 @@ def __init__(self, p):
help="a text file containing paths to .sig/.sig.gz files")
p.add_argument('-o', '--output', required=True,
help='output file for the index')
p.add_argument('-t', '--threshold', default=0.01, type=float,
help='containment threshold for reporting matches')
p.add_argument('-k', '--ksize', default=31, type=int,
help='k-mer size at which to select sketches')
p.add_argument('-s', '--scaled', default=1000, type=int,
Expand All @@ -171,7 +169,7 @@ def __init__(self, p):
help='number of cores to use (default is all available)')

def main(self, args):
notify(f"ksize: {args.ksize} / scaled: {args.scaled} / threshold: {args.threshold}")
notify(f"ksize: {args.ksize} / scaled: {args.scaled}")

num_threads = set_thread_pool(args.cores)

Expand All @@ -180,7 +178,6 @@ def main(self, args):
status = pyo3_branchwater.do_index(args.siglist,
args.ksize,
args.scaled,
args.threshold,
args.output,
args.save_paths,
False) # colors - currently must be false?
Expand Down

0 comments on commit 569db63

Please sign in to comment.