Skip to content

Commit accfa6c

Browse files
committed
Set warnings according to the advice by StefanFlaumberg; Set an error that occurs when when users tries 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 aca3c94 commit accfa6c

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
@@ -6765,6 +6765,15 @@ void runMixtureFinder(Params &params, IQTree* &iqtree, ModelCheckpoint &model_in
67656765

67666766
if (iqtree->isSuperTree())
67676767
outError("Error! The option -m '" + params.model_name + "' cannot work on data set with partitions");
6768+
6769+
if (iqtree->aln->seq_type != SEQ_DNA)
6770+
outWarning("MixtureFinder has not been tested for non-DNA data types. Be cautious about interpreting the results");
6771+
6772+
if (iqtree->aln->getMaxNumStates() > 6)
6773+
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");
6774+
6775+
if (iqtree->aln->seq_type == SEQ_PROTEIN && !params.force_aa_mix_finder)
6776+
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.");
67686777

67696778
if (params.morph_mix_finder && iqtree->aln->seq_type != SEQ_MORPH) {
67706779
outError("Error! The option -morph-mix can only work on morphological data set");

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;
@@ -5486,6 +5487,11 @@ void parseArg(int argc, char *argv[], Params &params) {
54865487
params.force_unfinished = true;
54875488
continue;
54885489
}
5490+
5491+
if (strcmp(argv[cnt], "-force-aa-mix-finder") == 0 || strcmp(argv[cnt], "--force-aa-mix-finder") == 0) {
5492+
params.force_aa_mix_finder = true;
5493+
continue;
5494+
}
54895495

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

utils/tools.h

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

2461+
/** true if forcing IQ-TREE to run MixtureFinder for amino acid data */
2462+
bool force_aa_mix_finder;
2463+
24612464
/** TRUE to print checkpoints to 1.ckp.gz, 2.ckp.gz,... */
24622465
bool print_all_checkpoints;
24632466

0 commit comments

Comments
 (0)