Skip to content

Commit

Permalink
Add a --mcs command-line option for enabling multi-context seeds
Browse files Browse the repository at this point in the history
  • Loading branch information
marcelm committed Oct 3, 2024
1 parent c0e9423 commit aef5cd9
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 1 deletion.
2 changes: 2 additions & 0 deletions src/cmdline.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ CommandLineOptions parse_command_line_arguments(int argc, char **argv) {
args::ValueFlag<int> end_bonus(parser, "INT", "Soft clipping penalty [10]", {'L'});

args::Group search(parser, "Search parameters:");
args::Flag mcs(parser, "mcs", "Use multi-context seeds for finding hits", {"mcs"});
args::ValueFlag<float> f(parser, "FLOAT", "Top fraction of repetitive strobemers to filter out from sampling [0.0002]", {'f'});
args::ValueFlag<float> S(parser, "FLOAT", "Try candidate sites with mapping score at least S of maximum mapping score [0.5]", {'S'});
args::ValueFlag<int> M(parser, "INT", "Maximum number of mapping sites to try [20]", {'M'});
Expand Down Expand Up @@ -130,6 +131,7 @@ CommandLineOptions parse_command_line_arguments(int argc, char **argv) {
if (end_bonus) { opt.end_bonus = args::get(end_bonus); }

// Search parameters
if (mcs) { opt.mcs = args::get(mcs); }
if (f) { opt.f = args::get(f); }
if (S) { opt.dropoff_threshold = args::get(S); }
if (M) { opt.max_tries = args::get(M); }
Expand Down
1 change: 1 addition & 0 deletions src/cmdline.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@ struct CommandLineOptions {
int end_bonus { 10 };

// Search parameters
bool mcs { false };
float f { 0.0002 };
float dropoff_threshold { 0.5 };
int max_tries { 20 };
Expand Down
3 changes: 2 additions & 1 deletion src/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,7 @@ int run_strobealign(int argc, char **argv) {
map_param.dropoff_threshold = opt.dropoff_threshold;
map_param.rescue_level = opt.rescue_level;
map_param.max_tries = opt.max_tries;
map_param.use_mcs = false; //opt.r < 200;
map_param.use_mcs = opt.mcs;
map_param.output_format = (
opt.is_abundance_out ? OutputFormat::Abundance :
opt.is_sam_out ? OutputFormat::SAM :
Expand Down Expand Up @@ -231,6 +231,7 @@ int run_strobealign(int argc, char **argv) {
}

logger.debug() << "Auxiliary hash length: " << index_parameters.randstrobe.aux_len << "\n";
logger.info() << "Using multi-context seeds: " << (map_param.use_mcs ? "yes" : "no") << '\n';
StrobemerIndex index(references, index_parameters, opt.bits);
if (opt.use_index) {
// Read the index from a file
Expand Down

0 comments on commit aef5cd9

Please sign in to comment.