package com.cipres.mrBayesPlugin.ui;
import java.io.File;
import java.io.FileWriter;
import java.io.IOException;
import java.util.ArrayList;
import java.util.Collection;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import javax.swing.JFileChooser;
import javax.swing.JLabel;
import org.json.simple.JSONObject;
import org.virion.jam.util.SimpleListener;
import com.biomatters.geneious.publicapi.components.Dialogs;
import com.biomatters.geneious.publicapi.documents.AnnotatedPluginDocument;
import com.biomatters.geneious.publicapi.documents.DocumentField;
import com.biomatters.geneious.publicapi.documents.sequence.SequenceAlignmentDocument;
import com.biomatters.geneious.publicapi.documents.sequence.SequenceDocument;
import com.biomatters.geneious.publicapi.plugin.DocumentOperationException;
import com.biomatters.geneious.publicapi.plugin.Options;
import com.biomatters.geneious.publicapi.plugin.Options.BooleanOption;
import com.biomatters.geneious.publicapi.plugin.Options.ButtonOption;
import com.biomatters.geneious.publicapi.plugin.Options.Option;
import com.biomatters.geneious.publicapi.plugin.Options.OptionValue;
import com.biomatters.geneious.publicapi.plugin.Options.StringOption;
import com.biomatters.geneious.publicapi.utilities.FileUtilities;
import com.cipres.mrBayesPlugin.ui.CipresOptions.ParamType;
import com.cipres.mrBayesPlugin.utilities.MrBayesUtilities;
import jebl.util.SafePrintWriter;
public class IQTREEXSEDE_1_01_01Options extends CipresOptions {
private static final String ESTIMATE="estimate";
private static final String AUTO="auto";
//Simple Parameters
private static DoubleOption runtime_;
private static ComboBoxOption which_iqtree_;
private static IntegerOption specify_numpatterns_;
private static BooleanOption more_memory_;
private static BooleanOption more_memory2_;
private static BooleanOption specify_safe_;
//private static BooleanOption specify_autocores_;
private static ComboBoxOption specify_runtype_;
private static ComboBoxOption sequence_type_;
private static ComboBoxOption codon_type_;
private static ComboBoxOption nt2aa_type_;
private static StringOption starting_tree_File;
private static ButtonOption starting_tree_FileBrowse;
private static BooleanOption use_nj_;
private static BooleanOption use_random_;
private static StringOption specify_outgroup_;
private static StringOption specify_prefix_;
private static StringOption specify_seed_;
//private static StringOption specify_quartets_;
//Advanced Parameters
private static ComboBoxOption specify_quartets_;
private static IntegerOption specify_quartetnum_;
private static StringOption specify_quartetset_file_;
private static ButtonOption specify_quartetset_file_Browse;
private static BooleanOption write_quartets_;
private static Option partition_type_;
private static StringOption partition_file_;
private static BooleanOption mixed_sequence_;
private static ComboBoxOption num_mixedsequences_;
private static ButtonOption partition_file_Browse;
private static StringOption datatype2_file_;
private static ButtonOption datatype2_file_Browse;
private static StringOption datatype3_file_;
private static ButtonOption datatype3_file_Browse;
private static StringOption datatype4_file_;
private static ButtonOption datatype4_file_Browse;
private static StringOption datatype5_file_;
private static ButtonOption datatype5_file_Browse;
private static ComboBoxOption specify_model_;
private static ComboBoxOption specify_liemarkov_;
private static ComboBoxOption select_rcluster_;
private static StringOption specify_rclusterval_;
private static StringOption specify_basemodels_;
private static ComboBoxOption specify_aamodels_;
private static StringOption specify_freqtypes_;
private static StringOption specify_ratehettypes_;
private static IntegerOption specify_mincat_;
private static IntegerOption specify_maxcat_;
private static StringOption specify_merit_;
private static BooleanOption specify_fulltreesearch_;
private static StringOption specify_addlmodels_;
private static StringOption specify_nexusmodelfile_file_;
private static ButtonOption specify_nexusmodelfile_file_Browse;
private static StringOption freetextmodel_;
private static ComboBoxOption specify_dnamodel_;
private static ComboBoxOption specify_protmodel_;
private static ComboBoxOption specify_protmixture_;
private static StringOption guide_tree_file;
private static ButtonOption guide_tree_file_Browse;
private static StringOption frequency_file_file;
private static ButtonOption frequency_file_file_Browse;
private static BooleanOption max_posteriormode_;
private static ComboBoxOption specify_binmodel_;
private static ComboBoxOption specify_codonmodel_;
private static ComboBoxOption specify_modelfreq_;
private static BooleanOption optimize_weights_;
private static ComboBoxOption specify_modelrate_;
private static ComboBoxOption asc_bias_;
private static StringOption gamma_shape_;
private static BooleanOption median_approximation_;
private static IntegerOption invariable_sites_;
private static BooleanOption thorough_estimation_;
private static IntegerOption num_parstrees_;
private static IntegerOption num_topparstrees_;
private static IntegerOption num_besttrees_;
private static IntegerOption num_unsucctostop_;
private static StringOption num_tostop_;
private static IntegerOption specify_radius_;
private static DoubleOption perturb_strength_;
private static BooleanOption slower_NNI_;
private static BooleanOption no_mlpairwise_;
private static BooleanOption use_fasttreesearch_;
private static StringOption constraint_file_;
private static ButtonOption constraint_file_Browse;
private static ComboBoxOption bootstrap_type_;
private static BooleanOption use_bnni_;
private static IntegerOption num_bootreps_;
private static BooleanOption write_boottrees_;
private static BooleanOption write_boottrees1_;
private static IntegerOption max_iters_;
private static DoubleOption cc_ufboot_;
private static IntegerOption iter_interval_;
private static DoubleOption specify_tiebreaker_;
private static ComboBoxOption part_resample_;
private static BooleanOption use_symmtest_;
private static ComboBoxOption specify_symtest_;
private static ComboBoxOption specify_symtype_;
private static DoubleOption specify_pval_;
private static BooleanOption sh_test_;
private static BooleanOption parametrical_test_;
private static BooleanOption abayes_test_;
private static BooleanOption lbp_test_;
private static IntegerOption num_replicates_;
private static BooleanOption write_ancestralseqs_;
private static StringOption specify_ancestralthresh_;
private static StringOption specify_ancestraltree_file_;
private static ButtonOption specify_ancestraltree_file_Browse;
private static StringOption specify_treefile_;
private static ButtonOption specify_treefile_Browse;
private static IntegerOption num_rell_;
private static BooleanOption weighted_tests_;
private static BooleanOption unbiased_test_;
private static BooleanOption estimate_parsetreeonly_;
private static StringOption fixed_usertree_file;
private static ButtonOption fixed_usertree_file_Browse;
private static StringOption tree_file1_;
private static ButtonOption tree_file1_Browse;
private static BooleanOption compute_consensustree_;
private static BooleanOption compute_consensusnetwork_;
private static DoubleOption min_threshold_;
private static DoubleOption burnin_value_;
private static StringOption target_treefile_;
private static ButtonOption target_treefile_Browse;
private static StringOption set_scalefactor_;
private static StringOption set_precision_;
private static StringOption nodetarget_treefile_;
private static StringOption tree_file2_;
private static ButtonOption tree_file2_Browse;
private static BooleanOption compute_rfdistances_all_;
private static BooleanOption compute_rfdistances_adj_;
private static StringOption specify_rfdistancestree_file_;
private static ButtonOption specify_rfdistancestree_file_Browse;
//private static BooleanOption generate_randomtrees_;
private static StringOption num_taxa_;
private static ComboBoxOption choose_randomtype_;
private static StringOption specify_brlengths_;
private static StringOption specify_treefilename_;
//Concordance Factor Options
//private static StringOption partition_modelfile_file_;
//private static ButtonOption partition_modelfile_file_Browse;
private static StringOption partition_modelfile2_file_;
private static ButtonOption partition_modelfile2_file_Browse;
private static StringOption partition_tfile_file_;
private static ButtonOption partition_tfile_file_Browse;
private static StringOption setoftrees_file_file_;
private static ButtonOption setoftrees_file_file_Browse;
private static StringOption name_outfiles_;
private static IntegerOption specify_numquartets_;
//Dating Options
private static StringOption specify_datefile_file_;
private static ButtonOption specify_datefile_file_Browse;
private static BooleanOption extract_datefile_;
private static StringOption specify_datetip_;
private static StringOption specify_rootdate_;
private static StringOption specify_datetreefile_file_;
private static ButtonOption specify_datetreefile_file_Browse;
//private static StringOption specify_resampleint_;
private static IntegerOption specify_resampleint_;
private static StringOption specify_outlierthresh_;
private static BooleanOption print_sitestats_;
private static BooleanOption fix_branchlengths_;
private static StringOption branchlengths_tree_file_;
private static ButtonOption branchlengths_tree_file_Browse;
private static StringOption specify_minbranchlength_;
private static StringOption specify_maxbranchlength_;
private static BooleanOption write_locally_optimal_;
private static BooleanOption fix_brlengths_;
private static BooleanOption per_sitefile_;
private static BooleanOption per_sitewslfile_;
private static BooleanOption per_sitewslmrfile_;
private static BooleanOption per_sitewslrfile_;
private static BooleanOption per_sitewslmfile_;
private static BooleanOption per_sitewspmfile_;
private static BooleanOption per_sitewsprfile_;
private static BooleanOption per_sitewspmrfile_;
private static BooleanOption per_sitewplfile_;
private static BooleanOption write_sitelikelihoods_;
private static BooleanOption write_loglikelihoods_;
private static StringOption list_csintegers_file;
private static ButtonOption list_csintegers_file_Browse;
/*
private static Option abayes_test_ = 0;
private static Option bootstrap_type_ = bb;
private static Option choose_randomtype_ = -r;
private static Option lbp_test_ = 0;
private static Option mixed_sequence_ = 1;
private static Option num_bootreps_ = 1000;
private static Option num_mixedsequences_ = 2;
private static Option part_resample_ = GENE;
private static Option partition_type_ = -q;
private static Option sh_test_ = 0;
private static Option use_bnni_ = 1;
private static Option write_boottrees1_ = 0;
private static Option write_boottrees_ = 0;
private static Option write_locally_optimal_ = 0;
private static Option write_loglikelihoods_ = 0;
private static Option write_sitelikelihoods_ = 0;
*/
protected static NameAndLabel[] nameAndLabels;
private Options simpleOptions;
private Options advancedOptions;
private Options advancedOptions2;
private Options advancedOptions3;
private Options advancedOptions4;
private enum OptionIndex
{
RUNTIME_,
WHICH_IQTREE_,
SPECIFY_NUMPATTERNS_,
MORE_MEMORY_,
MORE_MEMORY2_,
SPECIFY_SAFE_,
//SPECIFY_AUTOCORES_,
SPECIFY_RUNTYPE_,
SEQUENCE_TYPE_,
CODON_TYPE_,
NT2AA_TYPE_,
STARTING_TREE_FILE,
USE_NJ_,
USE_RANDOM_,
SPECIFY_OUTGROUP_,
SPECIFY_SEED_,
SPECIFY_PREFIX_,
SPECIFY_QUARTETS_,
SPECIFY_QUARTETNUM_,
SPECIFY_QUARTETSET_FILE_,
WRITE_QUARTETS_,
PARTITION_TYPE_,
PARTITION_FILE_,
MIXED_SEQUENCE_,
NUM_MIXEDSEQUENCES_,
DATATYPE2_FILE_,
DATATYPE3_FILE_,
DATATYPE4_FILE_,
DATATYPE5_FILE_,
SPECIFY_MODEL_,
SPECIFY_LIEMARKOV_,
SELECT_RCLUSTER_,
SPECIFY_RCLUSTERVAL_,
SPECIFY_BASEMODELS_,
SPECIFY_AAMODELS_,
SPECIFY_FREQTYPES_,
SPECIFY_RATEHETTYPES_,
SPECIFY_MINCAT_,
SPECIFY_MAXCAT_,
SPECIFY_MERIT_,
SPECIFY_FULLTREESEARCH_,
SPECIFY_ADDLMODELS_,
SPECIFY_NEXUSMODELFILE_FILE_,
FREETEXTMODEL_,
SPECIFY_DNAMODEL_,
SPECIFY_PROTMODEL_,
SPECIFY_PROTMIXTURE_,
GUIDE_TREE_,
FREQUENCY_FILE_FILE_,
MAX_POSTERIORMODE_,
SPECIFY_BINMODEL_,
SPECIFY_CODONMODEL_,
SPECIFY_MODELFREQ_,
OPTIMIZE_WEIGHTS_,
SPECIFY_MODELRATE_,
ASC_BIAS_,
GAMMA_SHAPE_,
MEDIAN_APPROXIMATION_,
INVARIABLE_SITES_,
THOROUGH_ESTIMATION_,
NUM_PARSTREES_,
NUM_TOPPARSTREES_,
NUM_BESTTREES_,
NUM_UNSUCCTOSTOP_,
NUM_TOSTOP_,
SPECIFY_RADIUS_,
PERTURB_STRENGTH_,
SLOWER_NNI_,
NO_MLPAIRWISE_,
USE_FASTTREESEARCH_,
CONSTRAINT_FILE_,
BOOTSTRAP_TYPE_,
USE_BNNI_,
NUM_BOOTREPS_,
WRITE_BOOTTREES_,
WRITE_BOOTTREES1_,
MAX_ITERS_,
CC_UFBOOT_,
ITER_INTERVAL_,
SPECIFY_TIEBREAKER_,
PART_RESAMPLE_,
USE_SYMMTEST_,
SPECIFY_SYMTEST_,
SPECIFY_SYMTYPE_,
SPECIFY_PVAL_,
SH_TEST_,
PARAMETRICAL_TEST_,
ABAYES_TEST_,
LBP_TEST_,
NUM_REPLICATES_,
WRITE_ANCESTRALSEQS_,
SPECIFY_ANCESTRALTHRESH_,
SPECIFY_ANCESTRALTREE_FILE_,
SPECIFY_TREEFILE_,
NUM_RELL_,
WEIGHTED_TESTS_,
UNBIASED_TEST_,
ESTIMATE_PARSETREEONLY_,
FIXED_USERTREE_FILE,
TREE_FILE1_,
COMPUTE_CONSENSUSTREE_,
COMPUTE_CONSENSUSNETWORK_,
MIN_THRESHOLD_,
BURNIN_VALUE_,
TARGET_TREEFILE_,
SET_SCALEFACTOR_,
SET_PRECISION_,
NODETARGET_TREEFILE_,
TREE_FILE2_,
COMPUTE_RFDISTANCES_ALL_,
COMPUTE_RFDISTANCES_ADJ_,
SPECIFY_RFDISTANCESTREE_FILE_,
//GENERATE_RANDOMTREES_,
NUM_TAXA_,
CHOOSE_RANDOMTYPE_,
SPECIFY_BRLENGTHS_,
SPECIFY_TREEFILENAME_,
//PARTITION_MODELFILE_FILE_,
PARTITION_MODELFILE2_FILE_,
PARTITION_TFILE_FILE_,
SETOFTREES_FILE_FILE_,
NAME_OUTFILES_,
SPECIFY_NUMQUARTETS_,
SPECIFY_DATEFILE_FILE_,
EXTRACT_DATEFILE_,
SPECIFY_DATETIP_,
SPECIFY_ROOTDATE_,
SPECIFY_DATETREEFILE_FILE_,
SPECIFY_RESAMPLEINT_,
SPECIFY_OUTLIERTHRESH_,
PRINT_STTESTATS_,
FIX_BRANCHLENGTHS,
BRANCHLENGTHS_TREE_FILE_,
SPECIFY_MINBRANCHLENGTH_,
SPECIFY_MAXBRANCHLENGTH_,
WRITE_LOCALLY_OPTIMAL_,
FIX_BRLENGTHS_,
PER_SITEFILE_,
PER_SITEWSLFILE_,
PER_SITEWSLMRFILE_,
PER_SITEWSLRFILE_,
PER_SITEWSLMFILE_,
PER_SITEWSPMFILE_,
PER_SITEWSPRFILE_,
PER_SITEWSPMRFILE_,
PER_SITEWPLFILE_,
WRITE_SITELIKELIHOODS_,
WRITE_LOGLIKELIHOODS_,
LIST_CSINTEGERS_FILE
}
static
{
GENEIOUS_FORMAT = "geneious.iqtree.rest";
nameAndLabels = new NameAndLabel[OptionIndex.values().length];
nameAndLabels[OptionIndex.RUNTIME_.ordinal()] = new NameAndLabel("runtime_", "Maximum Hours to Run (up to 168 hours)", "runtime_",
"Estimate the maximum time your job will need to run.
" +
"We recommend testimg initially with a < 0.5hr test run because Jobs set for 0.5 h or less depedendably run immediately in the \"debug\" queue.
" +
"Once you are sure the configuration is correct, you then increase the time.
" +
"The reason is that jobs > 0.5 h are submitted to the \"normal\" queue, where jobs configured for 1 or a few hours times may run sooner than jobs configured for the full 168 hours.");
nameAndLabels[OptionIndex.WHICH_IQTREE_.ordinal()] = new NameAndLabel("which_iqtree_", "Which version do you want to run", "which_iqtree_", "");
nameAndLabels[OptionIndex.SPECIFY_NUMPATTERNS_.ordinal()] = new NameAndLabel("specify_numpatterns_", "How many patterns does your data set have", "specify_numpatterns_", "");
nameAndLabels[OptionIndex.MORE_MEMORY_.ordinal()] = new NameAndLabel("more_memory_", "I need more memory", "more_memory_", "This option should only be used if analysis has run out of memmory");
nameAndLabels[OptionIndex.MORE_MEMORY2_.ordinal()] = new NameAndLabel("more_memory2_", "I need still more memory", "more_memory2_", "This option should only be used if analysis set with more memory of has run out of memmory");
nameAndLabels[OptionIndex.SPECIFY_SAFE_.ordinal()] = new NameAndLabel("specify_safe_", "Safe likelihood kernel to avoid numerical underflow (-safe)", "specify_safe_", "");
//nameAndLabels[OptionIndex.SPECIFY_AUTOCORES_.ordinal()] = new NameAndLabel("specify_autocores_", "Automatically select number of threads", "specify_autocores_", "");
nameAndLabels[OptionIndex.SPECIFY_RUNTYPE_.ordinal()] = new NameAndLabel("specify_runtype_", "Select the kind of run you need", "specify_runtype_", "");
nameAndLabels[OptionIndex.SEQUENCE_TYPE_.ordinal()] = new NameAndLabel("sequence_type_", "Specify your sequence type (-st)", "sequence_type_", "");
nameAndLabels[OptionIndex.CODON_TYPE_.ordinal()] = new NameAndLabel("codon_type_", "Specify your Codon type", "codon_type_", "");
nameAndLabels[OptionIndex.NT2AA_TYPE_.ordinal()] = new NameAndLabel("nt2aa_type_", "Specify your translation table", "nt2aa_type_", "");
nameAndLabels[OptionIndex.STARTING_TREE_FILE.ordinal()] = new NameAndLabel("starting_tree_", "Specify a starting (or other) tree file (-t)", "starting_tree_", "", true);
nameAndLabels[OptionIndex.USE_NJ_.ordinal()] = new NameAndLabel("use_nj_", "Use a NJ starting tree (-t BIONJ)", "use_nj_", "");
nameAndLabels[OptionIndex.USE_RANDOM_.ordinal()] = new NameAndLabel("use_random_", "Use a Random starting tree (-t RANDOM)", "use_random_", "");
nameAndLabels[OptionIndex.SPECIFY_OUTGROUP_.ordinal()] = new NameAndLabel("specify_outgroup_", "Specify the outgroup (-o)", "specify_outgroup_", "");
nameAndLabels[OptionIndex.SPECIFY_PREFIX_.ordinal()] = new NameAndLabel("specify_prefix_", "Specify the prefix for output files (-pre'/--prefix)", "specify_prefix_", "");
nameAndLabels[OptionIndex.SPECIFY_SEED_.ordinal()] = new NameAndLabel("specify_seed_", "Specify the seed (-seed)", "specify_seed_", "");
nameAndLabels[OptionIndex.SPECIFY_QUARTETS_.ordinal()] = new NameAndLabel("specify_quartets_", "Quartets to be randomly drawn (-lmap)", "specify_quartets_", "");
nameAndLabels[OptionIndex.SPECIFY_QUARTETNUM_.ordinal()]= new NameAndLabel("specify_quartetnum_", "Specify number of quartets (-lmap)", "specify_quartetnum_", "");
nameAndLabels[OptionIndex.SPECIFY_QUARTETSET_FILE_.ordinal()]= new NameAndLabel("specify_quartetset_file_", "Specify a NEXUS file specifying taxon clusters (-lmclust clusters.nex)", "specify_quartetset_file_", "");
nameAndLabels[OptionIndex.WRITE_QUARTETS_.ordinal()] = new NameAndLabel("write_quartets_", "Write quartets to a file", "write_quartets_", "");
nameAndLabels[OptionIndex.PARTITION_TYPE_.ordinal()] = new NameAndLabel("partition_type_", "Please specify your partition type", "partition_type_", "");
nameAndLabels[OptionIndex.PARTITION_FILE_.ordinal()] = new NameAndLabel("partition_file_", "Please select your partition file", "partition_file_", "");
nameAndLabels[OptionIndex.MIXED_SEQUENCE_.ordinal()] = new NameAndLabel("mixed_sequence_", "I want to mix data types in a partitioned analysis", "mixed_sequence_", "");
nameAndLabels[OptionIndex.NUM_MIXEDSEQUENCES_.ordinal()] = new NameAndLabel("num_mixedsequences_", "How many data types (files) in your partitioned analysis", "num_mixedsequences_", "");
nameAndLabels[OptionIndex.DATATYPE2_FILE_.ordinal()] = new NameAndLabel("datatype2_file_", "Select the file with your second datatype ~partition_datatype2.phy", "datatype2_file_", "");
nameAndLabels[OptionIndex.DATATYPE3_FILE_.ordinal()] = new NameAndLabel("datatype3_file_", "Select the file with your third datatype ~partition_datatype3.phy", "datatype3_file_", "");
nameAndLabels[OptionIndex.DATATYPE4_FILE_.ordinal()] = new NameAndLabel("datatype4_file_", "Select the file with your fourth datatype ~partition_datatype4.phy", "datatype4_file_", "");
nameAndLabels[OptionIndex.DATATYPE5_FILE_.ordinal()] = new NameAndLabel("datatype5_file_", "Select the file with your fifth datatype ~partition_datatype5.phy", "datatype5_file_", "");
nameAndLabels[OptionIndex.SPECIFY_MODEL_.ordinal()] = new NameAndLabel("specify_model_", "Test for the best model (-m TEST)", "specify_model_", "");
nameAndLabels[OptionIndex.SPECIFY_LIEMARKOV_.ordinal()] = new NameAndLabel("specify_liemarkov_", "Specify a Lie Markov Option", "specify_liemarkov_", "");
nameAndLabels[OptionIndex.SELECT_RCLUSTER_.ordinal()] = new NameAndLabel("select_rcluster_", "Specify the relaxed clustering algorithm to use (-rcluster)", "select_rcluster_", "");
nameAndLabels[OptionIndex.SPECIFY_RCLUSTERVAL_.ordinal()] = new NameAndLabel("specify_rclusterval_", "Specify the percentage or max partition pairs for relaxed clustering algorithm", "specify_rclusterval_", "Use this option to specify the percentage for the relaxed clustering algorithm (Lanfear et al.,2014). This is similar to -*rcluster-percent option of PartitionFinder" +
" For example, with -rcluster 10 only the top 10% partition schemes are considered to save computations.");
nameAndLabels[OptionIndex.SPECIFY_BASEMODELS_.ordinal()] = new NameAndLabel("specify_basemodels_", "Specify names of the base models or program (-mset)", "specify_basemodels_",
"For -mset, specify the name of a program (raxml, phyml or mrbayes) to restrict to only those models supported by the specified program.
" +
"Alternatively, one can specify a comma-separated list of base models.
" +
"For example, -mset WAG,LG,JTT will restrict model selection to WAG, LG, and JTT instead of all 18 AA models to save computations.");
nameAndLabels[OptionIndex.SPECIFY_AAMODELS_.ordinal()] = new NameAndLabel("specify_aamodels_", "Specify nuclear, mitochondrial, chloroplast or viral (-msub, protein)", "specify_aamodels_", "");
nameAndLabels[OptionIndex.SPECIFY_FREQTYPES_.ordinal()] = new NameAndLabel("specify_freqtypes_", "Specify a comma-separated list of frequency types for model selection (-mfreq)" +
"", "pecify_freqtypes_", "");
nameAndLabels[OptionIndex.SPECIFY_RATEHETTYPES_.ordinal()] = new NameAndLabel("specify_ratehettypes_", "Specify a comma-separated list of rate heterogeneity types for model selection (-mrate)\r\n" +
"", "specify_ratehettypes_", "");
nameAndLabels[OptionIndex.SPECIFY_MINCAT_.ordinal()] = new NameAndLabel("specify_mincat_", "Specify minimum number of categories for FreeRate model (-cmin)", "specify_mincat_", "");
nameAndLabels[OptionIndex.SPECIFY_MAXCAT_.ordinal()] = new NameAndLabel("specify_maxcat_", "Specify maximum number of categories for FreeRate model (-cmax)", "specify_maxcat_", "");
nameAndLabels[OptionIndex.SPECIFY_MERIT_.ordinal()] = new NameAndLabel("specify_merit_", "Specify either AIC, AICc or BIC for the optimality criterion (-merit)", "specify_merit_", "");
nameAndLabels[OptionIndex.SPECIFY_FULLTREESEARCH_.ordinal()] = new NameAndLabel("specify_fulltreesearch_", "Turn on full tree search for each model considered, to obtain more accurate result. (-mtree)", "specify_fulltreesearch_", "");
nameAndLabels[OptionIndex.SPECIFY_ADDLMODELS_.ordinal()] = new NameAndLabel("specify_addlmodels_", "Specify a comma-separated list of mixture models to additionally consider for model selection. (-madd)", "specify_addlmodels_", "");
nameAndLabels[OptionIndex.SPECIFY_NEXUSMODELFILE_FILE_.ordinal()] = new NameAndLabel("specify_nexusmodelfile_", "Specify a Nexus Model file. (-mdef)", "specify_nexusmodelfile_", "");
nameAndLabels[OptionIndex.FREETEXTMODEL_.ordinal()] = new NameAndLabel("freetextmodel_", "Specify any model using free text (-m)", "freetextmodel_", "");
nameAndLabels[OptionIndex.SPECIFY_DNAMODEL_.ordinal()] = new NameAndLabel("specify_dnamodel_", "Specify a DNA model (-m )", "specify_dnamodel_", "");
nameAndLabels[OptionIndex.SPECIFY_PROTMODEL_.ordinal()] = new NameAndLabel("specify_protmodel_", "Specify a Protein model (-m )", "specify_protmodel_", "");
nameAndLabels[OptionIndex.SPECIFY_PROTMIXTURE_.ordinal()] = new NameAndLabel("specify_protmixture_", "Specify a Protein Profile mixture", "specify_protmixture_", "");
nameAndLabels[OptionIndex.GUIDE_TREE_.ordinal()] = new NameAndLabel("guide_tree_", "Specify a guide tree file for PMSF analysis (-ft)", "guide_tree_", "");
nameAndLabels[OptionIndex.FREQUENCY_FILE_FILE_.ordinal()] = new NameAndLabel("frequency_file_", "Specify a frequency file for PMSF analysis (-fs)", "frequency_file_", "");
nameAndLabels[OptionIndex.SPECIFY_BINMODEL_.ordinal()] = new NameAndLabel("specify_binmodel_", "Specify a Binary/Morphological model (-m )", "specify_binmodel_", "");
nameAndLabels[OptionIndex.MAX_POSTERIORMODE_.ordinal()] = new NameAndLabel("max_posteriormode_", "Switch to posterior maximum mode for obtaining site-specific profiles (-max )", "max_posteriormode_", "");
nameAndLabels[OptionIndex.SPECIFY_CODONMODEL_.ordinal()] = new NameAndLabel("specify_codonmodel_", "Specify a Codon model (-m )", "specify_codonmodel_", "");
nameAndLabels[OptionIndex.SPECIFY_MODELFREQ_.ordinal()] = new NameAndLabel("specify_modelfreq_", "Specify model frequency", "specify_modelfreq_", "");
nameAndLabels[OptionIndex.OPTIMIZE_WEIGHTS_.ordinal()] = new NameAndLabel("optimize_weights_", "Optimize weights of mixture models (-mwopt)", "optimize_weights_", "");
nameAndLabels[OptionIndex.SPECIFY_MODELRATE_.ordinal()] = new NameAndLabel("specify_modelrate_", "Specify rate heterogeneity", "specify_modelrate_", "");
nameAndLabels[OptionIndex.ASC_BIAS_.ordinal()] = new NameAndLabel("asc_bias_", "Correct for Ascertainment bias (+ASC)", "asc_bias_",
"This is useful for binary/morphological datasets that only contain variable sites (the identical morphological features are usually not included in the alignments,
" +
"hence you need to correct for this, see, e.g., http://sysbio.oxfordjournals.org/content/50/6/913.short).
" +
"For DNA data this option might be useful when you analyze alignments of SNPs that also don't contain constant sites.
" +
"Note that, for mathematical and numerical reasons you can not apply an ascertainment bias correction to datasets or partitions that contain constant sites.");
nameAndLabels[OptionIndex.GAMMA_SHAPE_.ordinal()] = new NameAndLabel("gamma_shape_", "Specify the Gamma shape parameter (-a)", "gamma_shape_", "");
nameAndLabels[OptionIndex.MEDIAN_APPROXIMATION_.ordinal()] = new NameAndLabel("median_approximation_", "Perform the median approximation for Gamma rate heterogeneity (-gmedian)", "median_approximation_",
"Perform the median approximation for Gamma rate heterogeneity instead of the default mean approximation (Yang, 1994)");
nameAndLabels[OptionIndex.INVARIABLE_SITES_.ordinal()] = new NameAndLabel("invariable_sites_", "Specify the proportion of invariable sites (-i)", "invariable_sites_", "");
nameAndLabels[OptionIndex.THOROUGH_ESTIMATION_.ordinal()] = new NameAndLabel("thorough_estimation_", "Perform more thorough estimation for +I+G model parameters (--opt-gamma-inv)", "thorough_estimation_", "");
nameAndLabels[OptionIndex.NUM_PARSTREES_.ordinal()] = new NameAndLabel("num_parstrees_", "Specify number of initial parsimony trees (-ninit)", "num_parstrees_",
"Specify number of initial parsimony trees.
" +
"DEFAULT: 100. Here the PLL library (Flouri et al., 2015) is used,
" +
"which implements the randomized stepwise addition and parsimony subtree pruning and regafting (SPR).");
nameAndLabels[OptionIndex.NUM_TOPPARSTREES_.ordinal()] = new NameAndLabel("num_topparstrees_", "Specify number of top initial parsimony trees (-ntop)", "num_topparstrees_",
"Specify number of top initial parsimony trees to optimize with ML nearest neighbor interchange (NNI) search to initialize the candidate set.
DEFAULT: 20");
nameAndLabels[OptionIndex.NUM_BESTTREES_.ordinal()] = new NameAndLabel("num_besttrees_", "Number of trees in the candidate set to maintain (-nbest)", "num_besttrees_",
"Specify number of trees in the candidate set to maintain during ML tree search.
DEFAULT: 5");
nameAndLabels[OptionIndex.NUM_UNSUCCTOSTOP_.ordinal()] = new NameAndLabel("num_unsucctostop_", "Number of unsuccessful iterations to stop (-nstop)", "num_unsucctostop_",
"Specify number of unsuccessful iterations to stop.
DEFAULT: 100");
nameAndLabels[OptionIndex.NUM_TOSTOP_.ordinal()] = new NameAndLabel("num_tostop_", "Number of iterations to stop (-n)", "num_tostop_",
"Specify number of iterations to stop.
" +
"This option overrides -nstop criterion. Use -n 0 to only estimate model parameters on an initial parsimony tree and ignore a full tree search to save time");
nameAndLabels[OptionIndex.SPECIFY_RADIUS_.ordinal()] = new NameAndLabel("specify_radius_", "SPR radius for the initial search (-sprrad)", "specify_radius_",
"Specify SPR radius for the initial parsimony tree search.
DEFAULT: 6");
nameAndLabels[OptionIndex.PERTURB_STRENGTH_.ordinal()] = new NameAndLabel("perturb_strength_", "Perturbation strength (between 0 and 1) (-pers)", "perturb_strength_",
"Specify SPR radius for the initial parsimony tree search.
DEFAULT: 6");
nameAndLabels[OptionIndex.SLOWER_NNI_.ordinal()] = new NameAndLabel("slower_NNI_", "Turn on more thorough and slower NNI search (-allnni)", "slower_NNI_",
"Turn on more thorough and slower NNI search.
It means that IQ-TREE will consider all possible NNIs instead of only those in the vicinity of previously applied NNIs.
DEFAULT: OFF");
nameAndLabels[OptionIndex.NO_MLPAIRWISE_.ordinal()] = new NameAndLabel("no_mlpairwise_", "Avoid computing ML pairwise distances and BIONJ tree (-djc)", "no_mlpairwise_",
"Avoid computing ML pairwise distances and BIONJ tree.");
nameAndLabels[OptionIndex.USE_FASTTREESEARCH_.ordinal()] = new NameAndLabel("use_fasttreesearch_", "Turn on the fast tree search mode (-fast)", "use_fasttreesearch_", "");
nameAndLabels[OptionIndex.CONSTRAINT_FILE_.ordinal()] = new NameAndLabel("constraint_file_", "Specify a topological constraint tree file in NEWICK format (-g)", "constraint_file_",
"Specify a topological constraint tree file in NEWICK format.
The constraint tree can be a multifurcating tree and need not to include all taxa.");
nameAndLabels[OptionIndex.BOOTSTRAP_TYPE_.ordinal()] = new NameAndLabel("bootstrap_type_", "Bootstrap Type", "bootstrap_type_", "");
nameAndLabels[OptionIndex.USE_BNNI_.ordinal()] = new NameAndLabel("use_bnni_", "Use bnni to reduce overestimating support (-bnni)", "use_bnni_", "");
nameAndLabels[OptionIndex.NUM_BOOTREPS_.ordinal()] = new NameAndLabel("num_bootreps_", "Specify number of bootstrap replicates (>=1000 for ultrafast)", "num_bootreps_",
"-bb: Specify number of bootstrap replicates (>=1000)
" +
"-b: Specify number of bootstrap replicates (recommended >=100).
" +
"This will perform both bootstrap and analysis on original alignment and provide a consensus tree.
" +
"-bc Like -b but omit analysis on original alignment.
" +
"-bo Like -b but only perform bootstrap analysis (no analysis on original alignment and no consensus tree).");
nameAndLabels[OptionIndex.WRITE_BOOTTREES_.ordinal()] = new NameAndLabel("write_boottrees_", "Turn on writing bootstrap trees to .ufboot file (-wbt)", "write_boottrees_",
"Turn on writing bootstrap trees to .ufboot file. DEFAULT: OFF");
nameAndLabels[OptionIndex.WRITE_BOOTTREES1_.ordinal()] = new NameAndLabel("write_boottrees1_", "Turn on writing bootstrap trees with branch lengths (-wbtl)", "write_boottrees1_",
"Turn on writing bootstrap trees with branch lengths (-wbt1) DEFAULT: OFF");
nameAndLabels[OptionIndex.MAX_ITERS_.ordinal()] = new NameAndLabel("max_iters_", "Specify maximum number of iterations to stop. (-nm)", "max_iters_",
"Specify maximum number of iterations to stop. DEFAULT: 1000");
nameAndLabels[OptionIndex.CC_UFBOOT_.ordinal()] = new NameAndLabel("cc_ufboot_", "Minimum correlation coefficient for UFBoot convergence criterion (-bcor)", "cc_ufboot_",
"Specify minimum correlation coefficient for UFBoot convergence criterion.
DEFAULT: 0.99");
nameAndLabels[OptionIndex.ITER_INTERVAL_.ordinal()] = new NameAndLabel("iter_interval_", "Iteration interval checking for UFBoot convergence (-nstep)", "iter_interval_",
"Specify iteration interval checking for UFBoot convergence.
" +
"DEFAULT: every 100 iterations");
nameAndLabels[OptionIndex.SPECIFY_TIEBREAKER_.ordinal()] = new NameAndLabel("specify_tiebreaker_", "SPR radius for the initial search (-beps)", "specify_tiebreaker_",
"Specify a small epsilon to break tie in RELL evaluation for bootstrap trees.
DEFAULT: 0.5");
nameAndLabels[OptionIndex.PART_RESAMPLE_.ordinal()] = new NameAndLabel("part_resample_", "Resampling strategies for partitioned analysis (-bspec)", "part_resample_",
"Specify the resampling strategies for partitioned analysis.
" +
"By default, IQ-TREE resamples alignment sites within partitions.
" +
"With -bspec GENE IQ-TREE will resample partitions.
" +
"With -bspec GENESITE IQ-TREE will resample partitions and then resample sites within resampled partitions (Gadagkar et al., 2005).-alrt Specify number of replicates (>=1000) to perform SH-like approximate likelihood ratio test (SH-aLRT)
" +
"-lbp Specify number of replicates (>=1000) to perform fast local bootstrap probability method
" +
"