Skip to content

Commit 21fa1b7

Browse files
committed
New parameter to return immediately after having created the filtered alignment
1 parent e557e78 commit 21fa1b7

File tree

2 files changed

+10
-1
lines changed

2 files changed

+10
-1
lines changed

best.c

+9-1
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ BestConfig *best_init_option()
3636
bo->is_phyml_cons = 0;
3737
bo->n_cat = 2;
3838
bo->qual_thres = 11;
39+
bo->only_filter = 0;
3940
bo->prefix = 0;
4041
bo->output_fn = 0;
4142
bo->kappa = -1.0;
@@ -130,6 +131,9 @@ Tree *best_core(BestConfig *bo)
130131
FILE* f_filtalign = fopen("filtalign.fa", "w");
131132
tr_align_output(f_filtalign, bo->ma);
132133
fclose(f_filtalign);
134+
if (bo->only_filter) {
135+
return 0;
136+
}
133137

134138
tma = ma_trans_align(bo->ma, 0);
135139
if (tma == 0) {
@@ -385,7 +389,11 @@ BestConfig *best_command_line_options(int argc, char *argv[])
385389
case 'S': bo->is_phyml_spec = 0; break;
386390
case 'A': bo->is_phyml_cons = 1; break;
387391
case 'P': bo->is_phyml = 0; break;
388-
case 'F': bo->qual_thres = atoi(optarg); break;
392+
case 'F': if (*optarg == 'x') {
393+
bo->only_filter = 1;
394+
optarg++;
395+
}
396+
bo->qual_thres = atoi(optarg); break;
389397
case 'c': bo->n_cat = atoi(optarg); break;
390398
case 'C': fp = tr_get_fp(optarg);
391399
bo->ctree = tr_parse_first(fp);

best.h

+1
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ typedef struct
2525
int is_mask_lss;
2626
int is_quiet;
2727
int qual_thres;
28+
int only_filter;
2829

2930
/* PHYML related, passed to PhymlConfig */
3031
int n_cat;

0 commit comments

Comments
 (0)