Skip to content

Commit 375ab15

Browse files
committed
Set warnings according to the advice by StefanFlaumberg; Set an error that occurs when users try to apply MixtureFinder to amino acid data; Create the --force-aa-mix-finder option to force IQ-TREE to run MixtureFinder for amino acid data
1 parent baa25de commit 375ab15

File tree

3 files changed

+18
-0
lines changed

3 files changed

+18
-0
lines changed

main/phylotesting.cpp

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6671,6 +6671,15 @@ void runMixtureFinder(Params &params, IQTree* &iqtree, ModelCheckpoint &model_in
66716671
if (iqtree->isSuperTree())
66726672
outError("Error! The option -m '" + params.model_name + "' cannot work on data set with partitions");
66736673

6674+
if (iqtree->aln->seq_type != SEQ_DNA)
6675+
outWarning("MixtureFinder has not been tested for non-DNA data types. Be cautious about interpreting the results");
6676+
6677+
if (iqtree->aln->getMaxNumStates() > 6)
6678+
outWarning("Running MixtureFinder for the given data type can take much time. Please consider restricting the set of the models to test as much as possible");
6679+
6680+
if (iqtree->aln->seq_type == SEQ_PROTEIN && !params.force_aa_mix_finder)
6681+
outError("Error! We already have probably effective mixture frequency vectors C10–C60 for amino acid data, and they should explain data well.\nPlease make sure running MixtureFinder for your amino acid data makes sense.\nIf you are determined to do that, please add an option --force-aa-mix-finder to the command line.");
6682+
66746683
cout << "--------------------------------------------------------------------" << endl;
66756684
cout << "| Running MixtureFinder |" << endl;
66766685
cout << "--------------------------------------------------------------------" << endl;

utils/tools.cpp

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1487,6 +1487,7 @@ void parseArg(int argc, char *argv[], Params &params) {
14871487
params.ignore_checkpoint = false;
14881488
params.checkpoint_dump_interval = 60;
14891489
params.force_unfinished = false;
1490+
params.force_aa_mix_finder = false;
14901491
params.print_all_checkpoints = false;
14911492
params.suppress_output_flags = 0;
14921493
params.ufboot2corr = false;
@@ -5475,6 +5476,11 @@ void parseArg(int argc, char *argv[], Params &params) {
54755476
params.force_unfinished = true;
54765477
continue;
54775478
}
5479+
5480+
if (strcmp(argv[cnt], "-force-aa-mix-finder") == 0 || strcmp(argv[cnt], "--force-aa-mix-finder") == 0) {
5481+
params.force_aa_mix_finder = true;
5482+
continue;
5483+
}
54785484

54795485
if (strcmp(argv[cnt], "-cptime") == 0 || strcmp(argv[cnt], "--cptime") == 0) {
54805486
cnt++;

utils/tools.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2453,6 +2453,9 @@ class Params {
24532453
/** true if ignoring the "finished" flag in checkpoint file */
24542454
bool force_unfinished;
24552455

2456+
/** true if forcing IQ-TREE to run MixtureFinder for amino acid data */
2457+
bool force_aa_mix_finder;
2458+
24562459
/** TRUE to print checkpoints to 1.ckp.gz, 2.ckp.gz,... */
24572460
bool print_all_checkpoints;
24582461

0 commit comments

Comments
 (0)