Skip to content

Commit fb980d3

Browse files
committed
Cannot build a tree if the filtered alignment has 0 columns
1 parent 933aa2e commit fb980d3

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

best.c

+5
Original file line numberDiff line numberDiff line change
@@ -119,6 +119,11 @@ Tree *best_core(BestConfig *bo)
119119
/* mask alignment */
120120
ma_apply_mask(bo->ma); /* aply MASKSEQ and eliminate columns consisting of only gaps */
121121
ma_filter(bo->ma, bo->is_collapse_splice, bo->qual_thres, bo->is_mask_lss);
122+
123+
if (!bo->ma->len) {
124+
fprintf(stderr, "The filtered alignment has 0 columns. Cannot build a tree\n");
125+
return 0;
126+
}
122127

123128
FILE* f_filtalign = fopen("filtalign.fa", "w");
124129
tr_align_output(f_filtalign, bo->ma);

0 commit comments

Comments
 (0)