@@ -49,8 +49,6 @@ struct args_t {
49
49
bool keep_for_reanalysis; // -k
50
50
// contam params
51
51
std::string variants; // -s
52
- float dcov_1; // -d
53
- float dcov_2; // -D
54
52
} g_args;
55
53
56
54
void print_usage () {
@@ -287,7 +285,7 @@ static const char *removereads_opt_str = "i:p:t:b:h?";
287
285
static const char *filtervariants_opt_str = " p:t:f:h?" ;
288
286
static const char *getmasked_opt_str = " i:b:f:p:h?" ;
289
287
static const char *trimadapter_opt_str = " 1:2:p:a:h?" ;
290
- static const char *contam_opt_str = " i:b:f:x:p:m:q:s:d:D:e:r:kh ?" ;
288
+ static const char *contam_opt_str = " p:s:t:h ?" ;
291
289
292
290
std::string get_filename_without_extension (std::string f, std::string ext) {
293
291
if (ext.length () > f.length ()) // If extension longer than filename
@@ -332,35 +330,18 @@ int main(int argc, char *argv[]) {
332
330
333
331
// ivar contam
334
332
if (cmd.compare (" contam" ) == 0 ) {
335
- g_args.bed = " " ;
336
- g_args.primer_pair_file = " " ;
337
- g_args.primer_offset = 0 ;
333
+ g_args.min_threshold = 0 ;
338
334
opt = getopt (argc, argv, contam_opt_str);
339
335
while (opt != -1 ) {
340
336
switch (opt) {
341
- case ' i' :
342
- g_args.bam = optarg;
343
- break ;
344
- case ' b' :
345
- g_args.bed = optarg;
346
- break ;
347
- case ' f' :
348
- g_args.primer_pair_file = optarg;
349
- break ;
350
- case ' x' :
351
- g_args.primer_offset = std::stoi (optarg);
352
- break ;
353
337
case ' p' :
354
338
g_args.prefix = optarg;
355
339
break ;
356
340
case ' s' :
357
341
g_args.variants = optarg;
358
342
break ;
359
- case ' d' :
360
- g_args.dcov_1 = std::stof (optarg);
361
- break ;
362
- case ' D' :
363
- g_args.dcov_2 = std::stof (optarg);
343
+ case ' t' :
344
+ g_args.min_threshold = atof (optarg);
364
345
break ;
365
346
case ' h' :
366
347
case ' ?' :
@@ -372,7 +353,7 @@ int main(int argc, char *argv[]) {
372
353
}
373
354
if (!g_args.variants .empty () && !g_args.prefix .empty ()) {
374
355
std::vector<variant> variants = gmm_model (g_args.variants , g_args.prefix );
375
- cluster_consensus (variants, g_args.prefix , g_args.variants );
356
+ cluster_consensus (variants, g_args.prefix , g_args.variants , g_args. min_threshold );
376
357
}
377
358
res = 0 ;
378
359
g_args.prefix = get_filename_without_extension (g_args.prefix , " .bam" );
0 commit comments