Skip to content

Commit

Permalink
interface
Browse files Browse the repository at this point in the history
  • Loading branch information
milkschen committed Dec 24, 2024
1 parent b7e97e9 commit a70f945
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 2 deletions.
14 changes: 12 additions & 2 deletions bt2_search.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,7 @@ static bool thread_stealing;// true iff thread stealing is in use
static int outType; // style of output
static bool noRefNames; // true -> print reference indexes; not names
static uint32_t khits; // number of hits per read; >1 is much slower
static bool kbest; // Only report the best hits when -k is larger than 1
static uint32_t mhits; // don't report any hits if there are > mhits
static int partitionSz; // output a partitioning key in first field
static int readsPerBatch; // # reads to read from input file at once
Expand Down Expand Up @@ -315,6 +316,7 @@ static void resetOptions() {
outType = OUTPUT_SAM; // style of output
noRefNames = false; // true -> print reference indexes; not names
khits = 1; // number of hits per read; >1 is much slower
kbest = true; // report the best hits when khits>1
mhits = 50; // stop after finding this many alignments+1
partitionSz = 0; // output a partitioning key in first field
readsPerBatch = 16; // # reads to read from input file at once
Expand Down Expand Up @@ -509,6 +511,7 @@ static struct option long_options[] = {
{(char*)"help", no_argument, 0, 'h'},
{(char*)"threads", required_argument, 0, 'p'},
{(char*)"khits", required_argument, 0, 'k'},
{(char*)"kbest", no_argument, 0, ARG_K_BEST},
{(char*)"minins", required_argument, 0, 'I'},
{(char*)"maxins", required_argument, 0, 'X'},
{(char*)"quals", required_argument, 0, 'Q'},
Expand Down Expand Up @@ -1286,6 +1289,11 @@ static void parseOption(int next_option, const char *arg) {
saw_k = true;
break;
}
case ARG_K_BEST: {
kbest = true;
cerr << "Set -kbest to true" << endl;
break;
}
case ARG_VERBOSE: gVerbose = 1; break;
case ARG_STARTVERBOSE: startVerbose = true; break;
case ARG_QUIET: gQuiet = true; break;
Expand Down Expand Up @@ -3065,7 +3073,8 @@ static void multiseedSearchWorker(void *vp) {
0, // penalty gap (not used now)
msample, // true -> -M was specified, otherwise assume -m
gReportDiscordant, // report discordang paired-end alignments?
gReportMixed); // report unpaired alignments for paired reads?
gReportMixed, // report unpaired alignments for paired reads?
kbest); // --kbest

// Instantiate a mapping quality calculator
unique_ptr<Mapq> bmapq(new_mapq(mapqv, scoreMin, sc));
Expand Down Expand Up @@ -4186,7 +4195,8 @@ static void multiseedSearchWorker_2p5(void *vp) {
0, // penalty gap (not used now)
msample, // true -> -M was specified, otherwise assume -m
gReportDiscordant, // report discordang paired-end alignments?
gReportMixed); // report unpaired alignments for paired reads?
gReportMixed, // report unpaired alignments for paired reads?
kbest); // --kbest

// Instantiate a mapping quality calculator
unique_ptr<Mapq> bmapq(new_mapq(mapqv, scoreMin, sc));
Expand Down
1 change: 1 addition & 0 deletions opts.h
Original file line number Diff line number Diff line change
Expand Up @@ -163,6 +163,7 @@ enum {
ARG_SRA_ACC, // --sra-acc
ARG_SAM_APPEND_COMMENT, // --sam-append-comment
ARG_SAM_OPT_CONFIG, // --sam-opt-config
ARG_K_BEST, // --kbest
};

#endif

0 comments on commit a70f945

Please sign in to comment.