Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions main/phylotesting.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1655,7 +1655,7 @@ int CandidateModelSet::generate(Params &params, Alignment *aln, bool separate_ra
StrVector extra_model_names;
convert_string_vec(params.model_extra_set, extra_model_names);
for (auto s : extra_model_names)
push_back(CandidateModel(s, "", aln));
push_back(CandidateModel(s, "", aln, MF_CANNOT_BE_IGNORED));
}
return max_cats;
}
Expand Down Expand Up @@ -2832,7 +2832,7 @@ void CandidateModelSet::filterRates(int finished_model) {
ok_rates.insert(rate_name);
}
for (model = finished_model+1; model < size(); model++)
if (ok_rates.find(at(model).orig_rate_name) == ok_rates.end())
if (ok_rates.find(at(model).orig_rate_name) == ok_rates.end() && !at(model).hasFlag(MF_CANNOT_BE_IGNORED))
at(model).setFlag(MF_IGNORED);
}

Expand All @@ -2854,11 +2854,11 @@ void CandidateModelSet::filterSubst(int finished_model) {
if (at(model).getScore() <= ok_score) {
string subst_name = at(model).orig_subst_name;
ok_model.insert(subst_name);
} else
} else if (!at(model).hasFlag(MF_CANNOT_BE_IGNORED))
at(model).setFlag(MF_IGNORED);
}
for (model = finished_model+1; model < size(); model++)
if (ok_model.find(at(model).orig_subst_name) == ok_model.end())
if (ok_model.find(at(model).orig_subst_name) == ok_model.end() && !at(model).hasFlag(MF_CANNOT_BE_IGNORED))
at(model).setFlag(MF_IGNORED);
}

Expand Down
1 change: 1 addition & 0 deletions main/phylotesting.h
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ const int MF_IGNORED = 2;
const int MF_RUNNING = 4;
const int MF_WAITING = 8;
const int MF_DONE = 16;
const int MF_CANNOT_BE_IGNORED = 32; // those models added by -madd cannot be filtered out

enum MixtureAction {MA_NONE, MA_FIND_RATE, MA_NUMBER_CLASS, MA_FIND_CLASS, MA_ADD_CLASS};

Expand Down
Loading