@@ -22,7 +22,7 @@ void init_search_parser(sharg::parser & parser, search_arguments & arguments)
2222 .long_id = " query" ,
2323 .description = " Provide a path to the query file." ,
2424 .required = true ,
25- .validator = sharg::input_file_validator{}});
25+ .validator = sharg::input_file_validator{{ " fasta " , " fa " , " fq " , " fastq " } }});
2626 parser.add_option (arguments.out_file ,
2727 sharg::config{.short_id = ' \0 ' ,
2828 .long_id = " output" ,
@@ -33,30 +33,11 @@ void init_search_parser(sharg::parser & parser, search_arguments & arguments)
3333 sharg::config{.short_id = ' e' ,
3434 .long_id = " error-rate" ,
3535 .description = " Choose the maximum allowed error rate of a local match." ,
36- .validator = error_rate_validator{}});
37- parser.add_option (arguments.tau ,
38- sharg::config{.short_id = ' \0 ' ,
39- .long_id = " tau" ,
40- .description = " Used in the dynamic thresholding. The higher tau, the lower the threshold." ,
41- .validator = sharg::arithmetic_range_validator{0 , 1 }});
42- parser.add_option (arguments.threshold ,
43- sharg::config{.short_id = ' \0 ' ,
44- .long_id = " threshold" ,
45- .description = " If set, this threshold is used instead of the probabilistic models." ,
46- .validator = sharg::arithmetic_range_validator{0 , 1 }});
47- parser.add_option (arguments.p_max ,
48- sharg::config{.short_id = ' \0 ' ,
49- .long_id = " p_max" ,
50- .description = " Used in the dynamic thresholding. The higher p_max, the lower the threshold." ,
51- .validator = sharg::arithmetic_range_validator{0 , 1 }});
36+ .validator = float_in_range_validator{0 .0f , 0 .2f }});
5237 parser.add_option (arguments.pattern_size ,
5338 sharg::config{.short_id = ' \0 ' ,
5439 .long_id = " pattern" ,
55- .description = " Choose the pattern size. Default: half of first query sequence." });
56- parser.add_option (arguments.overlap ,
57- sharg::config{.short_id = ' \0 ' ,
58- .long_id = " overlap" ,
59- .description = " Choose how much sequential patterns overlap. Default: pattern size - 1." });
40+ .description = " Choose the minimium length of a local alignment. Default: half of first query sequence." });
6041 parser.add_flag (arguments.compressed ,
6142 sharg::config{.short_id = ' \0 ' ,
6243 .long_id = " compressed" ,
@@ -72,16 +53,8 @@ void init_search_parser(sharg::parser & parser, search_arguments & arguments)
7253 parser.add_flag (arguments.write_time ,
7354 sharg::config{.short_id = ' \0 ' ,
7455 .long_id = " time" ,
75- .description = " Write timing file." ,
56+ .description = " Write runtime log file." ,
7657 .advanced = true });
77- parser.add_option (arguments.cart_max_capacity ,
78- sharg::config{.short_id = ' \0 ' ,
79- .long_id = " cart_max_capacity" ,
80- .description = " Number of elements to be stored in a single cart before it is send for processing." });
81- parser.add_option (arguments.max_queued_carts ,
82- sharg::config{.short_id = ' \0 ' ,
83- .long_id = " max_queued_carts" ,
84- .description = " Maximal number of carts that are full and are waiting to be processed." });
8558 parser.add_option (arguments.ref_meta_path ,
8659 sharg::config{.short_id = ' \0 ' ,
8760 .long_id = " ref-meta" ,
@@ -101,58 +74,97 @@ void init_search_parser(sharg::parser & parser, search_arguments & arguments)
10174 .long_id = " threads" ,
10275 .description = " Choose the number of threads." ,
10376 .validator = positive_integer_validator{}});
77+
78+ // ///////////////////////////////////////
79+ // Advanced options
80+ // ///////////////////////////////////////
81+ parser.add_option (arguments.tau ,
82+ sharg::config{.short_id = ' \0 ' ,
83+ .long_id = " tau" ,
84+ .description = " Used in the dynamic thresholding. The higher tau, the lower the threshold." ,
85+ .advanced = true ,
86+ .validator = sharg::arithmetic_range_validator{0 , 1 }});
87+ parser.add_option (arguments.threshold ,
88+ sharg::config{.short_id = ' \0 ' ,
89+ .long_id = " threshold" ,
90+ .description = " If set, this threshold is used instead of the probabilistic models." ,
91+ .advanced = true ,
92+ .validator = sharg::arithmetic_range_validator{0 , 1 }});
93+ parser.add_option (arguments.p_max ,
94+ sharg::config{.short_id = ' \0 ' ,
95+ .long_id = " p_max" ,
96+ .description = " Used in the dynamic thresholding. The higher p_max, the lower the threshold." ,
97+ .advanced = true ,
98+ .validator = sharg::arithmetic_range_validator{0 , 1 }});
99+ parser.add_option (arguments.overlap ,
100+ sharg::config{.short_id = ' \0 ' ,
101+ .long_id = " overlap" ,
102+ .description = " Choose how much sequential patterns overlap. "
103+ " This determines how many potential matches are skipped in prefiltering."
104+ " (pattern_size - 1) considers all potential matches." ,
105+ .advanced = true });
106+ parser.add_option (arguments.cart_max_capacity ,
107+ sharg::config{.short_id = ' \0 ' ,
108+ .long_id = " cart_max_capacity" ,
109+ .description = " Number of elements to be stored in a single cart before it is sent for processing." ,
110+ .advanced = true });
111+ parser.add_option (arguments.max_queued_carts ,
112+ sharg::config{.short_id = ' \0 ' ,
113+ .long_id = " max_queued_carts" ,
114+ .description = " Maximal number of carts that are full and are waiting to be processed." ,
115+ .advanced = true });
104116 parser.add_option (arguments.disableThresh ,
105117 sharg::config{.short_id = ' \0 ' ,
106118 .long_id = " disableThresh" ,
107- .description = " Maximal number of verified matches before disabling verification for one query sequence." ,
108- .advanced = true ,
119+ .description = " STELLAR: Maximal number of verified SWIFT filter matches before disabling verification for one query sequence." ,
120+ .hidden = true ,
109121 .validator = sharg::arithmetic_range_validator{1 , 10000 }});
110-
111- // ///////////////////////////////////////
112- // Stellar options
113- // ///////////////////////////////////////
114- /*
115- // Filtering options
116- parser.add_option(options.qGram ,
117- sharg::config{.short_id = 'k' ,
118- .long_id = "kmer ",
119- .description = "Length of the q-grams." ,
120- .validator = sharg::arithmetic_range_validator{1, 32}});
121- parser.add_option(options.maxRepeatPeriod ,
122- sharg::config{.short_id = '\0 ',
123- .long_id = "repeatPeriod ",
124- .description = "Maximal period of low complexity repeats to be filtered .",
125- .validator = sharg::arithmetic_range_validator{1, 32}});
126- parser.add_option(options.minRepeatLength,
127- sharg::config{.short_id = '\0' ,
128- .long_id = "repeatLength" ,
129- .description = "Minimal length of low complexity repeats to be filtered. ",
130- .validator = sharg::arithmetic_range_validator{1u, std::numeric_limits<uint32_t>::max()}});
131- parser.add_option(options.qgramAbundanceCut ,
132- sharg::config{.short_id = 'c',
133- .long_id = "abundanceCut" ,
134- .description = "k-mer overabundance cut ratio." ,
135- .validator = float_in_range_validator{0, 1}});
136-
137- // Verification options
138- parser.add_option(options.xDrop,
139- sharg::config{.short_id = 'x' ,
140- .long_id = "xDrop" ,
141- .description = "Maximal x-drop for extension."});
142- parser.add_option(options.strVerificationMethod,
143- sharg::config{.short_id = '\0',
144- .long_id = "verification" ,
145- .description = "Verification strategy: exact or bestLocal or bandedGlobal." ,
146- .validator = sharg::value_list_validator{"exact", "bestLocal", "bandedGlobal", "bandedGlobalExtend"}});
147- parser.add_option(options.numMatches ,
148- sharg::config{.short_id = 'n' ,
149- .long_id = "numMatches",
150- .description = "Maximal number of kept matches per query and database. If STELLAR finds more matches, only the longest ones are kept."});
151- parser.add_option(options.compactThresh ,
152- sharg::config{.short_id = 's' ,
153- .long_id = "sortThresh",
154- .description = "Number of matches triggering removal of duplicates. Choose a smaller value for saving space."});
155- */
122+ parser. add_option (arguments. compactThresh ,
123+ sharg::config{. short_id = ' s ' ,
124+ . long_id = " sortThresh " ,
125+ . description = " STELLAR: Number of matches triggering removal of duplicates. Choose a smaller value for saving space. " ,
126+ . hidden = true });
127+ parser. add_option (arguments. qGram ,
128+ sharg::config{. short_id = ' q ' ,
129+ . long_id = " stellar-kmer " ,
130+ . description = " STELLAR: Length of the q-grams in the SWIFT algorithm. " ,
131+ . advanced = true ,
132+ .validator = sharg::arithmetic_range_validator{1 , 32 }});
133+ parser.add_option (arguments. qgramAbundanceCut ,
134+ sharg::config{.short_id = ' c ' ,
135+ .long_id = " abundanceCut " ,
136+ .description = " STELLAR: k-mer overabundance cut ratio ." ,
137+ . advanced = true ,
138+ . validator = float_in_range_validator{ 0 . 0f , 1 . 0f }});
139+ parser. add_option (arguments. maxRepeatPeriod ,
140+ sharg::config{. short_id = ' \0 ' ,
141+ . long_id = " repeatPeriod " ,
142+ . description = " STELLAR: Maximal period of low complexity repeats to be filtered. " ,
143+ . advanced = true ,
144+ . validator = sharg::arithmetic_range_validator{ 1 , 32 }});
145+ parser. add_option (arguments. minRepeatLength ,
146+ sharg::config{. short_id = ' \0 ' ,
147+ . long_id = " repeatLength " ,
148+ . description = " STELLAR: Minimal length of low complexity repeats to be filtered. " ,
149+ . advanced = true ,
150+ . validator = sharg::arithmetic_range_validator{ 1u , std::numeric_limits< uint32_t >:: max ()}});
151+ parser. add_option (arguments. xDrop ,
152+ sharg::config{. short_id = ' x ' ,
153+ . long_id = " xDrop " ,
154+ . description = " STELLAR: Maximal x-drop for extension. " ,
155+ . advanced = true });
156+ parser. add_option (arguments. strVerificationMethod ,
157+ sharg::config{. short_id = ' \0 ' ,
158+ . long_id = " verification " ,
159+ . description = " STELLAR: Verification strategy: exact or bestLocal or bandedGlobal. " ,
160+ . advanced = true ,
161+ . validator = sharg::value_list_validator{ " exact " , " bestLocal " , " bandedGlobal " , " bandedGlobalExtend " }});
162+ parser. add_option (arguments. numMatches ,
163+ sharg::config{. short_id = ' n ' ,
164+ . long_id = " numMatches " ,
165+ . description = " STELLAR: Maximal number of kept matches per query and database. "
166+ " If STELLAR finds more matches, only the longest ones are kept. " ,
167+ . hidden = true });
156168}
157169
158170void run_search (sharg::parser & parser)
0 commit comments