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
" + ""); nameAndLabels[OptionIndex.SPECIFY_TREEFILE_.ordinal()] = new NameAndLabel("specify_treefile_", "Specify a file containing a set of trees (-z)", "specify_treefile_", ""); nameAndLabels[OptionIndex.NUM_RELL_.ordinal()] = new NameAndLabel("num_rell_", "Specify the number of RELL replicates (-zb)", "num_rell_", "-zb Specify the number of RELL (Kishino et al., 1990) replicates (>=1000) to perform several tree topology tests for all trees passed via
" + "-z. The tests include bootstrap proportion (BP), KH test (Kishino and Hasegawa, 1989), SH test (Shimodaira and Hasegawa, 1999) and expected likelihood weights (ELW) (Strimmer and Rambaut, 2002)."); nameAndLabels[OptionIndex.WEIGHTED_TESTS_.ordinal()] = new NameAndLabel("weighted_tests_", "Perform the weighted-KH and weighted-SH test", "weighted_tests_", ""); nameAndLabels[OptionIndex.UNBIASED_TEST_.ordinal()] = new NameAndLabel("unbiased_test_", "Perform the approximately unbiased (AU) test", "unbiased_test_", ""); nameAndLabels[OptionIndex.ESTIMATE_PARSETREEONLY_.ordinal()] = new NameAndLabel("estimate_parsetreeonly_", "Only estimate model parameters on an initial parsimonly tree (-n 0)", "estimate_parsetreeonly_", ""); nameAndLabels[OptionIndex.FIXED_USERTREE_FILE.ordinal()] = new NameAndLabel("fixed_usertree_", "Specify a fixed user tree to estimate model parameters (-te)", "fixed_usertree_", "-te Specify a fixed user tree to estimate model parameters.
" + "Thus it behaves like -n 0 but uses a user-defined tree instead of parsimony tree.", true); nameAndLabels[OptionIndex.WRITE_ANCESTRALSEQS_.ordinal()] = new NameAndLabel("write_ancestralseqs_", "Write ancestral sequences to .statefile (-asr)", "write_ancestralseqs_", ""); nameAndLabels[OptionIndex.SPECIFY_ANCESTRALTHRESH_.ordinal()] = new NameAndLabel("specify_ancestralthresh_", "Specify minimum threshold of posterior probability for best ancestral state (-asr-min)", "specify_ancestralthresh_", ""); nameAndLabels[OptionIndex.SPECIFY_ANCESTRALTREE_FILE_.ordinal()] = new NameAndLabel("specify_ancestraltree_", "Specify a user-defined tree to determine ancestral sequences (-te)", "specify_ancestraltree_", "", true); nameAndLabels[OptionIndex.TREE_FILE1_.ordinal()] = new NameAndLabel("tree_file1_", "Specify a file containing a set of trees", "tree_file1_", ""); nameAndLabels[OptionIndex.COMPUTE_CONSENSUSTREE_.ordinal()] = new NameAndLabel("compute_consensustree_", "Compute consensus tree of the trees passed via -t (-con)", "compute_consensustree_", "-con Compute consensus tree of the trees passed via -t.
Resulting consensus tree is written to .contree file."); nameAndLabels[OptionIndex.COMPUTE_CONSENSUSNETWORK_.ordinal()] = new NameAndLabel("compute_consensusnetwork_", "Compute consensus network of the trees passed via -t (-net)", "compute_consensusnetwork_", ""); nameAndLabels[OptionIndex.MIN_THRESHOLD_.ordinal()] = new NameAndLabel("min_threshold_", "Specify a minimum threshold between 0 and 1 (-minsup)", "min_threshold_", ""); nameAndLabels[OptionIndex.BURNIN_VALUE_.ordinal()] = new NameAndLabel("burnin_value_", "Specify a burn-in (-bi)", "burnin_value_", ""); nameAndLabels[OptionIndex.TARGET_TREEFILE_.ordinal()] = new NameAndLabel("target_treefile_", "Specify an input “target” tree file (-sup)", "target_treefile_", "-sup Specify an input “target” tree file.
" + "That means, support values are first extracted from the trees passed via -t,
" + "and then mapped onto the target tree.
" + "Resulting tree with assigned support values is written to .suptree file.
" + "This option is useful to map and compare support values from different approaches onto a single tree."); nameAndLabels[OptionIndex.SET_SCALEFACTOR_.ordinal()] = new NameAndLabel("set_scalefactor_", "Set the scaling factor of support values for -sup option (-scale)", "set_scalefactor_", "-suptag Specify name of a node in -sup target tree. The corresponding node of .suptree will then be assinged with IDs of trees where this node appears. Special option -suptag ALL will assign such IDs fo all nodes of the target tree"); nameAndLabels[OptionIndex.SET_PRECISION_.ordinal()] = new NameAndLabel("set_precision_", "Set the precision of support values for -sup option (-prec)", "set_precision_", ""); nameAndLabels[OptionIndex.NODETARGET_TREEFILE_.ordinal()] = new NameAndLabel("nodetarget_treefile_", "Specify name of a node in -sup target tree (-suptag)", "nodetarget_treefile_", "-suptag Specify name of a node in -sup target tree.
" + "The corresponding node of .suptree will then be assigned with IDs of trees where this node appears.
" + "Special option -suptag ALL will assign such IDs for all nodes of the target tree.", false); nameAndLabels[OptionIndex.TREE_FILE2_.ordinal()] = new NameAndLabel("tree_file2_", "Specify a second set of trees", "tree_file2_", ""); nameAndLabels[OptionIndex.COMPUTE_RFDISTANCES_ALL_.ordinal()] = new NameAndLabel("compute_rfdistances_all_", "Compute all-to-all RF distances between all trees passed via -t (-rf_all)", "compute_rfdistances_all_", ""); nameAndLabels[OptionIndex.COMPUTE_RFDISTANCES_ADJ_.ordinal()] = new NameAndLabel("compute_rfdistances_adj_", "Compute RF distances between adjacent trees passed via -t (-rf_adj)", "compute_rfdistances_adj_", ""); nameAndLabels[OptionIndex.SPECIFY_RFDISTANCESTREE_FILE_.ordinal()] = new NameAndLabel("specify_rfdistancestree_", "Select file of adjacent trees to pass via -t)", "specify_rfdistancestree_", "", true); //nameAndLabels[OptionIndex.GENERATE_RANDOMTREES_.ordinal()] = new NameAndLabel("generate_randomtrees_", "Generate random trees", "generate_randomtrees_", ""); nameAndLabels[OptionIndex.NUM_TAXA_.ordinal()] = new NameAndLabel("num_taxa_", "Specify number of taxa for the tree (-r)", "num_taxa_", ""); nameAndLabels[OptionIndex.CHOOSE_RANDOMTYPE_.ordinal()] = new NameAndLabel("choose_randomtype_", "Specify a model for the random trees", "choose_randomtype_", ""); nameAndLabels[OptionIndex.SPECIFY_BRLENGTHS_.ordinal()] = new NameAndLabel("specify_brlengths_", "Specify minimum, mean and maximum branch lengths of the random tree DEFAULT: -rlen 0.001 0.1 0.999", "specify_brlengths_", "Specify three numbers: minimum, mean and maximum branch lengths of the random tree."); nameAndLabels[OptionIndex.SPECIFY_TREEFILENAME_.ordinal()] = new NameAndLabel("specify_treefilename_", "Specify a name for your random tree file (we recommend a name with .tree)", "specify_treefilename_", "Specify a name for the random tree output. Consider adding the .tree extension", false); //nameAndLabels[OptionIndex.PARTITION_MODELFILE_FILE_.ordinal()] = new NameAndLabel("partition_modelfile_", "Choose file that specifies the partition model (-p)", "partition_modelfile_", ""); nameAndLabels[OptionIndex.PARTITION_MODELFILE2_FILE_.ordinal()] = new NameAndLabel("partition_modelfile2_", "Choose file that specifies the model selection (-S)", "partition_modelfile2_", "");; nameAndLabels[OptionIndex.PARTITION_TFILE_FILE_.ordinal()] = new NameAndLabel("partition_tfile_", "Choose a reference tree file for gcf (-t)", "partition_tfile_", "");; nameAndLabels[OptionIndex.SETOFTREES_FILE_FILE_.ordinal()] = new NameAndLabel("setoftrees_file_", "Choose a set of trees for gcf (-gcf)", "setoftrees_file_", ""); nameAndLabels[OptionIndex.NAME_OUTFILES_.ordinal()] = new NameAndLabel("name_outfiles_", "Specify a prefix for the output files (--prefix)", "name_outfiles_", "", false); nameAndLabels[OptionIndex.SPECIFY_NUMQUARTETS_.ordinal()] = new NameAndLabel("specify_numquartets_", "Specify number of quartets (--scf)", "specify_numquartets_", ""); nameAndLabels[OptionIndex.SPECIFY_DATEFILE_FILE_.ordinal()] = new NameAndLabel("specify_datefile_", "Choose a file that specifies dates (--date)", "specify_datefile_", ""); nameAndLabels[OptionIndex.EXTRACT_DATEFILE_.ordinal()] = new NameAndLabel("extract_datefile_", "Automatically extract dates from taxon names (--date TAXNAME)", "extract_datefile_", "", false); nameAndLabels[OptionIndex.SPECIFY_DATETIP_.ordinal()] = new NameAndLabel("specify_datetip_", "Specify tip dates as a real number or YYYY-MM-DD (--date-tip)", "specify_datetip_", ""); nameAndLabels[OptionIndex.SPECIFY_ROOTDATE_.ordinal()] = new NameAndLabel("specify_rootdate_", "Specify root date as a real number or YYYY-MM-DD (--date-root)", "specify_rootdate_", ""); nameAndLabels[OptionIndex.SPECIFY_DATETREEFILE_FILE_.ordinal()] = new NameAndLabel("specify_datetreefile_", "Load and fix this topology (--te)","specify_datetreefile_", ""); nameAndLabels[OptionIndex.SPECIFY_RESAMPLEINT_.ordinal()] = new NameAndLabel("specify_resampleint_", "Resample branch lengths to infer the confidence interval (--date-ci)", "specify_resampleint_", ""); nameAndLabels[OptionIndex.SPECIFY_OUTLIERTHRESH_.ordinal()] = new NameAndLabel("specify_outlierthresh_", "z-score threshold to detect outliers", "specify_outlierthresh_", ""); nameAndLabels[OptionIndex.PRINT_STTESTATS_.ordinal()] = new NameAndLabel("print_sitestats_", "Print alignment site statistics to .alninfo file (-alninfo)", "print_sitestats_", ""); nameAndLabels[OptionIndex.FIX_BRANCHLENGTHS.ordinal()] = new NameAndLabel("fix_branchlength_", "Fix branch lengths of tree passed via -te (-blfix)", "fix_branchlengths_", ""); nameAndLabels[OptionIndex.BRANCHLENGTHS_TREE_FILE_.ordinal()] = new NameAndLabel("branchlengths_tree_", "Provide a tree to fix branch lengths (-te)", "branchlengths_tree_", "", true); nameAndLabels[OptionIndex.SPECIFY_MINBRANCHLENGTH_.ordinal()] = new NameAndLabel("specify_minbranchlength_", "Specify minimum branch length (-blmin)", "specify_minbranchlength_", ""); nameAndLabels[OptionIndex.SPECIFY_MAXBRANCHLENGTH_.ordinal()] = new NameAndLabel("specify_maxbranchlength_", "Specify maximum branch length (-blmax)", "specify_maxbranchlength_", ""); nameAndLabels[OptionIndex.WRITE_LOCALLY_OPTIMAL_.ordinal()] = new NameAndLabel("write_locally_optimal_", "Turn on writing all locally optimal trees (-wt)", "write_locally_optimal_", ""); nameAndLabels[OptionIndex.FIX_BRLENGTHS_.ordinal()] = new NameAndLabel("fix_brlengths_", "Turn on fixing branch lengths of tree passed via -t or -te (-fixbr)", "fix_brlengths_", ""); nameAndLabels[OptionIndex.PER_SITEFILE_.ordinal()] = new NameAndLabel("per_sitefile_", "Write per-site rates to .rate file (-wsr)", "per_sitefile_", "", false); nameAndLabels[OptionIndex.PER_SITEWSLFILE_.ordinal()] = new NameAndLabel("per_sitewslfile_", "Write site log-liklihoods to .sitelh file (-wsl)", "per_sitewslfile_", "", false); nameAndLabels[OptionIndex.PER_SITEWSLRFILE_.ordinal()] = new NameAndLabel("per_sitewslrfile_", "Write site log-likelihoods per rate category (-wslr)", "per_sitewslrfile_", "", false); nameAndLabels[OptionIndex.PER_SITEWSLMFILE_.ordinal()] = new NameAndLabel("per_sitewslmfile_", "Write site log-likelihoods per mixture class (-wslm)", "per_sitewslmfile_", "", false); nameAndLabels[OptionIndex.PER_SITEWSLMRFILE_.ordinal()] = new NameAndLabel("per_sitewslmrfile_", "Write site log-liklihoods per mixture+rate class (-wslmr)", "per_sitewslmrfile_", "", false); nameAndLabels[OptionIndex.PER_SITEWSPMFILE_.ordinal()] = new NameAndLabel("per_sitewspmfile_", "Write site probabilities per mixture class (-wspm)", "per_sitewspmfile_", "", false); nameAndLabels[OptionIndex.PER_SITEWSPRFILE_.ordinal()] = new NameAndLabel("per_sitewsprfile_", "Write site probabilities per rate category (-wspr)", "per_sitewsprfile_", "", false); nameAndLabels[OptionIndex.PER_SITEWSPMRFILE_.ordinal()] = new NameAndLabel("per_sitewspmrfile_", "Write site probabilities per rate category (-wspmr)", "per_sitewspmrfile_", "", false); nameAndLabels[OptionIndex.PER_SITEWPLFILE_.ordinal()] = new NameAndLabel("per_sitewplfile_", "Write partition log-likelihoods to .partlh file (-wpl)", "per_sitewplfile_", "", false); nameAndLabels[OptionIndex.WRITE_SITELIKELIHOODS_.ordinal()] = new NameAndLabel("write_sitelikelihoods_", "Write log-likelihoods in TREE-PUZZLE format (-wsl)", "write_sitelikelihoods_", ""); nameAndLabels[OptionIndex.WRITE_LOGLIKELIHOODS_.ordinal()] = new NameAndLabel("write_loglikelihoods_", "Write log-likelihoods per rate category (-wslg)", "write_loglikelihoods_", ""); nameAndLabels[OptionIndex.LIST_CSINTEGERS_FILE.ordinal()] = new NameAndLabel("list_csintegers_file", "Specify a list of comma-separated integer numbers (-fconst)", "list_csintegers_file", ""); } //AnnotatedPluginDocument[] selectedDocuments = null; public IQTREEXSEDE_1_01_01Options(final AnnotatedPluginDocument[] selectedDocuments) throws DocumentOperationException { //super(selectedDocuments); OPTION_NAME = "IQTree_CIPRES"; this.selectedDocuments = selectedDocuments; jfc.setFileSelectionMode(JFileChooser.FILES_ONLY); //Simple Options simpleOptions = this.addChildOptions("simpleOptions", "Simple Parameters", ""); addJobNameOption(simpleOptions, selectedDocuments, 3); simpleOptions.beginAlignHorizontally(null, false); runtime_= simpleOptions.addDoubleOption(nameAndLabels[OptionIndex.RUNTIME_.ordinal()].name, nameAndLabels[OptionIndex.RUNTIME_.ordinal()].label, 0.5, 0.05, 168.00); simpleOptions.addLabel(" "); final OptionValue[] which_iqtree_Choices = ComboBoxValueLabel.fillOptionValues(ComboBoxValueLabel.IQTREE_VERSION_212, ComboBoxValueLabel.IQTREE_VERSION_2227); which_iqtree_ = simpleOptions.addComboBoxOption(nameAndLabels[OptionIndex.WHICH_IQTREE_.ordinal()].name, nameAndLabels[OptionIndex.WHICH_IQTREE_.ordinal()].label, which_iqtree_Choices, which_iqtree_Choices[2]); simpleOptions.addLabel(" "); specify_numpatterns_ = simpleOptions.addIntegerOption(nameAndLabels[OptionIndex.SPECIFY_NUMPATTERNS_.ordinal()].name, nameAndLabels[OptionIndex.SPECIFY_NUMPATTERNS_.ordinal()].label, 1000, 1, Integer.MAX_VALUE); addBuffer(simpleOptions); simpleOptions.endAlignHorizontally(); simpleOptions.beginAlignHorizontally(null, false); //specify_numpatterns_ = simpleOptions.addIntegerOption(nameAndLabels[OptionIndex.SPECIFY_NUMPATTERNS_.ordinal()].name, nameAndLabels[OptionIndex.SPECIFY_NUMPATTERNS_.ordinal()].label, 0, 0, Integer.MAX_VALUE); //simpleOptions.addLabel(" "); more_memory_= simpleOptions.addBooleanOption(nameAndLabels[OptionIndex.MORE_MEMORY_.ordinal()].name, nameAndLabels[OptionIndex.MORE_MEMORY_.ordinal()].label, false); more_memory2_= simpleOptions.addBooleanOption(nameAndLabels[OptionIndex.MORE_MEMORY2_.ordinal()].name, nameAndLabels[OptionIndex.MORE_MEMORY2_.ordinal()].label, false); simpleOptions.addLabel(" "); specify_safe_ = simpleOptions.addBooleanOption(nameAndLabels[OptionIndex.SPECIFY_SAFE_.ordinal()].name, nameAndLabels[OptionIndex.SPECIFY_SAFE_.ordinal()].label, false); //specify_autocores_ = simpleOptions.addBooleanOption(nameAndLabels[OptionIndex.SPECIFY_AUTOCORES_.ordinal()].name, nameAndLabels[OptionIndex.SPECIFY_AUTOCORES_.ordinal()].label, false); addBuffer(simpleOptions); simpleOptions.endAlignHorizontally(); simpleOptions.beginAlignHorizontally(null, false); //specify_autocores_ = simpleOptions.addBooleanOption(nameAndLabels[OptionIndex.SPECIFY_AUTOCORES_.ordinal()].name, nameAndLabels[OptionIndex.SPECIFY_AUTOCORES_.ordinal()].label, false); final OptionValue[] specify_runtype_Choices = ComboBoxValueLabel.fillOptionValues(ComboBoxValueLabel.IQTREE_RUNTYPE_MODEL, ComboBoxValueLabel.IQTREE_RUNTYPE_INFERENCE); specify_runtype_ = simpleOptions.addComboBoxOption(nameAndLabels[OptionIndex.SPECIFY_RUNTYPE_.ordinal()].name, nameAndLabels[OptionIndex.SPECIFY_RUNTYPE_.ordinal()].label, specify_runtype_Choices, specify_runtype_Choices[1]); simpleOptions.addLabel(" "); final OptionValue[] sequence_type_Choices = ComboBoxValueLabel.fillOptionValues(ComboBoxValueLabel.IQTREE_SEQUENCE_TYPE_NO_SELECT, ComboBoxValueLabel.IQTREE_SEQUENCE_TYPE_NT2AA); sequence_type_ = simpleOptions.addComboBoxOption(nameAndLabels[OptionIndex.SEQUENCE_TYPE_.ordinal()].name, nameAndLabels[OptionIndex.SEQUENCE_TYPE_.ordinal()].label, sequence_type_Choices, sequence_type_Choices[0]); addBuffer(simpleOptions); simpleOptions.endAlignHorizontally(); simpleOptions.beginAlignHorizontally(null, false); //final OptionValue[] sequence_type_Choices = ComboBoxValueLabel.fillOptionValues(ComboBoxValueLabel.IQTREE_SEQUENCE_TYPE_DNA, ComboBoxValueLabel.IQTREE_SEQUENCE_TYPE_NT2AA); //sequence_type_ = simpleOptions.addComboBoxOption(nameAndLabels[OptionIndex.SEQUENCE_TYPE_.ordinal()].name, nameAndLabels[OptionIndex.SEQUENCE_TYPE_.ordinal()].label, sequence_type_Choices, sequence_type_Choices[0]); final OptionValue[] codon_type_Choices = ComboBoxValueLabel.fillOptionValues(ComboBoxValueLabel.IQTREE_CODON1, ComboBoxValueLabel.IQTREE_CODON25); codon_type_ = simpleOptions.addComboBoxOption(nameAndLabels[OptionIndex.CODON_TYPE_.ordinal()].name, nameAndLabels[OptionIndex.CODON_TYPE_.ordinal()].label, codon_type_Choices, codon_type_Choices[0]); simpleOptions.addLabel(" "); final OptionValue[] nt2aa_type_Choices = ComboBoxValueLabel.fillOptionValues(ComboBoxValueLabel.IQTREE_NT2AA1, ComboBoxValueLabel.IQTREE_NT2AA25); nt2aa_type_ = simpleOptions.addComboBoxOption(nameAndLabels[OptionIndex.NT2AA_TYPE_.ordinal()].name, nameAndLabels[OptionIndex.NT2AA_TYPE_.ordinal()].label, nt2aa_type_Choices, nt2aa_type_Choices[0]); addBuffer(simpleOptions); simpleOptions.endAlignHorizontally(); simpleOptions.beginAlignHorizontally(null, false); //final OptionValue[] nt2aa_type_Choices = ComboBoxValueLabel.fillOptionValues(ComboBoxValueLabel.IQTREE_NT2AA1, ComboBoxValueLabel.IQTREE_NT2AA25); //nt2aa_type_ = simpleOptions.addComboBoxOption(nameAndLabels[OptionIndex.NT2AA_TYPE_.ordinal()].name, nameAndLabels[OptionIndex.NT2AA_TYPE_.ordinal()].label, nt2aa_type_Choices, nt2aa_type_Choices[0]); FileChooser fc1 = createFileChooser(simpleOptions, nameAndLabels[OptionIndex.STARTING_TREE_FILE.ordinal()].name, nameAndLabels[OptionIndex.STARTING_TREE_FILE.ordinal()].label, true); starting_tree_File = fc1.selectedFile; starting_tree_FileBrowse = fc1.selectedFileBrowse; simpleOptions.endAlignHorizontally(); simpleOptions.beginAlignHorizontally(null, false); use_nj_ = simpleOptions.addBooleanOption(nameAndLabels[OptionIndex.USE_NJ_.ordinal()].name, nameAndLabels[OptionIndex.USE_NJ_.ordinal()].label, false); use_random_ = simpleOptions.addBooleanOption(nameAndLabels[OptionIndex.USE_RANDOM_.ordinal()].name, nameAndLabels[OptionIndex.USE_RANDOM_.ordinal()].label, false); specify_seed_= simpleOptions.addStringOption(nameAndLabels[OptionIndex.SPECIFY_SEED_.ordinal()].name, nameAndLabels[OptionIndex.SPECIFY_SEED_.ordinal()].label, ""); //simpleOptions.addLabel(" "); //specify_quartets_= simpleOptions.addStringOption(nameAndLabels[OptionIndex.SPECIFY_QUARTETS_.ordinal()].name, nameAndLabels[OptionIndex.SPECIFY_QUARTETS_.ordinal()].label, ""); //addBuffer(simpleOptions); simpleOptions.endAlignHorizontally(); simpleOptions.beginAlignHorizontally(null, false); specify_outgroup_ = simpleOptions.addStringOption(nameAndLabels[OptionIndex.SPECIFY_OUTGROUP_.ordinal()].name, nameAndLabels[OptionIndex.SPECIFY_OUTGROUP_.ordinal()].label, ""); specify_prefix_ = simpleOptions.addStringOption(nameAndLabels[OptionIndex.SPECIFY_PREFIX_.ordinal()].name, nameAndLabels[OptionIndex.SPECIFY_PREFIX_.ordinal()].label, "output"); simpleOptions.endAlignHorizontally(); //simpleOptions.beginAlignHorizontally(null, false); //specify_seed_= simpleOptions.addIntegerOption(nameAndLabels[OptionIndex.SPECIFY_SEED_.ordinal()].name, nameAndLabels[OptionIndex.SPECIFY_SEED_.ordinal()].label, 12345, 0, Integer.MAX_VALUE); //specify_quartets_= simpleOptions.addIntegerOption(nameAndLabels[OptionIndex.SPECIFY_QUARTETS_.ordinal()].name, nameAndLabels[OptionIndex.SPECIFY_QUARTETS_.ordinal()].label, 1, 1, Integer.MAX_VALUE); //simpleOptions.endAlignHorizontally(); //Advanced Options advancedOptions = this.addChildOptions("advancedOptions", "Advanced Parameters (P1) ", ""); addCipresDivider(advancedOptions, "Quartet Options"); advancedOptions.beginAlignHorizontally(null, false); final OptionValue[] specify_quartets_Choices = ComboBoxValueLabel.fillOptionValues(ComboBoxValueLabel.IQTREE_QUARTET_NO, ComboBoxValueLabel.IQTREE_QUARTET_SPECIFY); specify_quartets_ = advancedOptions.addComboBoxOption(nameAndLabels[OptionIndex.SPECIFY_QUARTETS_.ordinal()].name, nameAndLabels[OptionIndex.SPECIFY_QUARTETS_.ordinal()].label, specify_quartets_Choices, specify_quartets_Choices[0]); specify_quartetnum_ = advancedOptions.addIntegerOption(nameAndLabels[OptionIndex.SPECIFY_QUARTETNUM_.ordinal()].name, nameAndLabels[OptionIndex.SPECIFY_QUARTETNUM_.ordinal()].label, 0, 0, Integer.MAX_VALUE); addBuffer(advancedOptions); advancedOptions.endAlignHorizontally(); advancedOptions.beginAlignHorizontally(null, false); FileChooser fc_quartet = createFileChooser(advancedOptions, nameAndLabels[OptionIndex.SPECIFY_QUARTETSET_FILE_.ordinal()].name, nameAndLabels[OptionIndex.SPECIFY_QUARTETSET_FILE_.ordinal()].label, true); specify_quartetset_file_ = fc_quartet.selectedFile; specify_quartetset_file_Browse = fc_quartet.selectedFileBrowse; write_quartets_ = advancedOptions.addBooleanOption(nameAndLabels[OptionIndex.WRITE_QUARTETS_.ordinal()].name, nameAndLabels[OptionIndex.WRITE_QUARTETS_.ordinal()].label, false); advancedOptions.endAlignHorizontally(); addCipresDivider(advancedOptions, "Partition Options"); advancedOptions.beginAlignHorizontally(null, false); FileChooser fc2 = createFileChooser(advancedOptions, nameAndLabels[OptionIndex.PARTITION_FILE_.ordinal()].name, nameAndLabels[OptionIndex.PARTITION_FILE_.ordinal()].label, true); partition_file_ = fc2.selectedFile; partition_file_Browse = fc2.selectedFileBrowse; final OptionValue[] partition_type_Choices = ComboBoxValueLabel.fillOptionValues(ComboBoxValueLabel.IQTREE_PARTITION_TYPE_Q, ComboBoxValueLabel.IQTREE_PARTITION_TYPE_SP); partition_type_ = advancedOptions.addComboBoxOption(nameAndLabels[OptionIndex.PARTITION_TYPE_.ordinal()].name, nameAndLabels[OptionIndex.PARTITION_TYPE_.ordinal()].label, partition_type_Choices, partition_type_Choices[0]); advancedOptions.endAlignHorizontally(); advancedOptions.beginAlignHorizontally(null, false); mixed_sequence_ = advancedOptions.addBooleanOption(nameAndLabels[OptionIndex.MIXED_SEQUENCE_.ordinal()].name, nameAndLabels[OptionIndex.MIXED_SEQUENCE_.ordinal()].label, false); advancedOptions.addLabel(" "); final OptionValue[] num_mixedsequences_Choices = ComboBoxValueLabel.fillOptionValues(ComboBoxValueLabel.IQTREE_PARTITION_0, ComboBoxValueLabel.IQTREE_PARTITION_5); num_mixedsequences_ = advancedOptions.addComboBoxOption(nameAndLabels[OptionIndex.NUM_MIXEDSEQUENCES_.ordinal()].name, nameAndLabels[OptionIndex.NUM_MIXEDSEQUENCES_.ordinal()].label, num_mixedsequences_Choices, num_mixedsequences_Choices[0]); addBuffer(advancedOptions); advancedOptions.endAlignHorizontally(); advancedOptions.beginAlignHorizontally(null, false); FileChooser fc3 = createFileChooser(advancedOptions, nameAndLabels[OptionIndex.DATATYPE2_FILE_.ordinal()].name, nameAndLabels[OptionIndex.DATATYPE2_FILE_.ordinal()].label, false); datatype2_file_ = fc3.selectedFile; datatype2_file_Browse = fc3.selectedFileBrowse; FileChooser fc4 = createFileChooser(advancedOptions, nameAndLabels[OptionIndex.DATATYPE3_FILE_.ordinal()].name, nameAndLabels[OptionIndex.DATATYPE3_FILE_.ordinal()].label, false); datatype3_file_= fc4.selectedFile; datatype3_file_Browse = fc4.selectedFileBrowse; advancedOptions.endAlignHorizontally(); advancedOptions.beginAlignHorizontally(null, false); FileChooser fc5 = createFileChooser(advancedOptions, nameAndLabels[OptionIndex.DATATYPE4_FILE_.ordinal()].name, nameAndLabels[OptionIndex.DATATYPE4_FILE_.ordinal()].label, false); datatype4_file_ = fc5.selectedFile; datatype4_file_Browse = fc5.selectedFileBrowse; FileChooser fc6 = createFileChooser(advancedOptions, nameAndLabels[OptionIndex.DATATYPE5_FILE_.ordinal()].name, nameAndLabels[OptionIndex.DATATYPE5_FILE_.ordinal()].label, false); datatype5_file_ = fc6.selectedFile; datatype5_file_Browse = fc6.selectedFileBrowse; advancedOptions.endAlignHorizontally(); addCipresDivider(advancedOptions, "Automatic Model Selection Parameters"); advancedOptions.beginAlignHorizontally(null, false); //Map extraValues = new HashMap(); //extraValues.put(" ", ""); final OptionValue[] specify_model_Choices = ComboBoxValueLabel.fillOptionValues(extraValues, ComboBoxValueLabel.IQTREE_TESTONLY, ComboBoxValueLabel.IQTREE_TESTNEWMERGE); specify_model_= advancedOptions.addComboBoxOption(nameAndLabels[OptionIndex.SPECIFY_MODEL_.ordinal()].name, nameAndLabels[OptionIndex.SPECIFY_MODEL_.ordinal()].label, specify_model_Choices, specify_model_Choices[0]); advancedOptions.addLabel(" "); final OptionValue[] specify_liemarkov_Choices = ComboBoxValueLabel.fillOptionValues(extraValues, ComboBoxValueLabel.IQTREE_LM, ComboBoxValueLabel.IQTREE_LMSS); specify_liemarkov_= advancedOptions.addComboBoxOption(nameAndLabels[OptionIndex.SPECIFY_LIEMARKOV_.ordinal()].name, nameAndLabels[OptionIndex.SPECIFY_LIEMARKOV_.ordinal()].label, specify_liemarkov_Choices, specify_liemarkov_Choices[0]); final OptionValue[] select_rcluster_Choices = ComboBoxValueLabel.fillOptionValues(extraValues, ComboBoxValueLabel.IQTREE_RCLUSTER, ComboBoxValueLabel.IQTREE_RCLUSTERMAX); select_rcluster_ = advancedOptions.addComboBoxOption(nameAndLabels[OptionIndex.SELECT_RCLUSTER_.ordinal()].name, nameAndLabels[OptionIndex.SELECT_RCLUSTER_.ordinal()].label,select_rcluster_Choices, select_rcluster_Choices[0]); //specify_rclusterval_ = advancedOptions.addIntegerOption(nameAndLabels[OptionIndex.SPECIFY_RCLUSTERVAL_.ordinal()].name, nameAndLabels[OptionIndex.SPECIFY_RCLUSTERVAL_.ordinal()].label, 0, 0, Integer.MAX_VALUE); addBuffer(advancedOptions); advancedOptions.endAlignHorizontally(); advancedOptions.beginAlignHorizontally(null, false); specify_rclusterval_ = advancedOptions.addStringOption(nameAndLabels[OptionIndex.SPECIFY_RCLUSTERVAL_.ordinal()].name, nameAndLabels[OptionIndex.SPECIFY_RCLUSTERVAL_.ordinal()].label, ""); specify_basemodels_ = advancedOptions.addStringOption(nameAndLabels[OptionIndex.SPECIFY_BASEMODELS_.ordinal()].name, nameAndLabels[OptionIndex.SPECIFY_BASEMODELS_.ordinal()].label, ""); advancedOptions.endAlignHorizontally(); advancedOptions.beginAlignHorizontally(null, false); final OptionValue[] specify_aamodels_Choices = ComboBoxValueLabel.fillOptionValues(extraValues, ComboBoxValueLabel.IQTREE_NUCLEAR, ComboBoxValueLabel.IQTREE_VIRAL); specify_aamodels_ = advancedOptions.addComboBoxOption(nameAndLabels[OptionIndex.SPECIFY_AAMODELS_.ordinal()].name, nameAndLabels[OptionIndex.SPECIFY_AAMODELS_.ordinal()].label, specify_aamodels_Choices, specify_aamodels_Choices[0]); specify_freqtypes_ = advancedOptions.addStringOption(nameAndLabels[OptionIndex.SPECIFY_FREQTYPES_.ordinal()].name, nameAndLabels[OptionIndex.SPECIFY_FREQTYPES_.ordinal()].label, ""); advancedOptions.endAlignHorizontally(); advancedOptions.beginAlignHorizontally(null, false); specify_ratehettypes_ = advancedOptions.addStringOption(nameAndLabels[OptionIndex.SPECIFY_RATEHETTYPES_.ordinal()].name, nameAndLabels[OptionIndex.SPECIFY_RATEHETTYPES_.ordinal()].label, ""); specify_mincat_ = advancedOptions.addIntegerOption(nameAndLabels[OptionIndex.SPECIFY_MINCAT_.ordinal()].name, nameAndLabels[OptionIndex.SPECIFY_MINCAT_.ordinal()].label, 2, 0, Integer.MAX_VALUE); //advancedOptions.addLabel(" "); advancedOptions.endAlignHorizontally(); advancedOptions.beginAlignHorizontally(null, false); specify_maxcat_ = advancedOptions.addIntegerOption(nameAndLabels[OptionIndex.SPECIFY_MAXCAT_.ordinal()].name, nameAndLabels[OptionIndex.SPECIFY_MAXCAT_.ordinal()].label, 10, 0, Integer.MAX_VALUE); //addBuffer(advancedOptions); specify_merit_ = advancedOptions.addStringOption(nameAndLabels[OptionIndex.SPECIFY_MERIT_.ordinal()].name, nameAndLabels[OptionIndex.SPECIFY_MERIT_.ordinal()].label, ""); advancedOptions.endAlignHorizontally(); advancedOptions.beginAlignHorizontally(null, false); specify_fulltreesearch_ = advancedOptions.addBooleanOption(nameAndLabels[OptionIndex.SPECIFY_FULLTREESEARCH_.ordinal()].name, nameAndLabels[OptionIndex.SPECIFY_FULLTREESEARCH_.ordinal()].label, false); specify_addlmodels_ = advancedOptions.addStringOption(nameAndLabels[OptionIndex.SPECIFY_ADDLMODELS_.ordinal()].name, nameAndLabels[OptionIndex.SPECIFY_ADDLMODELS_.ordinal()].label, ""); advancedOptions.endAlignHorizontally(); advancedOptions.beginAlignHorizontally(null, false); FileChooser specify_nexusmodelfile_fc = createFileChooser(advancedOptions, nameAndLabels[OptionIndex.SPECIFY_NEXUSMODELFILE_FILE_.ordinal()].name, nameAndLabels[OptionIndex.SPECIFY_NEXUSMODELFILE_FILE_.ordinal()].label, false); specify_nexusmodelfile_file_ = specify_nexusmodelfile_fc.selectedFile; specify_nexusmodelfile_file_Browse = specify_nexusmodelfile_fc.selectedFileBrowse; addBuffer(advancedOptions); advancedOptions.endAlignHorizontally(); addCipresDivider(advancedOptions, "Specify Substitution Models"); advancedOptions.beginAlignHorizontally(null, false); freetextmodel_ = advancedOptions.addStringOption(nameAndLabels[OptionIndex.FREETEXTMODEL_.ordinal()].name, nameAndLabels[OptionIndex.FREETEXTMODEL_.ordinal()].label, ""); //Map extraValuesModel = new HashMap(); //extraValuesModel.put(" ", ""); final OptionValue[] specify_dnamodel_Choices = ComboBoxValueLabel.fillOptionValues(extraValues, ComboBoxValueLabel.IQTREE_JC69, ComboBoxValueLabel.IQTREE_GTR); specify_dnamodel_ = advancedOptions.addComboBoxOption(nameAndLabels[OptionIndex.SPECIFY_DNAMODEL_.ordinal()].name, nameAndLabels[OptionIndex.SPECIFY_DNAMODEL_.ordinal()].label, specify_dnamodel_Choices, specify_dnamodel_Choices[0]); max_posteriormode_ = advancedOptions.addBooleanOption(nameAndLabels[OptionIndex.MAX_POSTERIORMODE_.ordinal()].name, nameAndLabels[OptionIndex.MAX_POSTERIORMODE_.ordinal()].label, false); advancedOptions.endAlignHorizontally(); advancedOptions.beginAlignHorizontally(null, false); final OptionValue[] specify_protmodel_Choices = ComboBoxValueLabel.fillOptionValues(extraValues, ComboBoxValueLabel.IQTREE_BLOSUM62, ComboBoxValueLabel.IQTREE_CF4); specify_protmodel_ = advancedOptions.addComboBoxOption(nameAndLabels[OptionIndex.SPECIFY_PROTMODEL_.ordinal()].name, nameAndLabels[OptionIndex.SPECIFY_PROTMODEL_.ordinal()].label, specify_protmodel_Choices, specify_protmodel_Choices[0]); final OptionValue[] specify_protmixture_Choices = ComboBoxValueLabel.fillOptionValues(extraValues, ComboBoxValueLabel.IQTREE_PC10, ComboBoxValueLabel.IQTREE_PCF4); specify_protmixture_ = advancedOptions.addComboBoxOption(nameAndLabels[OptionIndex.SPECIFY_PROTMIXTURE_.ordinal()].name, nameAndLabels[OptionIndex.SPECIFY_PROTMIXTURE_.ordinal()].label, specify_protmixture_Choices, specify_protmixture_Choices[0]); final OptionValue[] specify_binmodel_Choices = ComboBoxValueLabel.fillOptionValues(extraValues, ComboBoxValueLabel.IQTREE_JC2, ComboBoxValueLabel.IQTREE_ORDERED); specify_binmodel_ = advancedOptions.addComboBoxOption(nameAndLabels[OptionIndex.SPECIFY_BINMODEL_.ordinal()].name, nameAndLabels[OptionIndex.SPECIFY_BINMODEL_.ordinal()].label, specify_binmodel_Choices, specify_binmodel_Choices[0]); final OptionValue[] specify_codonmodel_Choices = ComboBoxValueLabel.fillOptionValues(extraValues, ComboBoxValueLabel.IQTREE_MG, ComboBoxValueLabel.IQTREE_SCHN05); specify_codonmodel_ = advancedOptions.addComboBoxOption(nameAndLabels[OptionIndex.SPECIFY_CODONMODEL_.ordinal()].name, nameAndLabels[OptionIndex.SPECIFY_CODONMODEL_.ordinal()].label, specify_codonmodel_Choices, specify_codonmodel_Choices[0]); addBuffer(advancedOptions); advancedOptions.endAlignHorizontally(); advancedOptions.beginAlignHorizontally(null, false); FileChooser fc7 = createFileChooser(advancedOptions, nameAndLabels[OptionIndex.GUIDE_TREE_.ordinal()].name, nameAndLabels[OptionIndex.GUIDE_TREE_.ordinal()].label, false); guide_tree_file = fc7.selectedFile; guide_tree_file_Browse = fc7.selectedFileBrowse; //advancedOptions.endAlignHorizontally(); //advancedOptions.beginAlignHorizontally(null, false); FileChooser frequency_file_fc = createFileChooser(advancedOptions, nameAndLabels[OptionIndex.FREQUENCY_FILE_FILE_.ordinal()].name, nameAndLabels[OptionIndex.FREQUENCY_FILE_FILE_.ordinal()].label, false); frequency_file_file = frequency_file_fc.selectedFile; frequency_file_file_Browse = frequency_file_fc.selectedFileBrowse; advancedOptions.endAlignHorizontally(); //advancedOptions.beginAlignHorizontally(null, false); //FileChooser fc7 = createFileChooser(advancedOptions, nameAndLabels[OptionIndex.GUIDE_TREE_.ordinal()].name, nameAndLabels[OptionIndex.GUIDE_TREE_.ordinal()].label, false); //guide_tree_file = fc7.selectedFile; //guide_tree_file_Browse = fc7.selectedFileBrowse; //final OptionValue[] specify_binmodel_Choices = ComboBoxValueLabel.fillOptionValues(ComboBoxValueLabel.IQTREE_JC2, ComboBoxValueLabel.IQTREE_ORDERED); //specify_binmodel_ = advancedOptions.addComboBoxOption(nameAndLabels[OptionIndex.SPECIFY_BINMODEL_.ordinal()].name, nameAndLabels[OptionIndex.SPECIFY_BINMODEL_.ordinal()].label, specify_binmodel_Choices, specify_binmodel_Choices[0]); //advancedOptions.endAlignHorizontally(); //advancedOptions.beginAlignHorizontally(null, false); //final OptionValue[] specify_codonmodel_Choices = ComboBoxValueLabel.fillOptionValues(ComboBoxValueLabel.IQTREE_MG, ComboBoxValueLabel.IQTREE_SCHN05); //specify_codonmodel_ = advancedOptions.addComboBoxOption(nameAndLabels[OptionIndex.SPECIFY_CODONMODEL_.ordinal()].name, nameAndLabels[OptionIndex.SPECIFY_CODONMODEL_.ordinal()].label, specify_codonmodel_Choices, specify_codonmodel_Choices[0]); //final OptionValue[] specify_modelfreq_Choices = ComboBoxValueLabel.fillOptionValues(ComboBoxValueLabel.IQTREE_F, ComboBoxValueLabel.IQTREE_F3x4); //specify_modelfreq_ = advancedOptions.addComboBoxOption(nameAndLabels[OptionIndex.SPECIFY_MODELFREQ_.ordinal()].name, nameAndLabels[OptionIndex.SPECIFY_MODELFREQ_.ordinal()].label, specify_modelfreq_Choices, specify_modelfreq_Choices[0]); //advancedOptions.endAlignHorizontally(); advancedOptions.beginAlignHorizontally(null, false); final OptionValue[] specify_modelfreq_Choices = ComboBoxValueLabel.fillOptionValues(extraValues, ComboBoxValueLabel.IQTREE_F, ComboBoxValueLabel.IQTREE_F3x4); specify_modelfreq_ = advancedOptions.addComboBoxOption(nameAndLabels[OptionIndex.SPECIFY_MODELFREQ_.ordinal()].name, nameAndLabels[OptionIndex.SPECIFY_MODELFREQ_.ordinal()].label, specify_modelfreq_Choices, specify_modelfreq_Choices[0]); advancedOptions.addLabel(" "); optimize_weights_ = advancedOptions.addBooleanOption(nameAndLabels[OptionIndex.OPTIMIZE_WEIGHTS_.ordinal()].name, nameAndLabels[OptionIndex.OPTIMIZE_WEIGHTS_.ordinal()].label, false); final OptionValue[] specify_modelrate_Choices = ComboBoxValueLabel.fillOptionValues(extraValues, ComboBoxValueLabel.IQTREE_I, ComboBoxValueLabel.IQTREE_IR); specify_modelrate_ = advancedOptions.addComboBoxOption(nameAndLabels[OptionIndex.SPECIFY_MODELRATE_.ordinal()].name, nameAndLabels[OptionIndex.SPECIFY_MODELRATE_.ordinal()].label, specify_modelrate_Choices, specify_modelrate_Choices[0]); advancedOptions.addLabel(" "); final OptionValue[] asc_bias_Choices = ComboBoxValueLabel.fillOptionValues(ComboBoxValueLabel.IQTREE_YES, ComboBoxValueLabel.IQTREE_NO); asc_bias_ = advancedOptions.addComboBoxOption(nameAndLabels[OptionIndex.ASC_BIAS_.ordinal()].name, nameAndLabels[OptionIndex.ASC_BIAS_.ordinal()].label, asc_bias_Choices, asc_bias_Choices[1]); addBuffer(advancedOptions); advancedOptions.endAlignHorizontally(); advancedOptions.beginAlignHorizontally(null, false); gamma_shape_ = advancedOptions.addStringOption(nameAndLabels[OptionIndex.GAMMA_SHAPE_.ordinal()].name, nameAndLabels[OptionIndex.GAMMA_SHAPE_.ordinal()].label, ""); advancedOptions.addLabel(" "); median_approximation_ = advancedOptions.addBooleanOption(nameAndLabels[OptionIndex.MEDIAN_APPROXIMATION_.ordinal()].name, nameAndLabels[OptionIndex.MEDIAN_APPROXIMATION_.ordinal()].label, false); addBuffer(advancedOptions); advancedOptions.endAlignHorizontally(); advancedOptions.beginAlignHorizontally(null, false); invariable_sites_ = advancedOptions.addIntegerOption(nameAndLabels[OptionIndex.INVARIABLE_SITES_.ordinal()].name, nameAndLabels[OptionIndex.INVARIABLE_SITES_.ordinal()].label, 0, 0, Integer.MAX_VALUE); advancedOptions.addLabel(" "); thorough_estimation_ = advancedOptions.addBooleanOption(nameAndLabels[OptionIndex.THOROUGH_ESTIMATION_.ordinal()].name, nameAndLabels[OptionIndex.THOROUGH_ESTIMATION_.ordinal()].label, false); addBuffer(advancedOptions); advancedOptions.endAlignHorizontally(); advancedOptions2 = this.addChildOptions("advancedOptions2", "Advanced Parameters (P2) ", ""); addCipresDivider(advancedOptions2, "Tree Search Parameters"); advancedOptions2.beginAlignHorizontally(null, false); num_parstrees_ = advancedOptions2.addIntegerOption(nameAndLabels[OptionIndex.NUM_PARSTREES_.ordinal()].name, nameAndLabels[OptionIndex.NUM_PARSTREES_.ordinal()].label, 100, 1, Integer.MAX_VALUE); advancedOptions2.addLabel(" "); num_topparstrees_ = advancedOptions2.addIntegerOption(nameAndLabels[OptionIndex.NUM_TOPPARSTREES_.ordinal()].name, nameAndLabels[OptionIndex.NUM_TOPPARSTREES_.ordinal()].label, 20, 1, Integer.MAX_VALUE); addBuffer(advancedOptions2); advancedOptions2.endAlignHorizontally(); advancedOptions2.beginAlignHorizontally(null, false); num_besttrees_ = advancedOptions2.addIntegerOption(nameAndLabels[OptionIndex.NUM_BESTTREES_.ordinal()].name, nameAndLabels[OptionIndex.NUM_BESTTREES_.ordinal()].label, 5, 1, Integer.MAX_VALUE); advancedOptions2.addLabel(" "); num_unsucctostop_ = advancedOptions2.addIntegerOption(nameAndLabels[OptionIndex.NUM_UNSUCCTOSTOP_.ordinal()].name, nameAndLabels[OptionIndex.NUM_UNSUCCTOSTOP_.ordinal()].label, 100, 1, Integer.MAX_VALUE); addBuffer(advancedOptions2); advancedOptions2.endAlignHorizontally(); advancedOptions2.beginAlignHorizontally(null, false); num_tostop_ = advancedOptions2.addStringOption(nameAndLabels[OptionIndex.NUM_TOSTOP_.ordinal()].name, nameAndLabels[OptionIndex.NUM_TOSTOP_.ordinal()].label, ""); advancedOptions2.addLabel(" "); specify_radius_ = advancedOptions2.addIntegerOption(nameAndLabels[OptionIndex.SPECIFY_RADIUS_.ordinal()].name, nameAndLabels[OptionIndex.SPECIFY_RADIUS_.ordinal()].label, 6, 0, Integer.MAX_VALUE); addBuffer(advancedOptions2); advancedOptions2.endAlignHorizontally(); advancedOptions2.beginAlignHorizontally(null, false); perturb_strength_ = advancedOptions2.addDoubleOption(nameAndLabels[OptionIndex.PERTURB_STRENGTH_.ordinal()].name, nameAndLabels[OptionIndex.PERTURB_STRENGTH_.ordinal()].label, 0.5, 0.0, 1.0); advancedOptions2.addLabel(" "); slower_NNI_ = advancedOptions2.addBooleanOption(nameAndLabels[OptionIndex.SLOWER_NNI_.ordinal()].name, nameAndLabels[OptionIndex.SLOWER_NNI_.ordinal()].label, false); addBuffer(advancedOptions2); advancedOptions2.endAlignHorizontally(); advancedOptions2.beginAlignHorizontally(null, false); no_mlpairwise_ = advancedOptions2.addBooleanOption(nameAndLabels[OptionIndex.NO_MLPAIRWISE_.ordinal()].name, nameAndLabels[OptionIndex.NO_MLPAIRWISE_.ordinal()].label, false); use_fasttreesearch_ = advancedOptions2.addBooleanOption(nameAndLabels[OptionIndex.USE_FASTTREESEARCH_.ordinal()].name, nameAndLabels[OptionIndex.USE_FASTTREESEARCH_.ordinal()].label, false); FileChooser fc8 = createFileChooser(advancedOptions2, nameAndLabels[OptionIndex.CONSTRAINT_FILE_.ordinal()].name, nameAndLabels[OptionIndex.CONSTRAINT_FILE_.ordinal()].label, true); constraint_file_ = fc8.selectedFile; constraint_file_Browse = fc8.selectedFileBrowse; advancedOptions2.endAlignHorizontally(); addCipresDivider(advancedOptions2, "Bootstrap Search Parameters"); advancedOptions2.beginAlignHorizontally(null, false); final OptionValue[] bootstrap_type_Choices = ComboBoxValueLabel.fillOptionValues(ComboBoxValueLabel.IQTREE_BB, ComboBoxValueLabel.IQTREE_BC); bootstrap_type_ = advancedOptions2.addComboBoxOption(nameAndLabels[OptionIndex.BOOTSTRAP_TYPE_.ordinal()].name, nameAndLabels[OptionIndex.BOOTSTRAP_TYPE_.ordinal()].label, bootstrap_type_Choices, bootstrap_type_Choices[0]); advancedOptions2.addLabel(" "); use_bnni_ = advancedOptions2.addBooleanOption(nameAndLabels[OptionIndex.USE_BNNI_.ordinal()].name, nameAndLabels[OptionIndex.USE_BNNI_.ordinal()].label, true); advancedOptions2.addLabel(" "); num_bootreps_ = advancedOptions2.addIntegerOption(nameAndLabels[OptionIndex.NUM_BOOTREPS_.ordinal()].name, nameAndLabels[OptionIndex.NUM_BOOTREPS_.ordinal()].label, 1000, 0, Integer.MAX_VALUE); addBuffer(advancedOptions2); advancedOptions2.endAlignHorizontally(); //advancedOptions2.beginAlignHorizontally(null, false); //num_bootreps_ = advancedOptions2.addIntegerOption(nameAndLabels[OptionIndex.NUM_BOOTREPS_.ordinal()].name, nameAndLabels[OptionIndex.NUM_BOOTREPS_.ordinal()].label, 1000, 1000, Integer.MAX_VALUE); //write_boottrees_ = advancedOptions2.addBooleanOption(nameAndLabels[OptionIndex.WRITE_BOOTTREES_.ordinal()].name, nameAndLabels[OptionIndex.WRITE_BOOTTREES_.ordinal()].label, false); //advancedOptions2.endAlignHorizontally(); advancedOptions2.beginAlignHorizontally(null, false); write_boottrees_ = advancedOptions2.addBooleanOption(nameAndLabels[OptionIndex.WRITE_BOOTTREES_.ordinal()].name, nameAndLabels[OptionIndex.WRITE_BOOTTREES_.ordinal()].label, false); advancedOptions2.addLabel(" "); write_boottrees1_ = advancedOptions2.addBooleanOption(nameAndLabels[OptionIndex.WRITE_BOOTTREES1_.ordinal()].name, nameAndLabels[OptionIndex.WRITE_BOOTTREES1_.ordinal()].label, false); advancedOptions2.addLabel(" "); max_iters_ = advancedOptions2.addIntegerOption(nameAndLabels[OptionIndex.MAX_ITERS_.ordinal()].name, nameAndLabels[OptionIndex.MAX_ITERS_.ordinal()].label, 1000, 0, Integer.MAX_VALUE); addBuffer(advancedOptions2); advancedOptions2.endAlignHorizontally(); advancedOptions2.beginAlignHorizontally(null, false); cc_ufboot_ = advancedOptions2.addDoubleOption(nameAndLabels[OptionIndex.CC_UFBOOT_.ordinal()].name, nameAndLabels[OptionIndex.CC_UFBOOT_.ordinal()].label, 0.99, 0.0, Double.MAX_VALUE); advancedOptions2.addLabel(" "); iter_interval_ = advancedOptions2.addIntegerOption(nameAndLabels[OptionIndex.ITER_INTERVAL_.ordinal()].name, nameAndLabels[OptionIndex.ITER_INTERVAL_.ordinal()].label, 100, 0, Integer.MAX_VALUE); addBuffer(advancedOptions2); advancedOptions2.endAlignHorizontally(); advancedOptions2.beginAlignHorizontally(null, false); specify_tiebreaker_ = advancedOptions2.addDoubleOption(nameAndLabels[OptionIndex.SPECIFY_TIEBREAKER_.ordinal()].name, nameAndLabels[OptionIndex.SPECIFY_TIEBREAKER_.ordinal()].label, 0.5, 0.00, Double.MAX_VALUE); advancedOptions2.addLabel(" "); final OptionValue[] part_resample_Choices = ComboBoxValueLabel.fillOptionValues(extraValues, ComboBoxValueLabel.IQTREE_GENE, ComboBoxValueLabel.IQTREE_GENESITE); part_resample_ = advancedOptions2.addComboBoxOption(nameAndLabels[OptionIndex.PART_RESAMPLE_.ordinal()].name, nameAndLabels[OptionIndex.PART_RESAMPLE_.ordinal()].label, part_resample_Choices, part_resample_Choices[0]); addBuffer(advancedOptions2); advancedOptions2.endAlignHorizontally(); addCipresDivider(advancedOptions2, "Symmetry Tests"); advancedOptions2.beginAlignHorizontally(null, false); use_symmtest_ = advancedOptions2.addBooleanOption(nameAndLabels[OptionIndex.USE_SYMMTEST_.ordinal()].name, nameAndLabels[OptionIndex.USE_SYMMTEST_.ordinal()].label, false); final OptionValue[] specify_symtest_Choices = ComboBoxValueLabel.fillOptionValues(ComboBoxValueLabel.IQTREE_SYMTEST, ComboBoxValueLabel.IQTREE_SYMTEST_KEEP_ZERO); specify_symtest_ = advancedOptions2.addComboBoxOption(nameAndLabels[OptionIndex.SPECIFY_SYMTEST_.ordinal()].name, nameAndLabels[OptionIndex.SPECIFY_SYMTEST_.ordinal()].label, specify_symtest_Choices, specify_symtest_Choices[0]); addBuffer(advancedOptions2); advancedOptions2.endAlignHorizontally(); advancedOptions2.beginAlignHorizontally(null, false); final OptionValue[] specify_symtype_Choices = ComboBoxValueLabel.fillOptionValues(ComboBoxValueLabel.IQTREE_SYMTYPE_PVAL, ComboBoxValueLabel.IQTREE_SYMTYPE_INT); specify_symtype_ = advancedOptions2.addComboBoxOption(nameAndLabels[OptionIndex.SPECIFY_SYMTYPE_.ordinal()].name, nameAndLabels[OptionIndex.SPECIFY_SYMTYPE_.ordinal()].label, specify_symtype_Choices, specify_symtype_Choices[0]); specify_pval_ = advancedOptions2.addDoubleOption(nameAndLabels[OptionIndex.SPECIFY_PVAL_.ordinal()].name, nameAndLabels[OptionIndex.SPECIFY_PVAL_.ordinal()].label, 0.05, 0.00000000000000000000001, 0.999); addBuffer(advancedOptions2); advancedOptions2.endAlignHorizontally(); addCipresDivider(advancedOptions2, "Single Branch Tests"); advancedOptions2.beginAlignHorizontally(null, false); sh_test_= advancedOptions2.addBooleanOption(nameAndLabels[OptionIndex.SH_TEST_.ordinal()].name, nameAndLabels[OptionIndex.SH_TEST_.ordinal()].label, false); //abayes_test_ = advancedOptions2.addBooleanOption(nameAndLabels[OptionIndex.ABAYES_TEST_.ordinal()].name, nameAndLabels[OptionIndex.ABAYES_TEST_.ordinal()].label, false); //advancedOptions2.endAlignHorizontally(); //advancedOptions2.beginAlignHorizontally(null, false); lbp_test_ = advancedOptions2.addBooleanOption(nameAndLabels[OptionIndex.LBP_TEST_.ordinal()].name, nameAndLabels[OptionIndex.LBP_TEST_.ordinal()].label, false); num_replicates_= advancedOptions2.addIntegerOption(nameAndLabels[OptionIndex.NUM_REPLICATES_.ordinal()].name, nameAndLabels[OptionIndex.NUM_REPLICATES_.ordinal()].label, 1000, 1000, Integer.MAX_VALUE); addBuffer(advancedOptions2); advancedOptions2.endAlignHorizontally(); advancedOptions2.beginAlignHorizontally(null, false); parametrical_test_= advancedOptions2.addBooleanOption(nameAndLabels[OptionIndex.PARAMETRICAL_TEST_.ordinal()].name, nameAndLabels[OptionIndex.PARAMETRICAL_TEST_.ordinal()].label, false); abayes_test_ = advancedOptions2.addBooleanOption(nameAndLabels[OptionIndex.ABAYES_TEST_.ordinal()].name, nameAndLabels[OptionIndex.ABAYES_TEST_.ordinal()].label, false); addBuffer(advancedOptions2); advancedOptions2.endAlignHorizontally(); addCipresDivider(advancedOptions2, "Ancestral State Reconstruction"); advancedOptions2.beginAlignHorizontally(null, false); write_ancestralseqs_ = advancedOptions2.addBooleanOption(nameAndLabels[OptionIndex.WRITE_ANCESTRALSEQS_.ordinal()].name, nameAndLabels[OptionIndex.WRITE_ANCESTRALSEQS_.ordinal()].label, false); specify_ancestralthresh_ = advancedOptions2.addStringOption(nameAndLabels[OptionIndex.SPECIFY_ANCESTRALTHRESH_.ordinal()].name, nameAndLabels[OptionIndex.SPECIFY_ANCESTRALTHRESH_.ordinal()].label, ""); advancedOptions2.endAlignHorizontally(); advancedOptions2.beginAlignHorizontally(null, false); FileChooser fcSpecifyAncestralTree = createFileChooser(advancedOptions2, nameAndLabels[OptionIndex.SPECIFY_ANCESTRALTREE_FILE_.ordinal()].name, nameAndLabels[OptionIndex.SPECIFY_ANCESTRALTREE_FILE_.ordinal()].label, true); specify_ancestraltree_file_ = fcSpecifyAncestralTree.selectedFile; specify_ancestraltree_file_Browse = fcSpecifyAncestralTree.selectedFileBrowse; advancedOptions2.endAlignHorizontally(); advancedOptions3 = this.addChildOptions("advancedOptions3", "Advanced Parameters (P3) ", ""); addCipresDivider(advancedOptions3, "Tree Topology Tests"); advancedOptions3.beginAlignHorizontally(null, false); FileChooser fc9 = createFileChooser(advancedOptions3, nameAndLabels[OptionIndex.SPECIFY_TREEFILE_.ordinal()].name, nameAndLabels[OptionIndex.SPECIFY_TREEFILE_.ordinal()].label, true); specify_treefile_ = fc9.selectedFile; specify_treefile_Browse = fc9.selectedFileBrowse; num_rell_ = advancedOptions3.addIntegerOption(nameAndLabels[OptionIndex.NUM_RELL_.ordinal()].name, nameAndLabels[OptionIndex.NUM_RELL_.ordinal()].label, 0, 0, Integer.MAX_VALUE); advancedOptions3.endAlignHorizontally(); advancedOptions3.beginAlignHorizontally(null, false); weighted_tests_ = advancedOptions3.addBooleanOption(nameAndLabels[OptionIndex.WEIGHTED_TESTS_.ordinal()].name, nameAndLabels[OptionIndex.WEIGHTED_TESTS_.ordinal()].label, false); unbiased_test_ = advancedOptions3.addBooleanOption(nameAndLabels[OptionIndex.UNBIASED_TEST_.ordinal()].name, nameAndLabels[OptionIndex.UNBIASED_TEST_.ordinal()].label, false); estimate_parsetreeonly_ = advancedOptions3.addBooleanOption(nameAndLabels[OptionIndex.ESTIMATE_PARSETREEONLY_.ordinal()].name, nameAndLabels[OptionIndex.ESTIMATE_PARSETREEONLY_.ordinal()].label, false); addBuffer(advancedOptions3); advancedOptions3.endAlignHorizontally(); advancedOptions3.beginAlignHorizontally(null, false); FileChooser fc10 = createFileChooser(advancedOptions3, nameAndLabels[OptionIndex.FIXED_USERTREE_FILE.ordinal()].name, nameAndLabels[OptionIndex.FIXED_USERTREE_FILE.ordinal()].label, true); fixed_usertree_file = fc10.selectedFile; fixed_usertree_file_Browse = fc10.selectedFileBrowse; advancedOptions3.endAlignHorizontally(); //advancedOptions3 = this.addChildOptions("advancedOptions3", "Advanced Parameters (P3) ", ""); addCipresDivider(advancedOptions3, "Consesnsus Trees"); advancedOptions3.beginAlignHorizontally(null, false); FileChooser fc11 = createFileChooser(advancedOptions3, nameAndLabels[OptionIndex.TREE_FILE1_.ordinal()].name, nameAndLabels[OptionIndex.TREE_FILE1_.ordinal()].label, true); tree_file1_ = fc11.selectedFile; tree_file1_Browse = fc11.selectedFileBrowse; compute_consensustree_ = advancedOptions3.addBooleanOption(nameAndLabels[OptionIndex.COMPUTE_CONSENSUSTREE_.ordinal()].name, nameAndLabels[OptionIndex.COMPUTE_CONSENSUSTREE_.ordinal()].label, false); advancedOptions3.endAlignHorizontally(); advancedOptions3.beginAlignHorizontally(null, false); compute_consensusnetwork_ = advancedOptions3.addBooleanOption(nameAndLabels[OptionIndex.COMPUTE_CONSENSUSNETWORK_.ordinal()].name, nameAndLabels[OptionIndex.COMPUTE_CONSENSUSNETWORK_.ordinal()].label, false); min_threshold_ = advancedOptions3.addDoubleOption(nameAndLabels[OptionIndex.MIN_THRESHOLD_.ordinal()].name, nameAndLabels[OptionIndex.MIN_THRESHOLD_.ordinal()].label, 0.0, 0.0, 1.0); advancedOptions3.addLabel(" "); burnin_value_ = advancedOptions3.addDoubleOption(nameAndLabels[OptionIndex.BURNIN_VALUE_.ordinal()].name, nameAndLabels[OptionIndex.BURNIN_VALUE_.ordinal()].label, 0.0, 0.0, Double.MAX_VALUE); addBuffer(advancedOptions3); advancedOptions3.endAlignHorizontally(); advancedOptions3.beginAlignHorizontally(null, false); FileChooser fc12 = createFileChooser(advancedOptions3, nameAndLabels[OptionIndex.TARGET_TREEFILE_.ordinal()].name, nameAndLabels[OptionIndex.TARGET_TREEFILE_.ordinal()].label, true); target_treefile_ = fc12.selectedFile; target_treefile_Browse = fc12.selectedFileBrowse; set_scalefactor_ = advancedOptions3.addStringOption(nameAndLabels[OptionIndex.SET_SCALEFACTOR_.ordinal()].name, nameAndLabels[OptionIndex.SET_SCALEFACTOR_.ordinal()].label, ""); advancedOptions3.endAlignHorizontally(); advancedOptions3.beginAlignHorizontally(null, false); set_precision_ = advancedOptions3.addStringOption(nameAndLabels[OptionIndex.SET_PRECISION_.ordinal()].name, nameAndLabels[OptionIndex.SET_PRECISION_.ordinal()].label, ""); nodetarget_treefile_ = advancedOptions3.addStringOption(nameAndLabels[OptionIndex.NODETARGET_TREEFILE_.ordinal()].name, nameAndLabels[OptionIndex.NODETARGET_TREEFILE_.ordinal()].label, ""); advancedOptions3.endAlignHorizontally(); addCipresDivider(advancedOptions3, "Computing Robinson's Foulds distances"); advancedOptions3.beginAlignHorizontally(null, false); FileChooser fc13 = createFileChooser(advancedOptions3, nameAndLabels[OptionIndex.TREE_FILE2_.ordinal()].name, nameAndLabels[OptionIndex.TREE_FILE2_.ordinal()].label, true); tree_file2_ = fc13.selectedFile; tree_file2_Browse = fc13.selectedFileBrowse; advancedOptions3.endAlignHorizontally(); advancedOptions3.beginAlignHorizontally(null, false); compute_rfdistances_all_ = advancedOptions3.addBooleanOption(nameAndLabels[OptionIndex.COMPUTE_RFDISTANCES_ALL_.ordinal()].name, nameAndLabels[OptionIndex.COMPUTE_RFDISTANCES_ALL_.ordinal()].label, false); compute_rfdistances_adj_ = advancedOptions3.addBooleanOption(nameAndLabels[OptionIndex.COMPUTE_RFDISTANCES_ADJ_.ordinal()].name, nameAndLabels[OptionIndex.COMPUTE_RFDISTANCES_ADJ_.ordinal()].label, false); addBuffer(advancedOptions3); advancedOptions3.endAlignHorizontally(); advancedOptions3.beginAlignHorizontally(null, false); FileChooser specify_rfdistancestree_file_fc = createFileChooser(advancedOptions3, nameAndLabels[OptionIndex.SPECIFY_RFDISTANCESTREE_FILE_.ordinal()].name, nameAndLabels[OptionIndex.SPECIFY_RFDISTANCESTREE_FILE_.ordinal()].label, true); specify_rfdistancestree_file_ = specify_rfdistancestree_file_fc.selectedFile; specify_rfdistancestree_file_Browse = specify_rfdistancestree_file_fc.selectedFileBrowse; advancedOptions3.endAlignHorizontally(); addCipresDivider(advancedOptions3, "Generate Random Trees Only (then quit)"); advancedOptions3.beginAlignHorizontally(null, false); //generate_randomtrees_ = advancedOptions3.addBooleanOption(nameAndLabels[OptionIndex.GENERATE_RANDOMTREES_.ordinal()].name, nameAndLabels[OptionIndex.GENERATE_RANDOMTREES_.ordinal()].label, false); num_taxa_ = advancedOptions3.addStringOption(nameAndLabels[OptionIndex.NUM_TAXA_.ordinal()].name, nameAndLabels[OptionIndex.NUM_TAXA_.ordinal()].label, ""); advancedOptions3.addLabel(" "); final OptionValue[] choose_randomtype_Choices = ComboBoxValueLabel.fillOptionValues(ComboBoxValueLabel.IQTREE_none, ComboBoxValueLabel.IQTREE_rcsg); choose_randomtype_ = advancedOptions3.addComboBoxOption(nameAndLabels[OptionIndex.CHOOSE_RANDOMTYPE_.ordinal()].name, nameAndLabels[OptionIndex.CHOOSE_RANDOMTYPE_.ordinal()].label, choose_randomtype_Choices, choose_randomtype_Choices[0]); //advancedOptions3.addLabel(" "); addBuffer(advancedOptions3); advancedOptions3.endAlignHorizontally(); advancedOptions3.beginAlignHorizontally(null, false); specify_brlengths_ = advancedOptions3.addStringOption(nameAndLabels[OptionIndex.SPECIFY_BRLENGTHS_.ordinal()].name, nameAndLabels[OptionIndex.SPECIFY_BRLENGTHS_.ordinal()].label, ""); specify_treefilename_ = advancedOptions3.addStringOption(nameAndLabels[OptionIndex.SPECIFY_TREEFILENAME_.ordinal()].name, nameAndLabels[OptionIndex.SPECIFY_TREEFILENAME_.ordinal()].label, ""); addBuffer(advancedOptions3); advancedOptions3.endAlignHorizontally(); advancedOptions4 = this.addChildOptions("advancedOptions4", "Advanced Parameters (P4) ", ""); addCipresDivider(advancedOptions4, "Concordance Factor Options"); advancedOptions4.beginAlignHorizontally(null, false); //FileChooser partition_modelfile_file_fc = createFileChooser(advancedOptions4, nameAndLabels[OptionIndex.PARTITION_MODELFILE_FILE_.ordinal()].name, nameAndLabels[OptionIndex.PARTITION_MODELFILE_FILE_.ordinal()].label, true); //partition_modelfile_file_ = partition_modelfile_file_fc.selectedFile; //partition_modelfile_file_Browse = partition_modelfile_file_fc.selectedFileBrowse; FileChooser partition_modelfile2_file_fc = createFileChooser(advancedOptions4, nameAndLabels[OptionIndex.PARTITION_MODELFILE2_FILE_.ordinal()].name, nameAndLabels[OptionIndex.PARTITION_MODELFILE2_FILE_.ordinal()].label, true); partition_modelfile2_file_ = partition_modelfile2_file_fc.selectedFile; partition_modelfile2_file_Browse = partition_modelfile2_file_fc.selectedFileBrowse; advancedOptions4.endAlignHorizontally(); advancedOptions4.beginAlignHorizontally(null, false); FileChooser partition_tfile_file_fc = createFileChooser(advancedOptions4, nameAndLabels[OptionIndex.PARTITION_TFILE_FILE_.ordinal()].name, nameAndLabels[OptionIndex.PARTITION_TFILE_FILE_.ordinal()].label, true); partition_tfile_file_ = partition_tfile_file_fc.selectedFile; partition_tfile_file_Browse = partition_tfile_file_fc.selectedFileBrowse; FileChooser setoftrees_file_file_fc = createFileChooser(advancedOptions4, nameAndLabels[OptionIndex.SETOFTREES_FILE_FILE_.ordinal()].name, nameAndLabels[OptionIndex.SETOFTREES_FILE_FILE_.ordinal()].label, true); setoftrees_file_file_ = setoftrees_file_file_fc.selectedFile; setoftrees_file_file_Browse = setoftrees_file_file_fc.selectedFileBrowse; advancedOptions4.endAlignHorizontally(); advancedOptions4.beginAlignHorizontally(null, false); specify_numquartets_ = advancedOptions4.addIntegerOption(nameAndLabels[OptionIndex.SPECIFY_NUMQUARTETS_.ordinal()].name, nameAndLabels[OptionIndex.SPECIFY_NUMQUARTETS_.ordinal()].label, 0, 0, Integer.MAX_VALUE); //name_outfiles_ = advancedOptions4.addStringOption(nameAndLabels[OptionIndex.NAME_OUTFILES_.ordinal()].name, nameAndLabels[OptionIndex.NAME_OUTFILES_.ordinal()].label, ""); //name_outfiles_.setHidden(true); addBuffer(advancedOptions4); advancedOptions4.endAlignHorizontally(); addCipresDivider(advancedOptions4, "Dating Options"); advancedOptions4.beginAlignHorizontally(null, false); FileChooser specify_datefile_file_fc = createFileChooser(advancedOptions4, nameAndLabels[OptionIndex.SPECIFY_DATEFILE_FILE_.ordinal()].name, nameAndLabels[OptionIndex.SPECIFY_DATEFILE_FILE_.ordinal()].label, true); specify_datefile_file_ = specify_datefile_file_fc.selectedFile; specify_datefile_file_Browse = specify_datefile_file_fc.selectedFileBrowse; extract_datefile_ = advancedOptions4.addBooleanOption(nameAndLabels[OptionIndex.EXTRACT_DATEFILE_.ordinal()].name, nameAndLabels[OptionIndex.EXTRACT_DATEFILE_.ordinal()].label, false); advancedOptions4.endAlignHorizontally(); advancedOptions4.beginAlignHorizontally(null, false); specify_datetip_ = advancedOptions4.addStringOption(nameAndLabels[OptionIndex.SPECIFY_DATETIP_.ordinal()].name, nameAndLabels[OptionIndex.SPECIFY_DATETIP_.ordinal()].label, ""); specify_rootdate_ = advancedOptions4.addStringOption(nameAndLabels[OptionIndex.SPECIFY_ROOTDATE_.ordinal()].name, nameAndLabels[OptionIndex.SPECIFY_ROOTDATE_.ordinal()].label, ""); advancedOptions4.endAlignHorizontally(); advancedOptions4.beginAlignHorizontally(null, false); FileChooser specify_datetreefile_file_fc = createFileChooser(advancedOptions4, nameAndLabels[OptionIndex.SPECIFY_DATETREEFILE_FILE_.ordinal()].name, nameAndLabels[OptionIndex.SPECIFY_DATETREEFILE_FILE_.ordinal()].label, true); specify_datetreefile_file_ = specify_datetreefile_file_fc.selectedFile; specify_datetreefile_file_Browse = specify_datetreefile_file_fc.selectedFileBrowse; specify_resampleint_ = advancedOptions4.addIntegerOption(nameAndLabels[OptionIndex.SPECIFY_RESAMPLEINT_.ordinal()].name, nameAndLabels[OptionIndex.SPECIFY_RESAMPLEINT_.ordinal()].label, 0, 0, Integer.MAX_VALUE); //specify_resampleint_ = advancedOptions4.addStringOption(nameAndLabels[OptionIndex.SPECIFY_RESAMPLEINT_.ordinal()].name, nameAndLabels[OptionIndex.SPECIFY_RESAMPLEINT_.ordinal()].label, "100"); //specify_outlierthresh_ = advancedOptions4.addDoubleOption(nameAndLabels[OptionIndex.SPECIFY_OUTLIERTHRESH_.ordinal()].name, nameAndLabels[OptionIndex.SPECIFY_OUTLIERTHRESH_.ordinal()].label, 0.5, 0.05, 168.00); advancedOptions4.endAlignHorizontally(); advancedOptions4.beginAlignHorizontally(null, false); specify_outlierthresh_ = advancedOptions4.addStringOption(nameAndLabels[OptionIndex.SPECIFY_OUTLIERTHRESH_.ordinal()].name, nameAndLabels[OptionIndex.SPECIFY_OUTLIERTHRESH_.ordinal()].label, ""); advancedOptions4.endAlignHorizontally(); addCipresDivider(advancedOptions4, "Miscellaneous Options"); advancedOptions4.beginAlignHorizontally(null, false); print_sitestats_ = advancedOptions4.addBooleanOption(nameAndLabels[OptionIndex.PRINT_STTESTATS_.ordinal()].name, nameAndLabels[OptionIndex.PRINT_STTESTATS_.ordinal()].label, false); fix_branchlengths_ = advancedOptions4.addBooleanOption(nameAndLabels[OptionIndex.FIX_BRANCHLENGTHS.ordinal()].name, nameAndLabels[OptionIndex.FIX_BRANCHLENGTHS.ordinal()].label, false); FileChooser branchlengths_tree_file_fc = createFileChooser(advancedOptions4, nameAndLabels[OptionIndex.BRANCHLENGTHS_TREE_FILE_.ordinal()].name, nameAndLabels[OptionIndex.BRANCHLENGTHS_TREE_FILE_.ordinal()].label, true); branchlengths_tree_file_ = branchlengths_tree_file_fc.selectedFile; branchlengths_tree_file_Browse = branchlengths_tree_file_fc.selectedFileBrowse; advancedOptions4.endAlignHorizontally(); advancedOptions4.beginAlignHorizontally(null, false); specify_minbranchlength_ = advancedOptions4.addStringOption(nameAndLabels[OptionIndex.SPECIFY_MINBRANCHLENGTH_.ordinal()].name, nameAndLabels[OptionIndex.SPECIFY_MINBRANCHLENGTH_.ordinal()].label, ""); specify_maxbranchlength_ = advancedOptions4.addStringOption(nameAndLabels[OptionIndex.SPECIFY_MAXBRANCHLENGTH_.ordinal()].name, nameAndLabels[OptionIndex.SPECIFY_MAXBRANCHLENGTH_.ordinal()].label, ""); advancedOptions4.endAlignHorizontally(); advancedOptions4.beginAlignHorizontally(null, false); write_locally_optimal_ = advancedOptions4.addBooleanOption(nameAndLabels[OptionIndex.WRITE_LOCALLY_OPTIMAL_.ordinal()].name, nameAndLabels[OptionIndex.WRITE_LOCALLY_OPTIMAL_.ordinal()].label, false); fix_brlengths_ = advancedOptions4.addBooleanOption(nameAndLabels[OptionIndex.FIX_BRLENGTHS_.ordinal()].name, nameAndLabels[OptionIndex.FIX_BRLENGTHS_.ordinal()].label, false); per_sitefile_ = advancedOptions4.addBooleanOption(nameAndLabels[OptionIndex.PER_SITEFILE_.ordinal()].name, nameAndLabels[OptionIndex.PER_SITEFILE_.ordinal()].label, false); addBuffer(advancedOptions4); advancedOptions4.endAlignHorizontally(); //advancedOptions4.beginAlignHorizontally(null, false); //per_sitefile_ = advancedOptions4.addBooleanOption(nameAndLabels[OptionIndex.PER_SITEFILE_.ordinal()].name, nameAndLabels[OptionIndex.PER_SITEFILE_.ordinal()].label, false); //per_sitewslfile_ = advancedOptions4.addBooleanOption(nameAndLabels[OptionIndex.PER_SITEWSLFILE_.ordinal()].name, nameAndLabels[OptionIndex.PER_SITEWSLFILE_.ordinal()].label, false); //advancedOptions4.endAlignHorizontally(); advancedOptions4.beginAlignHorizontally(null, false); per_sitewslfile_ = advancedOptions4.addBooleanOption(nameAndLabels[OptionIndex.PER_SITEWSLFILE_.ordinal()].name, nameAndLabels[OptionIndex.PER_SITEWSLFILE_.ordinal()].label, false); //per_sitewslmrfile_ = advancedOptions4.addBooleanOption(nameAndLabels[OptionIndex.PER_SITEWSMRLFILE_.ordinal()].name, nameAndLabels[OptionIndex.PER_SITEWSLMRFILE_.ordinal()].label, false); per_sitewslrfile_ = advancedOptions4.addBooleanOption(nameAndLabels[OptionIndex.PER_SITEWSLRFILE_.ordinal()].name, nameAndLabels[OptionIndex.PER_SITEWSLRFILE_.ordinal()].label, false); per_sitewslmfile_ = advancedOptions4.addBooleanOption(nameAndLabels[OptionIndex.PER_SITEWSLMFILE_.ordinal()].name, nameAndLabels[OptionIndex.PER_SITEWSLMFILE_.ordinal()].label, false); addBuffer(advancedOptions4); advancedOptions4.endAlignHorizontally(); advancedOptions4.beginAlignHorizontally(null, false); per_sitewslmrfile_ = advancedOptions4.addBooleanOption(nameAndLabels[OptionIndex.PER_SITEWSLMRFILE_.ordinal()].name, nameAndLabels[OptionIndex.PER_SITEWSLMRFILE_.ordinal()].label, false); per_sitewspmfile_ = advancedOptions4.addBooleanOption(nameAndLabels[OptionIndex.PER_SITEWSPMFILE_.ordinal()].name, nameAndLabels[OptionIndex.PER_SITEWSPMFILE_.ordinal()].label, false); per_sitewsprfile_ = advancedOptions4.addBooleanOption(nameAndLabels[OptionIndex.PER_SITEWSPRFILE_.ordinal()].name, nameAndLabels[OptionIndex.PER_SITEWSPRFILE_.ordinal()].label, false); addBuffer(advancedOptions4); advancedOptions4.endAlignHorizontally(); //per_sitewspmrfile_ = advancedOptions4.addBooleanOption(nameAndLabels[OptionIndex.PER_SITEWSPMRFILE_.ordinal()].name, nameAndLabels[OptionIndex.PER_SITEWSPMRFILE_.ordinal()].label, false); //addBuffer(advancedOptions4); //advancedOptions4.endAlignHorizontally(); //advancedOptions4.beginAlignHorizontally(null, false); //per_sitewspmrfile_ = advancedOptions4.addBooleanOption(nameAndLabels[OptionIndex.PER_SITEWSPMRFILE_.ordinal()].name, nameAndLabels[OptionIndex.PER_SITEWSPMRFILE_.ordinal()].label, false); //per_sitewplfile_ = advancedOptions4.addBooleanOption(nameAndLabels[OptionIndex.PER_SITEWPLFILE_.ordinal()].name, nameAndLabels[OptionIndex.PER_SITEWPLFILE_.ordinal()].label, false); //advancedOptions4.endAlignHorizontally(); advancedOptions4.beginAlignHorizontally(null, false); per_sitewspmrfile_ = advancedOptions4.addBooleanOption(nameAndLabels[OptionIndex.PER_SITEWSPMRFILE_.ordinal()].name, nameAndLabels[OptionIndex.PER_SITEWSPMRFILE_.ordinal()].label, false); per_sitewplfile_ = advancedOptions4.addBooleanOption(nameAndLabels[OptionIndex.PER_SITEWPLFILE_.ordinal()].name, nameAndLabels[OptionIndex.PER_SITEWPLFILE_.ordinal()].label, false); write_sitelikelihoods_ = advancedOptions4.addBooleanOption(nameAndLabels[OptionIndex.WRITE_SITELIKELIHOODS_.ordinal()].name, nameAndLabels[OptionIndex.WRITE_SITELIKELIHOODS_.ordinal()].label, false); //write_loglikelihoods_ = advancedOptions4.addBooleanOption(nameAndLabels[OptionIndex.WRITE_LOGLIKELIHOODS_.ordinal()].name, nameAndLabels[OptionIndex.WRITE_LOGLIKELIHOODS_.ordinal()].label, false); addBuffer(advancedOptions4); advancedOptions4.endAlignHorizontally(); advancedOptions4.beginAlignHorizontally(null, false); write_loglikelihoods_ = advancedOptions4.addBooleanOption(nameAndLabels[OptionIndex.WRITE_LOGLIKELIHOODS_.ordinal()].name, nameAndLabels[OptionIndex.WRITE_LOGLIKELIHOODS_.ordinal()].label, false); FileChooser fc14 = createFileChooser(advancedOptions4, nameAndLabels[OptionIndex.LIST_CSINTEGERS_FILE.ordinal()].name, nameAndLabels[OptionIndex.LIST_CSINTEGERS_FILE.ordinal()].label, true); list_csintegers_file = fc14.selectedFile; list_csintegers_file_Browse = fc14.selectedFileBrowse; advancedOptions4.endAlignHorizontally(); /*Add tab***********************************/ Options.Option parameterChooser = addChildOptionsPageChooser("parameterChooser", "Parameters", null, Options.PageChooserType.BUTTONS, true); addLabel(" "); beginAlignHorizontally(null, false); addLabel(OPTION_NAME); endAlignHorizontally(); setInitialEnabledState(); noSavedValues(); setDescription(); buildRelationshipAmongOptions(); parameterChooser.setShouldSaveValue(false); } private void setInitialEnabledState() { more_memory_.setEnabled(false); more_memory2_.setEnabled(false); codon_type_.setEnabled(false); nt2aa_type_.setEnabled(false); num_mixedsequences_.setEnabled(false); datatype2_file_.setEnabled(false); datatype3_file_.setEnabled(false); datatype4_file_.setEnabled(false); datatype5_file_.setEnabled(false); specify_aamodels_.setEnabled(false); freetextmodel_.setEnabled(false); specify_dnamodel_.setEnabled(false); specify_protmodel_.setEnabled(false); specify_protmixture_.setEnabled(false); guide_tree_file.setEnabled(false); guide_tree_file_Browse.setEnabled(false); frequency_file_file.setEnabled(false); frequency_file_file_Browse.setEnabled(false); max_posteriormode_.setEnabled(false); specify_binmodel_.setEnabled(false); specify_codonmodel_.setEnabled(false); specify_modelfreq_.setEnabled(false); specify_modelrate_.setEnabled(false); asc_bias_.setEnabled(false); gamma_shape_.setEnabled(false); median_approximation_.setEnabled(false); invariable_sites_.setEnabled(false); thorough_estimation_.setEnabled(false); num_parstrees_.setEnabled(false); num_topparstrees_.setEnabled(false); num_besttrees_.setEnabled(false); num_unsucctostop_.setEnabled(false); num_tostop_.setEnabled(false); specify_radius_.setEnabled(false); perturb_strength_.setEnabled(false); slower_NNI_.setEnabled(false); no_mlpairwise_.setEnabled(false); use_fasttreesearch_.setEnabled(false); constraint_file_.setEnabled(false); constraint_file_Browse.setEnabled(false); num_replicates_.setEnabled(false); weighted_tests_.setEnabled(false); unbiased_test_.setEnabled(true); estimate_parsetreeonly_.setEnabled(false); compute_consensustree_.setEnabled(false); compute_consensusnetwork_.setEnabled(false); min_threshold_.setEnabled(false); burnin_value_.setEnabled(false); compute_rfdistances_all_.setEnabled(false); compute_rfdistances_adj_.setEnabled(false); fix_brlengths_.setEnabled(false); per_sitefile_.setEnabled(false); per_sitewslfile_.setEnabled(false); per_sitewslmrfile_.setEnabled(false); per_sitewslrfile_.setEnabled(false); per_sitewslmfile_.setEnabled(false); per_sitewspmfile_.setEnabled(false); per_sitewsprfile_.setEnabled(false); per_sitewspmrfile_.setEnabled(false); per_sitewplfile_.setEnabled(false); //specify_rcluster_.setEnabled(false); specify_basemodels_.setEnabled(false); specify_freqtypes_.setEnabled(false); specify_ratehettypes_.setEnabled(false); specify_mincat_.setEnabled(false); specify_maxcat_.setEnabled(false); specify_merit_.setEnabled(false); specify_fulltreesearch_.setEnabled(false); specify_addlmodels_.setEnabled(false); bootstrap_type_.setEnabled(false); partition_modelfile2_file_.setEnabled(true); partition_tfile_file_.setEnabled(true); setoftrees_file_file_.setEnabled(true); specify_numquartets_.setEnabled(true); specify_datefile_file_.setEnabled(true); extract_datefile_.setEnabled(true); specify_datetip_.setEnabled(true); specify_rootdate_.setEnabled(true); specify_datetreefile_file_.setEnabled(true); specify_resampleint_.setEnabled(true); specify_outlierthresh_.setEnabled(true); } private void noSavedValues() { starting_tree_File.setShouldSaveValue(false); partition_file_.setShouldSaveValue(false); datatype2_file_.setShouldSaveValue(false); datatype3_file_.setShouldSaveValue(false); datatype4_file_.setShouldSaveValue(false); datatype5_file_.setShouldSaveValue(false); guide_tree_file.setShouldSaveValue(false); frequency_file_file.setShouldSaveValue(false); constraint_file_.setShouldSaveValue(false); specify_treefile_.setShouldSaveValue(false); fixed_usertree_file.setShouldSaveValue(false); tree_file1_.setShouldSaveValue(false); target_treefile_.setShouldSaveValue(false); tree_file2_.setShouldSaveValue(false); list_csintegers_file.setShouldSaveValue(false); //partition_modelfile_file_.setShouldSaveValue(false); partition_modelfile2_file_.setShouldSaveValue(false); partition_tfile_file_.setShouldSaveValue(false); setoftrees_file_file_.setShouldSaveValue(false); specify_datefile_file_.setShouldSaveValue(false); specify_datetreefile_file_.setShouldSaveValue(false); branchlengths_tree_file_.setShouldSaveValue(false); list_csintegers_file.setShouldSaveValue(false); invariable_sites_.setShouldSaveValue(false); num_tostop_.setShouldSaveValue(false); specify_resampleint_.setShouldSaveValue(false); specify_mincat_.setShouldSaveValue(false); specify_maxcat_.setShouldSaveValue(false); num_topparstrees_.setShouldSaveValue(false); max_iters_.setShouldSaveValue(false); cc_ufboot_.setShouldSaveValue(false); iter_interval_.setShouldSaveValue(false); specify_tiebreaker_.setShouldSaveValue(false); } private void setDescription() { for (OptionIndex index : OptionIndex.values()) { Option opt = simpleOptions.getOption(nameAndLabels[index.ordinal()].name); if (opt == null) opt = advancedOptions.getOption(nameAndLabels[index.ordinal()].name); if (opt == null) opt = advancedOptions2.getOption(nameAndLabels[index.ordinal()].name); if (opt == null) opt = advancedOptions3.getOption(nameAndLabels[index.ordinal()].name); if (opt == null) opt = advancedOptions4.getOption(nameAndLabels[index.ordinal()].name); if (opt == null || nameAndLabels[index.ordinal()].description == null || nameAndLabels[index.ordinal()].description.isBlank()) continue; opt.setDescription(nameAndLabels[index.ordinal()].description); } } private void buildRelationshipAmongOptions() { SimpleListener sl = new SimpleListener() { @Override public void objectChanged() { doubleCheckRelationship(); doubleCheckRelationship(); } }; specify_runtype_.addChangeListener(sl); specify_numpatterns_.addChangeListener(sl); mixed_sequence_.addChangeListener(sl); sequence_type_.addChangeListener(sl); partition_type_.addChangeListener(sl); mixed_sequence_.addChangeListener(sl); num_mixedsequences_.addChangeListener(sl); starting_tree_File.addChangeListener(sl); specify_protmodel_.addChangeListener(sl); bootstrap_type_.addChangeListener(sl); specify_symtest_.addChangeListener(sl); use_symmtest_.addChangeListener(sl); sh_test_.addChangeListener(sl); parametrical_test_.addChangeListener(sl); abayes_test_.addChangeListener(sl); lbp_test_.addChangeListener(sl); num_rell_.addChangeListener(sl); tree_file1_.addChangeListener(sl); fixed_usertree_file.addChangeListener(sl); freetextmodel_.addChangeListener(sl); specify_model_.addChangeListener(sl); target_treefile_.addChangeListener(sl); partition_file_.addChangeListener(sl); //generate_randomtrees_.addChangeListener(sl); select_rcluster_.addChangeListener(sl); specify_quartetnum_.addChangeListener(sl); specify_quartets_.addChangeListener(sl); write_quartets_.addChangeListener(sl); partition_modelfile2_file_.addChangeListener(sl); partition_tfile_file_.addChangeListener(sl); setoftrees_file_file_.addChangeListener(sl); specify_numquartets_.addChangeListener(sl); specify_datefile_file_.addChangeListener(sl); extract_datefile_.addChangeListener(sl); specify_datetip_.addChangeListener(sl); specify_rootdate_.addChangeListener(sl); specify_datetreefile_file_.addChangeListener(sl); specify_resampleint_.addChangeListener(sl); specify_outlierthresh_.addChangeListener(sl); more_memory_.addChangeListener(sl); more_memory2_.addChangeListener(sl); doubleCheckRelationship(); } private void doubleCheckRelationship() { String runType1 = ComboBoxValueLabel.IQTREE_RUNTYPE_MODEL.getValue(); String runType2 = ComboBoxValueLabel.IQTREE_RUNTYPE_INFERENCE.getValue(); String specify_runtype_Value = getValueAsString(OptionIndex.SPECIFY_RUNTYPE_); String specify_numpatterns_Value = getValueAsString(OptionIndex.SPECIFY_NUMPATTERNS_); String sequence_type_Value = getValueAsString(OptionIndex.SEQUENCE_TYPE_); //if (specify_runtype_Value != null && specify_runtype_Value.equals(runType2) && specify_numpatterns_Value != null && specify_numpatterns_Value.strip().equals("1")) if (sequence_type_Value != null && !sequence_type_Value.equals(ComboBoxValueLabel.IQTREE_SEQUENCE_TYPE_AMINO.getValue())) { more_memory_.setEnabled(true); more_memory2_.setEnabled(true); } else { more_memory_.setEnabled(false); more_memory2_.setEnabled(false); } if (specify_runtype_Value != null && specify_runtype_Value.equals(runType2)) bootstrap_type_.setEnabled(true); else bootstrap_type_.setEnabled(false); /* if (specify_numpatterns_Value != null) { partition_type_.setEnabled(Integer.parseInt(specify_numpatterns_Value) > 1); }*/ if (specify_runtype_Value != null && specify_runtype_Value.equals(runType1)) { //specify_autocores_.setEnabled(true); setFileSelectorEnabled(OptionIndex.SPECIFY_NEXUSMODELFILE_FILE_, true); } else { //specify_autocores_.setEnabled(false); setFileSelectorEnabled(OptionIndex.SPECIFY_NEXUSMODELFILE_FILE_, false); } //String sequence_type_Value = getValueAsString(OptionIndex.SEQUENCE_TYPE_); if (sequence_type_Value != null && sequence_type_Value.equals(ComboBoxValueLabel.IQTREE_SEQUENCE_TYPE_CODON.getValue())) codon_type_.setEnabled(true); else codon_type_.setEnabled(false); if (sequence_type_Value != null && sequence_type_Value.equals(ComboBoxValueLabel.IQTREE_SEQUENCE_TYPE_NT2AA.getValue())) nt2aa_type_.setEnabled(true); else nt2aa_type_.setEnabled(false); String partition_type_Value = getValueAsString(OptionIndex.PARTITION_TYPE_); if (partition_type_Value != null && !partition_type_Value.isBlank()) { //setFileSelectorEnabled(OptionIndex.PARTITION_FILE_,true); mixed_sequence_.setEnabled(true); //part_resample_.setEnabled(true); } else { //setFileSelectorEnabled(OptionIndex.PARTITION_FILE_,false); mixed_sequence_.setEnabled(false); //part_resample_.setEnabled(false); } String partition_file_Value = getValueAsString(OptionIndex.PARTITION_FILE_); if (partition_file_Value != null && !partition_file_Value.isBlank()) { //more_memory_.setEnabled(true); partition_type_.setEnabled(true); part_resample_.setEnabled(true); } else { //more_memory_.setEnabled(false); partition_type_.setEnabled(false); part_resample_.setEnabled(false); } Boolean mixed_sequence_Value = getValueAsBoolean(OptionIndex.MIXED_SEQUENCE_); sequence_type_.setEnabled(!mixed_sequence_Value); num_mixedsequences_.setEnabled(mixed_sequence_Value); String num_mixedsequences_Value = getValueAsString(OptionIndex.NUM_MIXEDSEQUENCES_); if (num_mixedsequences_Value != null && !num_mixedsequences_Value.isBlank()) { try { int num_mixedsequences = Integer.parseInt(num_mixedsequences_Value); setFileSelectorEnabled(OptionIndex.DATATYPE2_FILE_, num_mixedsequences > 1); setFileSelectorEnabled(OptionIndex.DATATYPE3_FILE_, num_mixedsequences > 2); setFileSelectorEnabled(OptionIndex.DATATYPE4_FILE_, num_mixedsequences > 3); setFileSelectorEnabled(OptionIndex.DATATYPE5_FILE_, num_mixedsequences > 4); } catch (NumberFormatException nfe) { setFileSelectorEnabled(OptionIndex.DATATYPE2_FILE_, false); setFileSelectorEnabled(OptionIndex.DATATYPE3_FILE_, false); setFileSelectorEnabled(OptionIndex.DATATYPE4_FILE_, false); setFileSelectorEnabled(OptionIndex.DATATYPE5_FILE_, false); } } else { setFileSelectorEnabled(OptionIndex.DATATYPE2_FILE_, false); setFileSelectorEnabled(OptionIndex.DATATYPE3_FILE_, false); setFileSelectorEnabled(OptionIndex.DATATYPE4_FILE_, false); setFileSelectorEnabled(OptionIndex.DATATYPE5_FILE_, false); } String starting_tree_File_Value = getValueAsString(OptionIndex.STARTING_TREE_FILE); if (starting_tree_File_Value != null && !starting_tree_File_Value.isBlank()) { use_nj_.setEnabled(false); use_random_.setEnabled(false); } else { use_nj_.setEnabled(true); use_random_.setEnabled(true); } String specify_model_Value = getValueAsString(OptionIndex.SPECIFY_MODEL_); if ((specify_runtype_Value != null && specify_runtype_Value.equals(runType1)) && (specify_model_Value != null && !specify_model_Value.isBlank())) { //specify_rcluster_.setEnabled(true); specify_basemodels_.setEnabled(true); specify_freqtypes_.setEnabled(true); specify_ratehettypes_.setEnabled(true); specify_mincat_.setEnabled(true); specify_maxcat_.setEnabled(true); specify_merit_.setEnabled(true); specify_fulltreesearch_.setEnabled(true); specify_addlmodels_.setEnabled(true); } else { //specify_rcluster_.setEnabled(false); specify_basemodels_.setEnabled(false); specify_freqtypes_.setEnabled(false); specify_ratehettypes_.setEnabled(false); specify_mincat_.setEnabled(false); specify_maxcat_.setEnabled(false); specify_merit_.setEnabled(false); specify_fulltreesearch_.setEnabled(false); specify_addlmodels_.setEnabled(false); } if (sequence_type_Value != null && sequence_type_Value.equals(ComboBoxValueLabel.IQTREE_SEQUENCE_TYPE_AMINO.getValue()) ) { specify_aamodels_.setEnabled(true); } else specify_aamodels_.setEnabled(false); if (specify_runtype_Value != null && specify_runtype_Value.equals(runType2) ) { freetextmodel_.setEnabled(true); specify_modelfreq_.setEnabled(true); specify_modelrate_.setEnabled(true); asc_bias_.setEnabled(true); gamma_shape_.setEnabled(true); median_approximation_.setEnabled(true); invariable_sites_.setEnabled(true); thorough_estimation_.setEnabled(true); num_parstrees_.setEnabled(true); num_topparstrees_.setEnabled(true); num_besttrees_.setEnabled(true); num_unsucctostop_.setEnabled(true); specify_radius_.setEnabled(true); perturb_strength_.setEnabled(true); slower_NNI_.setEnabled(true); no_mlpairwise_.setEnabled(true); use_fasttreesearch_.setEnabled(true); setFileSelectorEnabled(OptionIndex.CONSTRAINT_FILE_,true); per_sitefile_.setEnabled(true); per_sitewslfile_.setEnabled(true); per_sitewslmrfile_.setEnabled(true); per_sitewslrfile_.setEnabled(true); per_sitewslmfile_.setEnabled(true); per_sitewspmfile_.setEnabled(true); per_sitewsprfile_.setEnabled(true); per_sitewspmrfile_.setEnabled(true); per_sitewplfile_.setEnabled(true); } else { freetextmodel_.setEnabled(false); specify_modelfreq_.setEnabled(false); specify_modelrate_.setEnabled(false); asc_bias_.setEnabled(false); gamma_shape_.setEnabled(false); median_approximation_.setEnabled(false); invariable_sites_.setEnabled(false); thorough_estimation_.setEnabled(false); num_parstrees_.setEnabled(false); num_topparstrees_.setEnabled(false); num_besttrees_.setEnabled(false); num_unsucctostop_.setEnabled(false); specify_radius_.setEnabled(false); perturb_strength_.setEnabled(false); slower_NNI_.setEnabled(false); no_mlpairwise_.setEnabled(false); use_fasttreesearch_.setEnabled(false); setFileSelectorEnabled(OptionIndex.CONSTRAINT_FILE_,false); per_sitefile_.setEnabled(false); per_sitewslfile_.setEnabled(false); per_sitewslmrfile_.setEnabled(false); per_sitewslrfile_.setEnabled(false); per_sitewslmfile_.setEnabled(false); per_sitewspmfile_.setEnabled(false); per_sitewsprfile_.setEnabled(false); per_sitewspmrfile_.setEnabled(false); per_sitewplfile_.setEnabled(false); } String freetextmodel_Value = getValueAsString(OptionIndex.FREETEXTMODEL_); if (sequence_type_Value != null && sequence_type_Value.equals(ComboBoxValueLabel.IQTREE_SEQUENCE_TYPE_DNA.getValue()) && specify_runtype_Value != null && specify_runtype_Value.equals(runType2) && (freetextmodel_Value == null || freetextmodel_Value.isBlank())) { specify_dnamodel_.setEnabled(true); } else specify_dnamodel_.setEnabled(false); if (sequence_type_Value != null && (sequence_type_Value.equals(ComboBoxValueLabel.IQTREE_SEQUENCE_TYPE_AMINO.getValue()) || sequence_type_Value.equals(ComboBoxValueLabel.IQTREE_SEQUENCE_TYPE_NT2AA.getValue())) && specify_runtype_Value != null && specify_runtype_Value.equals(runType2) && (freetextmodel_Value == null || freetextmodel_Value.isBlank())) { specify_protmodel_.setEnabled(true); //setFileSelectorEnabled(OptionIndex.GUIDE_TREE_,true); } else { specify_protmodel_.setEnabled(false); //setFileSelectorEnabled(OptionIndex.GUIDE_TREE_,false); } String specify_protmodel_Value = getValueAsString(OptionIndex.SPECIFY_PROTMODEL_); if (sequence_type_Value != null && (sequence_type_Value.equals(ComboBoxValueLabel.IQTREE_SEQUENCE_TYPE_AMINO.getValue()) || sequence_type_Value.equals(ComboBoxValueLabel.IQTREE_SEQUENCE_TYPE_NT2AA.getValue())) && specify_runtype_Value != null && specify_runtype_Value.equals(runType2) && specify_protmodel_Value != null && !specify_protmodel_Value.isBlank()) specify_protmixture_.setEnabled(true); else specify_protmixture_.setEnabled(false); /* String specify_protmixture_Value = getValueAsString(OptionIndex.SPECIFY_PROTMIXTURE_); if (specify_protmixture_Value != null && (specify_protmixture_Value.equals(ComboBoxValueLabel.IQTREE_PC10.getValue()) || specify_protmixture_Value.equals(ComboBoxValueLabel.IQTREE_PC20.getValue()) || specify_protmixture_Value.equals(ComboBoxValueLabel.IQTREE_PC30.getValue()) || specify_protmixture_Value.equals(ComboBoxValueLabel.IQTREE_PC40.getValue()) || specify_protmixture_Value.equals(ComboBoxValueLabel.IQTREE_PC50.getValue()) || specify_protmixture_Value.equals(ComboBoxValueLabel.IQTREE_PC60.getValue()) || */ if (specify_protmodel_Value != null && (specify_protmodel_Value.equals(ComboBoxValueLabel.IQTREE_C10.getValue()) || specify_protmodel_Value.equals(ComboBoxValueLabel.IQTREE_C20.getValue()) || specify_protmodel_Value.equals(ComboBoxValueLabel.IQTREE_C30.getValue()) || specify_protmodel_Value.equals(ComboBoxValueLabel.IQTREE_C40.getValue()) || specify_protmodel_Value.equals(ComboBoxValueLabel.IQTREE_C50.getValue()) || specify_protmodel_Value.equals(ComboBoxValueLabel.IQTREE_C60.getValue()))) { max_posteriormode_.setEnabled(true); setFileSelectorEnabled(OptionIndex.GUIDE_TREE_,true); setFileSelectorEnabled(OptionIndex.FREQUENCY_FILE_FILE_,true); } else { max_posteriormode_.setEnabled(false); setFileSelectorEnabled(OptionIndex.GUIDE_TREE_,false); setFileSelectorEnabled(OptionIndex.FREQUENCY_FILE_FILE_,false); } if (sequence_type_Value != null && (sequence_type_Value.equals(ComboBoxValueLabel.IQTREE_SEQUENCE_TYPE_BINARY.getValue()) || sequence_type_Value.equals(ComboBoxValueLabel.IQTREE_SEQUENCE_TYPE_MORPH.getValue())) && specify_runtype_Value != null && specify_runtype_Value.equals(runType2) && (freetextmodel_Value == null || freetextmodel_Value.isBlank())) { //max_posteriormode_.setEnabled(true); specify_binmodel_.setEnabled(true); } else { //max_posteriormode_.setEnabled(false); specify_binmodel_.setEnabled(false); } if (sequence_type_Value != null && sequence_type_Value.equals(ComboBoxValueLabel.IQTREE_SEQUENCE_TYPE_CODON.getValue()) && specify_runtype_Value != null && specify_runtype_Value.equals(runType2) && (freetextmodel_Value == null || freetextmodel_Value.isBlank())) { specify_codonmodel_.setEnabled(true); } else specify_codonmodel_.setEnabled(false); String bootstrap_type_Value = getValueAsString(OptionIndex.BOOTSTRAP_TYPE_); if (specify_runtype_Value != null && specify_runtype_Value.equals(runType2) && (bootstrap_type_Value == null || (!bootstrap_type_Value.equals(ComboBoxValueLabel.IQTREE_B.getValue()) && !bootstrap_type_Value.equals(ComboBoxValueLabel.IQTREE_BB.getValue())))) { num_tostop_.setEnabled(true); } else num_tostop_.setEnabled(false); if (bootstrap_type_Value != null && (bootstrap_type_Value.equals(ComboBoxValueLabel.IQTREE_BB.getValue()))) { use_bnni_.setEnabled(true); String num_bootreps_Value = getValueAsString(OptionIndex.NUM_BOOTREPS_); if (num_bootreps_Value != null && Integer.parseInt(num_bootreps_Value) < 1000) num_bootreps_.setValue(1000); } else { use_bnni_.setEnabled(false); } if (bootstrap_type_Value != null && !bootstrap_type_Value.isBlank()) { num_bootreps_.setEnabled(true); write_boottrees_.setEnabled(true); write_boottrees1_.setEnabled(true); max_iters_.setEnabled(true); cc_ufboot_.setEnabled(true); iter_interval_.setEnabled(true); specify_tiebreaker_.setEnabled(true); } else { num_bootreps_.setEnabled(false); write_boottrees_.setEnabled(false); write_boottrees1_.setEnabled(false); max_iters_.setEnabled(false); cc_ufboot_.setEnabled(false); iter_interval_.setEnabled(false); specify_tiebreaker_.setEnabled(false); } Boolean use_symmtest_Value = getValueAsBoolean(OptionIndex.USE_SYMMTEST_); specify_symtest_.setEnabled(use_symmtest_Value); if (bootstrap_type_Value == null || (!bootstrap_type_Value.equals(ComboBoxValueLabel.IQTREE_B.getValue()) && !bootstrap_type_Value.equals(ComboBoxValueLabel.IQTREE_BO.getValue()) && !bootstrap_type_Value.equals(ComboBoxValueLabel.IQTREE_BC.getValue()) )) { sh_test_.setEnabled(true); parametrical_test_.setEnabled(true); abayes_test_.setEnabled(true); lbp_test_.setEnabled(true); } else { sh_test_.setEnabled(false); parametrical_test_.setEnabled(false); abayes_test_.setEnabled(false); lbp_test_.setEnabled(false); } Boolean sh_test_Value = getValueAsBoolean(OptionIndex.SH_TEST_); //Boolean abayes_test_Value = getValueAsBoolean(OptionIndex.ABAYES_TEST_); Boolean lbp_test_Value = getValueAsBoolean(OptionIndex.LBP_TEST_); if (sh_test_Value || lbp_test_Value) num_replicates_.setEnabled(true); else num_replicates_.setEnabled(false); //Boolean parametrical_test_Value = getValueAsBoolean(OptionIndex.PARAMETRICAL_TEST_); //parametrical_test_.setEnabled(!sh_test_Value); //sh_test_.setEnabled(!parametrical_test_Value); String num_rell_Value = getValueAsString(OptionIndex.NUM_RELL_); if (num_rell_Value != null && !num_rell_Value.isBlank()) { weighted_tests_.setEnabled(true); estimate_parsetreeonly_.setEnabled(true); } else { weighted_tests_.setEnabled(false); estimate_parsetreeonly_.setEnabled(false); } String tree_file1_Value = getValueAsString(OptionIndex.TREE_FILE1_); if (tree_file1_Value != null && !tree_file1_Value.isBlank()) { compute_consensustree_.setEnabled(true); compute_consensusnetwork_.setEnabled(true); min_threshold_.setEnabled(true); burnin_value_.setEnabled(true); compute_rfdistances_all_.setEnabled(true); compute_rfdistances_adj_.setEnabled(true); } else { compute_consensustree_.setEnabled(false); compute_consensusnetwork_.setEnabled(false); min_threshold_.setEnabled(false); burnin_value_.setEnabled(false); compute_rfdistances_all_.setEnabled(false); compute_rfdistances_adj_.setEnabled(false); } String fixed_usertree_file_Value = getValueAsString(OptionIndex.FIXED_USERTREE_FILE); if ((tree_file1_Value != null && !tree_file1_Value.isBlank()) || (fixed_usertree_file_Value != null && !fixed_usertree_file_Value.isBlank())) { fix_brlengths_.setEnabled(true); } else fix_brlengths_.setEnabled(false); String target_treefile_Value = getValueAsString(OptionIndex.TARGET_TREEFILE_); if (target_treefile_Value != null && !target_treefile_Value.isBlank()) { set_precision_.setEnabled(true); set_scalefactor_.setEnabled(true); } else { set_precision_.setEnabled(false); set_scalefactor_.setEnabled(false); } //Boolean generate_randomtrees_Value = getValueAsBoolean(OptionIndex.GENERATE_RANDOMTREES_); //if (generate_randomtrees_Value) { choose_randomtype_.setEnabled(true); num_taxa_.setEnabled(true); specify_brlengths_.setEnabled(true); } /* else { choose_randomtype_.setEnabled(false); num_taxa_.setEnabled(false); specify_brlengths_.setEnabled(false); } */ String select_rcluster_Value = getValueAsString(OptionIndex.SELECT_RCLUSTER_); if (select_rcluster_Value == null || select_rcluster_Value.isBlank()) specify_rclusterval_.setEnabled(false); else specify_rclusterval_.setEnabled(true); String specify_quartets_Value = getValueAsString(OptionIndex.SPECIFY_QUARTETS_); if (specify_quartets_Value != null && !specify_quartets_Value.isBlank() && specify_quartets_Value.equals("specify_quartet")) { specify_quartetnum_.setEnabled(true); } else { specify_quartetnum_.setEnabled(false); } if (specify_quartets_Value != null && !specify_quartets_Value.isBlank()) { write_quartets_.setEnabled(true); } else { write_quartets_.setEnabled(false); } String which_iqtree = getValueAsString(OptionIndex.WHICH_IQTREE_); if (which_iqtree != null && Integer.parseInt(which_iqtree) > 200) { partition_modelfile2_file_.setEnabled(true); partition_tfile_file_.setEnabled(true); setoftrees_file_file_.setEnabled(true); specify_numquartets_.setEnabled(true); specify_datefile_file_.setEnabled(true); extract_datefile_.setEnabled(true); specify_datetip_.setEnabled(true); specify_rootdate_.setEnabled(true); specify_datetreefile_file_.setEnabled(true); specify_resampleint_.setEnabled(true); specify_outlierthresh_.setEnabled(true); } else { partition_modelfile2_file_.setEnabled(false); partition_tfile_file_.setEnabled(false); setoftrees_file_file_.setEnabled(false); specify_numquartets_.setEnabled(false); specify_datefile_file_.setEnabled(false); extract_datefile_.setEnabled(false); specify_datetip_.setEnabled(false); specify_rootdate_.setEnabled(false); specify_datetreefile_file_.setEnabled(false); specify_resampleint_.setEnabled(false); specify_outlierthresh_.setEnabled(false); } Boolean more_memory_Boolean = getValueAsBoolean(OptionIndex.MORE_MEMORY_); Boolean more_memory2_Boolean = getValueAsBoolean(OptionIndex.MORE_MEMORY2_); if (more_memory_Boolean) more_memory2_.setEnabled(false); if (more_memory2_Boolean) more_memory_.setEnabled(false); } @Override //public String verifyOptionsAreValid() public boolean areValuesGoodEnoughToContinue() { String runType1 = ComboBoxValueLabel.IQTREE_RUNTYPE_MODEL.getValue(); String runType2 = ComboBoxValueLabel.IQTREE_RUNTYPE_INFERENCE.getValue(); StringBuilder sb = new StringBuilder(); String specify_seed_Value = getValueAsString(OptionIndex.SPECIFY_SEED_); if (specify_seed_Value != null && !specify_seed_Value.isBlank()) { try { Integer.parseInt(specify_seed_Value); } catch (NumberFormatException nfe) { sb.append("Specify the seed (-seed): must be an integer
"); } } String specify_numpatterns_Value = getValueAsString(OptionIndex.SPECIFY_NUMPATTERNS_); if (specify_numpatterns_Value == null || (Integer.parseInt(specify_numpatterns_Value) <= 0)) { sb.append("Please specify the number of patterns which must be greater than zero (on Simple Parameters page)
"); } String specify_runtype_Value = getValueAsString(OptionIndex.SPECIFY_RUNTYPE_); /*String specify_mem_Value = getValueAsString(OptionIndex.SPECIFY_MEM_); if (specify_runtype_Value != null && specify_runtype_Value .equals(runType2) && specify_numparts_Value != null && Integer.parseInt(specify_numparts_Value) == 1 && specify_mem_Value != null && Double.parseDouble(specify_mem_Value) > 120) { sb.append("The run will not complete if -mem is greater than 120 GB, please contact us
"); }*/ String partition_type = getValueAsString(OptionIndex.PARTITION_TYPE_); String partition_file = getValueAsString(OptionIndex.PARTITION_FILE_); if (partition_type != null && !partition_type.isBlank() && (partition_file == null || partition_file.isBlank())) sb.append("Please select a partition file (on Advanced Parameters Page 1)
"); if ((partition_type == null || partition_type.isBlank()) && (partition_file != null && !partition_file.isBlank())) sb.append("Please specify your partition type
"); String use_bnni = getValueAsString(OptionIndex.USE_BNNI_); String which_iqtree = getValueAsString(OptionIndex.WHICH_IQTREE_); if (partition_type != null && partition_type.equals(ComboBoxValueLabel.IQTREE_PARTITION_TYPE_SP.getValue()) && use_bnni != null && !use_bnni.isBlank() && which_iqtree != null && Integer.parseInt(which_iqtree) <= 9) { sb.append("Sorry, a bug in this version will prevent the use of -sp with a partiton file, please use the -spp option (on Advanced Parameters Page 1)
"); } String starting_tree_Value = getValueAsString(OptionIndex.STARTING_TREE_FILE); Boolean use_nj_Value = getValueAsBoolean(OptionIndex.USE_NJ_); Boolean use_random_Value = getValueAsBoolean(OptionIndex.USE_RANDOM_); if (starting_tree_Value == null || starting_tree_Value.isBlank()) { if (use_nj_Value && use_random_Value) sb.append("Sorry, you cannot choose both a random and a NJ starting tree
"); } String freetextmodel_Value = getValueAsString(OptionIndex.FREETEXTMODEL_); String specify_dnamodel_Value = getValueAsString(OptionIndex.SPECIFY_DNAMODEL_); if (specify_runtype_Value != null && specify_runtype_Value.equals(runType2)) { if (freetextmodel_Value != null && !freetextmodel_Value.isBlank() && specify_dnamodel_Value != null && !specify_dnamodel_Value.isBlank()) sb.append("Sorry, you can't specify a DNA model and use the free text entry
"); } String sequence_type_Value = getValueAsString(OptionIndex.SEQUENCE_TYPE_); String specify_model_Value = getValueAsString(OptionIndex.SPECIFY_MODEL_); if (sequence_type_Value != null && sequence_type_Value.equals(ComboBoxValueLabel.IQTREE_SEQUENCE_TYPE_NO_SELECT.getValue())) { sb.append("Please select the sequence type
"); } if (sequence_type_Value != null && sequence_type_Value.equals(ComboBoxValueLabel.IQTREE_SEQUENCE_TYPE_DNA.getValue()) && specify_runtype_Value != null && specify_runtype_Value.equals(runType2)) { if (specify_model_Value != null && !specify_model_Value.isBlank() && specify_dnamodel_Value != null && !specify_dnamodel_Value.isBlank()) sb.append("Sorry, you can't specify a DNA model and run a model test
"); } String specify_protmodel_Value = getValueAsString(OptionIndex.SPECIFY_PROTMODEL_); if (sequence_type_Value != null && (sequence_type_Value.equals(ComboBoxValueLabel.IQTREE_SEQUENCE_TYPE_AMINO.getValue()) || sequence_type_Value.equals(ComboBoxValueLabel.IQTREE_SEQUENCE_TYPE_NT2AA.getValue())) && specify_runtype_Value != null && specify_runtype_Value.equals(runType2)) { if (freetextmodel_Value != null && !freetextmodel_Value.isBlank() && specify_protmodel_Value != null && !specify_protmodel_Value.isBlank()) sb.append("Sorry, you can't specify a protein model and use the free text entry
"); } String specify_binmodel_Value = getValueAsString(OptionIndex.SPECIFY_BINMODEL_); if (sequence_type_Value != null && (sequence_type_Value.equals(ComboBoxValueLabel.IQTREE_SEQUENCE_TYPE_BINARY.getValue()) || sequence_type_Value.equals(ComboBoxValueLabel.IQTREE_SEQUENCE_TYPE_MORPH.getValue())) && specify_runtype_Value != null && specify_runtype_Value.equals(runType2)) { if (freetextmodel_Value != null && !freetextmodel_Value.isBlank() && specify_binmodel_Value != null && !specify_binmodel_Value.isBlank()) sb.append("Sorry, you can't specify a BIN model and use the free text entry
"); } String specify_codonmodel_Value = getValueAsString(OptionIndex.SPECIFY_CODONMODEL_); if (sequence_type_Value != null && sequence_type_Value.equals(ComboBoxValueLabel.IQTREE_SEQUENCE_TYPE_CODON.getValue()) && specify_runtype_Value != null && specify_runtype_Value.equals(runType2)) { if (freetextmodel_Value != null && !freetextmodel_Value.isBlank() && specify_codonmodel_Value != null && !specify_codonmodel_Value.isBlank()) sb.append("Sorry, you can't specify a CODON model and use the free text entry
"); } String bootstrap_type_Value = getValueAsString(OptionIndex.BOOTSTRAP_TYPE_); String num_tostop_Value = getValueAsString(OptionIndex.NUM_TOSTOP_); if (specify_runtype_Value != null && specify_runtype_Value.equals(runType2)) { if (num_tostop_Value != null && !num_tostop_Value.isBlank() && bootstrap_type_Value != null && bootstrap_type_Value.equals(ComboBoxValueLabel.IQTREE_BB.getValue())) sb.append("Sorry, the -n parameter cannot be used with Ultrafast Bootstrapping
"); } String num_bootreps_Value = getValueAsString(OptionIndex.NUM_BOOTREPS_); if (bootstrap_type_Value != null && bootstrap_type_Value.equals(ComboBoxValueLabel.IQTREE_BB.getValue()) && num_bootreps_Value != null) { if (Integer.parseInt(num_bootreps_Value) < 1000) sb.append("The value of bootstraps must be greater than or equal to 1,000 for Ultrafast Bootstrapping
"); } String iter_interval_Value = getValueAsString(OptionIndex.ITER_INTERVAL_); if (bootstrap_type_Value != null && !bootstrap_type_Value.isBlank()) { if (iter_interval_Value != null && !iter_interval_Value.isBlank()) { int iter_inter = Integer.parseInt(iter_interval_Value); if (iter_inter % 2 != 0) sb.append("Step size must be a multiple of 2 (on Advanced Page 2 under Bootstrap Search Parameters section)
"); if (iter_inter > 0 && iter_inter < 10) sb.append("Step size must be at least 10 (on Advanced Page 2 under Bootstrap Search Parameters section)
"); } } String specify_symtest_Value = getValueAsString(OptionIndex.SPECIFY_SYMTEST_); if (specify_symtest_Value != null && specify_symtest_Value.equals("symtest-pval")) { String specify_pval_Value = getValueAsString(OptionIndex.SPECIFY_PVAL_); try { double pval = Double.parseDouble(specify_pval_Value); if (pval <= 0.0) sb.append("Please enter a pval that is bigger than 0.0
"); } catch (NumberFormatException nfe) { sb.append("A Symmetry p-value must be a float number
"); } } String num_replicates_Value = getValueAsString(OptionIndex.NUM_REPLICATES_); boolean sh_test_Value = getValueAsBoolean(OptionIndex.SH_TEST_); boolean lbp_test_Value = getValueAsBoolean(OptionIndex.LBP_TEST_); if (sh_test_Value || lbp_test_Value) if (num_replicates_Value != null && !num_replicates_Value.isBlank()) { try { if (Integer.parseInt(num_replicates_Value) < 1000 && lbp_test_Value) sb.append("The value of replicates must be bigger or equal to 1,000
"); else if (Integer.parseInt(num_replicates_Value) < 1000 && sh_test_Value) sb.append("The value of replicates must be bigger or equal to 1,000 for the SH- test
"); } catch (NumberFormatException nfe) { sb.append("The value of replicates must be an integer
"); } } else { sb.append("Please enter a value of replicates
"); } String num_rell_Value = getValueAsString(OptionIndex.NUM_RELL_); if (num_rell_Value != null && !num_rell_Value.isBlank()) { int num_rell = Integer.parseInt(num_rell_Value); if (num_rell < 1000) sb.append("Sorry, the number of RELL replicates cannot be less than 1,000
"); } String specify_quartets_Value = getValueAsString(OptionIndex.SPECIFY_QUARTETS_); if (specify_quartets_Value != null && !specify_quartets_Value.isBlank()) { int specify_quartets = 0; boolean exceptionHappened = false; String specify_quartetnum_Value = getValueAsString(OptionIndex.SPECIFY_QUARTETNUM_); if (specify_quartetnum_Value != null && !specify_quartetnum_Value.isBlank()) { try { specify_quartets = Integer.parseInt(specify_quartetnum_Value); } catch (NumberFormatException nfe) { sb.append("The value of quartets must be an integer
"); exceptionHappened = true; } if (exceptionHappened == false && specify_quartets <= 0 ) sb.append("The value of quartets must be bigger than zero
"); } } String specify_quartetset_file_Value = getValueAsString(OptionIndex.SPECIFY_QUARTETSET_FILE_); if (specify_quartetset_file_Value != null && !specify_quartetset_file_Value.isBlank()) { if (!specify_quartetset_file_Value.endsWith("\\partition_file.txt")) { sb.append("The partition file must be named partition_file.txt
"); } } String partiton_file_Value = getValueAsString(OptionIndex.PARTITION_FILE_); if (partiton_file_Value != null && !partiton_file_Value.isBlank()) { if (!partiton_file_Value.endsWith("\\clusters.nex")) { sb.append("The NEXUS file specifying taxon clusters must be named clusters.nex
"); } } String gamma_shape_Value = getValueAsString(OptionIndex.GAMMA_SHAPE_); if (gamma_shape_Value != null && !gamma_shape_Value.isBlank()) { double gamma_shape = 0.0; boolean exceptionHappened = false; try { gamma_shape = Double.parseDouble(gamma_shape_Value); } catch (NumberFormatException nfe) { sb.append("The value of gamma shape must be a float
"); exceptionHappened = true; } if (exceptionHappened == false && gamma_shape <= 0.0) sb.append("The value of quartets must be bigger than 0.0
"); } String specify_outlierthresh_Value = getValueAsString(OptionIndex.SPECIFY_OUTLIERTHRESH_); if (specify_outlierthresh_Value != null && !specify_outlierthresh_Value.isBlank()) { try { Double.parseDouble(specify_outlierthresh_Value); } catch (NumberFormatException nfe) { sb.append("z-score threshold must be a number
"); } } /* String partition_type_Value = getValueAsString(OptionIndex.PARTITION_TYPE_); if (specify_numparts_Value != null && (Integer.parseInt(specify_numparts_Value) > 1) && (partition_type_Value == null || partition_type_Value.isBlank())) { sb.append("Partition type must be specified when number of partions is greater than 1
"); }*/ String specify_rclusterval_Value = getValueAsString(OptionIndex.SPECIFY_RCLUSTERVAL_); String select_rcluster_Value = getValueAsString(OptionIndex.SELECT_RCLUSTER_); if ((specify_rclusterval_Value != null && !specify_rclusterval_Value.isBlank()) && (select_rcluster_Value == null ||select_rcluster_Value.isBlank() )) sb.append("Please specify the rcluster algorithm
"); if ((specify_rclusterval_Value == null || specify_rclusterval_Value.isBlank()) && (select_rcluster_Value != null && !select_rcluster_Value.isBlank())) sb.append("Please specify the percentage or max partition pairs for the rcluster algorithm
"); String name_outfiles_Value = getValueAsString(OptionIndex.NAME_OUTFILES_); String specify_prefix_Value = getValueAsString(OptionIndex.SPECIFY_PREFIX_); /* if (name_outfiles_Value != null && !name_outfiles_Value.isBlank() && specify_prefix_Value != null && !specify_prefix_Value.isBlank()) { sb.append("You have entered two different prefixes. Please remove one.
"); }*/ String partition_file_Value = getValueAsString(OptionIndex.PARTITION_FILE_); /* String partition_type_Value = getValueAsString(OptionIndex.PARTITION_TYPE_); if (partition_file_Value != null && !partition_file_Value.isBlank() && (partition_type_Value == null || partition_type_Value.isBlank())) sb.append("Please specify your partition type"); */ //String specify_model_Value = getValueAsString(OptionIndex.SPECIFY_MODEL_); if (specify_model_Value != null && (specify_model_Value.equals(ComboBoxValueLabel.IQTREE_TESTMERGEONLY.getValue()) || specify_model_Value.equals(ComboBoxValueLabel.IQTREE_TESTMERGE.getValue()) || specify_model_Value.equals(ComboBoxValueLabel.IQTREE_TESTNEWMERGEONLY.getValue()) || specify_model_Value.equals(ComboBoxValueLabel.IQTREE_TESTNEWMERGE.getValue())) && (partition_file_Value == null || partition_file_Value.isBlank())) { sb.append("You must specify a partition file to use the MERGE options
"); } Boolean fix_branchlengths_Boolean = getValueAsBoolean(OptionIndex.FIX_BRANCHLENGTHS); String branchlengths_tree_Value = getValueAsString(OptionIndex.BRANCHLENGTHS_TREE_FILE_); if (fix_branchlengths_Boolean && (branchlengths_tree_Value == null || branchlengths_tree_Value.isBlank())) sb.append("Please provide a tree for fixing branch lengths
"); String specify_minbranchlength_Value = getValueAsString(OptionIndex.SPECIFY_MINBRANCHLENGTH_); String specify_maxbranchlength_Value = getValueAsString(OptionIndex.SPECIFY_MINBRANCHLENGTH_); if (specify_minbranchlength_Value != null && !specify_minbranchlength_Value.isBlank()) { try { Double.parseDouble(specify_minbranchlength_Value); } catch (NumberFormatException nfe) { sb.append("Minimum branch length must be a number
"); } } if (specify_maxbranchlength_Value != null && !specify_maxbranchlength_Value.isBlank()) { try { Double.parseDouble(specify_maxbranchlength_Value); } catch (NumberFormatException nfe) { sb.append("Maximum branch length must be a number
"); } } String num_taxa_Value = getValueAsString(OptionIndex.NUM_TAXA_); String choose_randomtype_Value = getValueAsString(OptionIndex.CHOOSE_RANDOMTYPE_); String specify_treefilename_Value = getValueAsString(OptionIndex.SPECIFY_TREEFILENAME_); String tree_file1_Value = getValueAsString(OptionIndex.TREE_FILE1_); if (tree_file1_Value != null && !tree_file1_Value.isBlank() && specify_treefilename_Value != null && !specify_treefilename_Value.isBlank()) { sb.append("Sorry, you cant specify random trees and provide a starting tree
"); } //Boolean generate_randomtrees_Value = getValueAsBoolean(OptionIndex.GENERATE_RANDOMTREES_); //if (generate_randomtrees_Value && (num_taxa_Value == null || num_taxa_Value.isBlank()) && (choose_randomtype_Value == null || choose_randomtype_Value.isBlank()) ) //{ // sb.append("Please specify the number of taxa and choose a random tree model for your random tree
"); //} /* if (generate_randomtrees_Value && (choose_randomtype_Value == null || choose_randomtype_Value.isBlank())) { sb.append("Please choose a random tree model
"); }*/ if ((num_taxa_Value != null && !num_taxa_Value.isBlank())) { int taxa = 0; try { taxa = Integer.parseInt(num_taxa_Value); } catch (Exception ex) { } if (taxa <= 0) sb.append("Number of taxa must be an integer that is bigger than zero
"); } if ((choose_randomtype_Value != null && !choose_randomtype_Value.isBlank()) && (num_taxa_Value == null || num_taxa_Value.isBlank())) { sb.append("Please specify the number of taxa for your random tree
"); } if ((num_taxa_Value != null && !num_taxa_Value.isBlank()) && (choose_randomtype_Value == null || choose_randomtype_Value.isBlank())) { sb.append("Please choose a random tree model
"); } if ((num_taxa_Value != null && !num_taxa_Value.isBlank()) && (specify_treefilename_Value == null || specify_treefilename_Value.isBlank())) { sb.append("Please specify a name for your random tree file output
"); } String partition_modelfile2_file_Value = getValueAsString(OptionIndex.PARTITION_MODELFILE2_FILE_); if (partition_modelfile2_file_Value != null && !partition_modelfile2_file_Value.isBlank() ) { if (!partition_modelfile2_file_Value.endsWith("\\alignment_file.txt")) { sb.append("The file that specifies the model selection (-S) must be called alignment_file.txt"); } if (partition_file_Value != null && !partition_file_Value.isBlank()) sb.append("You cannot specify a -S file and a -p partition file"); } String specify_resampleint_Value = getValueAsString(OptionIndex.SPECIFY_RESAMPLEINT_); if (specify_resampleint_Value != null && !specify_resampleint_Value.isBlank()) { int resampleint = 0; try { resampleint = Integer.parseInt(specify_resampleint_Value); } catch (Exception e) { //sb.append("Resample branch lengths must be an integer
"); } //if (resampleint <= 0) // sb.append("Resample branch lengths must be an integer that is bigger than zero
"); } String invariable_sites_Value = getValueAsString(OptionIndex.INVARIABLE_SITES_); if (invariable_sites_Value != null && !invariable_sites_Value.isBlank()) { double invariable_sites_Double = -1.0; if (!invariable_sites_Value.equals(ESTIMATE)) { try { invariable_sites_Double = Double.parseDouble(invariable_sites_Value); } catch (Exception e) { } if (invariable_sites_Double < 0.0) { sb.append("The proportion of invariable sites should be either 'estimate' or a double that is not negative
"); } } } if (bootstrap_type_Value != null && (bootstrap_type_Value.equals(ComboBoxValueLabel.IQTREE_BB.getValue()))) { //use_bnni_.setEnabled(true); //String num_bootreps_Value = getValueAsString(OptionIndex.NUM_BOOTREPS_); if (num_bootreps_Value != null && Integer.parseInt(num_bootreps_Value) < 1000) sb.append("For ultrafast, the value of bootstraps must be greater than or equal to 1000"); } checkValueIsInteger(sb, getValueAsString(OptionIndex.SPECIFY_RCLUSTERVAL_), null, OptionIndex.SPECIFY_RCLUSTERVAL_); //checkValueIsInteger(sb, getValueAsString(OptionIndex.NUM_TOSTOP_), AUTO, OptionIndex.NUM_TOSTOP_); checkValueIsInteger(sb, getValueAsString(OptionIndex.NUM_TOSTOP_), null, OptionIndex.NUM_TOSTOP_); String jobName = getJobName(); if (jobName == null || jobName.isBlank()) sb.append("Job name cannot be empty!
"); if (sb.length() > 0) { sb.insert(0, ""); sb.append(""); Dialogs.showMessageDialog(sb.toString(), "Invalid Parameter(s)", this.getPanel(), Dialogs.DialogIcon.ERROR); return false; } else { StringBuilder sbWarn = new StringBuilder(); String runtime_Value = getValueAsString(OptionIndex.RUNTIME_); double runtime_Double = Double.parseDouble(runtime_Value); /* if (specify_runtype_Value != null && specify_runtype_Value .equals(runType1)) sbWarn.append(String.format("The job will run on 12 processors as configured. If it runs for the entire configured time, it will consume 12 x %s cpu hours
", runtime_Value)); if (specify_runtype_Value != null && specify_runtype_Value .equals(runType2) && specify_numparts_Value != null && Integer.parseInt(specify_numparts_Value) > 12) sbWarn.append(String.format("The job will run on 24 processors as configured. If it runs for the entire configured time, it will consume 24 x %s cpu hours
", runtime_Value)); if (specify_runtype_Value != null && specify_runtype_Value .equals(runType2) && specify_numparts_Value != null && Integer.parseInt(specify_numparts_Value) == 1 && specify_mem_Value != null && Integer.parseInt(specify_mem_Value) >= 60) sbWarn.append(String.format("The job will run on 24 processors as configured. If it runs for the entire configured time, it will consume 24 x %s cpu hours
", runtime_Value)); if (specify_runtype_Value != null && specify_runtype_Value .equals(runType2) && specify_numparts_Value != null && Integer.parseInt(specify_numparts_Value) < 13 && (specify_mem_Value == null || specify_mem_Value.isBlank())) sbWarn.append(String.format("The job will run on 12 processors as configured. If it runs for the entire configured time, it will consume 12 x %s cpu hours", runtime_Value)); if (specify_runtype_Value != null && specify_runtype_Value .equals(runType2) && specify_numparts_Value != null && Integer.parseInt(specify_numparts_Value) == 1 && specify_mem_Value != null && Integer.parseInt(specify_mem_Value) < 60) sbWarn.append(String.format("The job will run on 12 processors as configured. If it runs for the entire configured time, it will consume 12 x %s cpu hours", runtime_Value)); */ String sequence_type_Value_special = sequence_type_Value != null ? sequence_type_Value : (String)" "; String pfile = getValueAsString(OptionIndex.PARTITION_FILE_); boolean partition_file_Boolean = (pfile == null? false : (pfile.isBlank()? false : true)); Boolean more_memory_Boolean = getValueAsBoolean(OptionIndex.MORE_MEMORY_); Boolean more_memory2_Boolean = getValueAsBoolean(OptionIndex.MORE_MEMORY2_); String specfy_numpatterns_Value = getValueAsString(OptionIndex.SPECIFY_NUMPATTERNS_); int specify_numpatterns_Int = Integer.parseInt(specfy_numpatterns_Value); issueWarning(sbWarn, sequence_type_Value_special, partition_file_Boolean, more_memory_Boolean, specify_numpatterns_Int, runtime_Double, more_memory2_Boolean ); String specify_numquartets_Value = getValueAsString(OptionIndex.SPECIFY_NUMQUARTETS_); if (specify_numquartets_Value != null) { if (Integer.parseInt(specify_numquartets_Value) < 100) sbWarn.append("The authors recommend at least 100 quartets for stable values
"); } if (sbWarn.length() > 0) { sbWarn.insert(0, ""); sbWarn.append(""); return (Dialogs.showContinueCancelDialog(sbWarn.toString(), "Continue with job submission?", this.getPanel(), Dialogs.DialogIcon.QUESTION)); } } return true; } private void issueWarning(StringBuilder sbWarn, String sequence_type_Value, boolean partition_file_Value, Boolean more_memory_Value, int specify_numpatterns_Value, double runtime_Value, Boolean more_memory2_Value ) { if ( more_memory_Value && !sequence_type_Value.equals("AA") && partition_file_Value ) { sbWarn.append("The job will run on 24 processors as configured. If it runs for the entire configured time, it will consume 24 x " + runtime_Value + " cpu hours"); } else if ( more_memory2_Value && !sequence_type_Value.equals("AA") && partition_file_Value ) { sbWarn.append("As configured this job will require a full node. If it runs for the entire configured time, it will consume 128 x " + runtime_Value + " cpu hours"); } else if ( !sequence_type_Value.equals("AA") && (! more_memory_Value && !more_memory2_Value ) && specify_numpatterns_Value <3000) { sbWarn.append("The job will run on 6 processors as configured. If it runs for the entire configured time, it will consume 6 x " + runtime_Value + " cpu hours"); } else if ( !sequence_type_Value.equals("AA") && (! more_memory_Value && !more_memory2_Value ) && specify_numpatterns_Value > 2999 && specify_numpatterns_Value <5000) { sbWarn.append("The job will run on 8 processors as configured. If it runs for the entire configured time, it will consume 8 x " + runtime_Value + " cpu hours"); } else if ( !sequence_type_Value.equals("AA") && (! more_memory_Value && !more_memory2_Value ) && specify_numpatterns_Value > 4999 && specify_numpatterns_Value <7000) { sbWarn.append("The job will run on 12 processors as configured. If it runs for the entire configured time, it will consume 12 x " + runtime_Value + " cpu hours"); } else if ( !sequence_type_Value.equals("AA") && (! more_memory_Value && !more_memory2_Value ) && specify_numpatterns_Value > 6999 && specify_numpatterns_Value <40000) { sbWarn.append("The job will run on 24 processors as configured. If it runs for the entire configured time, it will consume 24 x " + runtime_Value + " cpu hours"); } else if ( !sequence_type_Value.equals("AA") && (! more_memory_Value && !more_memory2_Value ) && specify_numpatterns_Value > 39999 && specify_numpatterns_Value <300000) { sbWarn.append("The job will run on 48 processors as configured. If it runs for the entire configured time, it will consume 48 x " + runtime_Value + " cpu hours"); } else if ( !sequence_type_Value.equals("AA") && (! more_memory_Value && !more_memory2_Value ) && specify_numpatterns_Value > 299999) { sbWarn.append("The job will run on 128 processors as configured. If it runs for the entire configured time, it will consume 128 x " + runtime_Value + " cpu hours"); } else if ( !sequence_type_Value.equals("AA") && (! more_memory_Value && !more_memory2_Value ) && specify_numpatterns_Value > 299999 && runtime_Value >= 24 && runtime_Value <= 48) { sbWarn.append("If your job runs for the full configured time, it will consume 3000 - 6000 cpu hours. Please consider if you want to do this."); } else if ( !sequence_type_Value.equals("AA") && (! more_memory_Value && !more_memory2_Value ) && specify_numpatterns_Value > 299999 && runtime_Value > 48 && runtime_Value <= 72) { sbWarn.append("If your job runs for the full configured time, it will consume 6000 - 9000 cpu hours. Please consider if you want to do this."); } else if ( !sequence_type_Value.equals("AA") && (! more_memory_Value && !more_memory2_Value ) && specify_numpatterns_Value > 299999 && runtime_Value > 72 && runtime_Value <= 96) { sbWarn.append("If your job runs for the full configured time, it will consume 9000 - 12000 cpu hours. Please consider if you want to do this."); } else if ( !sequence_type_Value.equals("AA") && (! more_memory_Value && !more_memory2_Value ) && specify_numpatterns_Value > 299999 && runtime_Value > 96 && runtime_Value <= 120) { sbWarn.append("If your job runs for the full configured time, it will consume 12000 - 15000 cpu hours. Please consider if you want to do this."); } else if ( !sequence_type_Value.equals("AA") && (! more_memory_Value && !more_memory2_Value ) && specify_numpatterns_Value > 299999 && runtime_Value > 144 && runtime_Value <= 168) { sbWarn.append("If your job runs for the full configured time, it will consume 18000 - 21000 cpu hours. Please consider if you want to do this."); } else if ( sequence_type_Value.equals("AA") && (! more_memory_Value && !more_memory2_Value ) && specify_numpatterns_Value <1800) { sbWarn.append("The job will run on 12 processors as configured. If it runs for the entire configured time, it will consume 12 x " + runtime_Value + " cpu hours"); } else if ( sequence_type_Value.equals("AA") && (! more_memory_Value && !more_memory2_Value ) && specify_numpatterns_Value > 1799 && specify_numpatterns_Value < 6000) { sbWarn.append("The job will run on 12 processors as configured. If it runs for the entire configured time, it will consume 24 x " + runtime_Value + " cpu hours"); } else if ( sequence_type_Value.equals("AA") && (! more_memory_Value && !more_memory2_Value ) && specify_numpatterns_Value > 5999 && specify_numpatterns_Value < 40000) { sbWarn.append("The job will run on 12 processors as configured. If it runs for the entire configured time, it will consume 48 x " + runtime_Value + " cpu hours"); } else if ( sequence_type_Value.equals("AA") && (! more_memory_Value && !more_memory2_Value ) && specify_numpatterns_Value > 39999 ) { sbWarn.append("The job will run on 12 processors as configured. If it runs for the entire configured time, it will consume 128 x " + runtime_Value + " cpu hours"); } else if ( sequence_type_Value.equals("AA") && (! more_memory_Value && !more_memory2_Value ) && specify_numpatterns_Value > 39999 && runtime_Value > 48 && runtime_Value <= 72) { sbWarn.append("If your job runs for the full configured time, it will consume 6000 - 9000 cpu hours. Please consider if you want to do this."); } else if ( sequence_type_Value.equals("AA") && (! more_memory_Value && !more_memory2_Value ) && specify_numpatterns_Value > 39999 && runtime_Value > 72 && runtime_Value <= 96) { sbWarn.append("If your job runs for the full configured time, it will consume 9000 - 12000 cpu hours. Please consider if you want to do this."); } else if ( sequence_type_Value.equals("AA") && (! more_memory_Value && !more_memory2_Value ) && specify_numpatterns_Value > 39999 && runtime_Value > 96 && runtime_Value <= 128) { sbWarn.append("If your job runs for the full configured time, it will consume 12000 - 15000 cpu hours. Please consider if you want to do this."); } else if ( sequence_type_Value.equals("AA") && (! more_memory_Value && !more_memory2_Value ) && specify_numpatterns_Value > 39999 && runtime_Value >= 168) { sbWarn.append("If your job runs for the full configured time, it will consume 18000 - 21000 cpu hours. Please consider if you want to do this."); } } private void issueWarning_old(StringBuilder sbWarn, String sequence_type_Value, boolean partition_file_Value, Boolean more_memory_Value, int specify_numpatterns_Value, double runtime_Value ) { // runtime if ( !sequence_type_Value.equals("AA") && (! partition_file_Value || more_memory_Value ) && specify_numpatterns_Value < 2000) { sbWarn.append("The job will run on 6 processors as configured. If it runs for the entire configured time, it will consume 6 x " + runtime_Value + " cpu hours"); } if ( !sequence_type_Value.equals("AA") && (! partition_file_Value || more_memory_Value ) && specify_numpatterns_Value > 1999 && specify_numpatterns_Value < 6000 ) { sbWarn.append("The job will run on 12 processors as configured. If it runs for the entire configured time, it will consume 12 x " + runtime_Value + " cpu hours"); } if ( !sequence_type_Value.equals("AA") && (! partition_file_Value || more_memory_Value ) && specify_numpatterns_Value > 5999 && specify_numpatterns_Value < 40000 ) { sbWarn.append("The job will run on 24 processors as configured. If it runs for the entire configured time, it will consume 24 x " + runtime_Value + " cpu hours"); } if ( !sequence_type_Value.equals("AA") && (! partition_file_Value || more_memory_Value ) && specify_numpatterns_Value > 39999 && specify_numpatterns_Value < 300000 ) { sbWarn.append("The job will run on 48 processors as configured. If it runs for the entire configured time, it will consume 48 x " + runtime_Value + " cpu hours"); } if ( !sequence_type_Value.equals("AA") && (! partition_file_Value || more_memory_Value ) && specify_numpatterns_Value > 299999 ) { sbWarn.append("The job will run on 128 processors as configured. If it runs for the entire configured time, it will consume 128 x " + runtime_Value + " cpu hours"); } if ( !sequence_type_Value.equals("AA") && (! partition_file_Value || more_memory_Value ) && specify_numpatterns_Value > 299999 && runtime_Value >= 24 && runtime_Value <= 48) { sbWarn.append("WARNING: If your job runs for the full configured time, it will consume 3,000 - 6,000 cpu hours. Please consider if you want to do this."); } if ( !sequence_type_Value.equals("AA") && (! partition_file_Value || more_memory_Value ) && specify_numpatterns_Value > 299999 && runtime_Value > 48 && runtime_Value <= 72) { sbWarn.append("WARNING: If your job runs for the full configured time, it will consume 6,000 - 9,000 cpu hours. Please consider if you want to do this."); } if ( !sequence_type_Value.equals("AA") && (! partition_file_Value || more_memory_Value ) && specify_numpatterns_Value > 299999 && runtime_Value > 72 && runtime_Value <= 96) { sbWarn.append("WARNING: If your job runs for the full configured time, it will consume 9,000 - 12,000 cpu hours. Please consider if you want to do this."); } if ( !sequence_type_Value.equals("AA") && (! partition_file_Value || more_memory_Value ) && specify_numpatterns_Value > 299999 && runtime_Value > 96 && runtime_Value <= 120) { sbWarn.append("WARNING: If your job runs for the full configured time, it will consume 12,000 - 15,000 cpu hours. Please consider if you want to do this."); } if ( !sequence_type_Value.equals("AA") && (! partition_file_Value || more_memory_Value ) && specify_numpatterns_Value > 299999 && runtime_Value > 120 && runtime_Value <= 144) { sbWarn.append("WARNING: If your job runs for the full configured time, it will consume 15,000 - 18,000 cpu hours. Please consider if you want to do this."); } if ( !sequence_type_Value.equals("AA") && (! partition_file_Value || more_memory_Value ) && specify_numpatterns_Value > 299999 && runtime_Value > 144 && runtime_Value <= 168) { sbWarn.append("WARNING: If your job runs for the full configured time, it will consume 18,000 - 21,000 cpu hours. Please consider if you want to do this."); } if ( !sequence_type_Value.equals("AA") && partition_file_Value && ! more_memory_Value ) { sbWarn.append("The job will run on 6 processors as configured. If it runs for the entire configured time, it will consume 6 x " + runtime_Value + " cpu hours"); } if ( sequence_type_Value.equals("AA") && (! partition_file_Value || more_memory_Value ) && specify_numpatterns_Value < 1800 ) { sbWarn.append("The job will run on 12 processors as configured. If it runs for the entire configured time, it will consume 12 x " + runtime_Value + " cpu hours"); } if ( sequence_type_Value.equals("AA") && (! partition_file_Value || more_memory_Value ) && specify_numpatterns_Value > 1799 && specify_numpatterns_Value < 6000 ) { sbWarn.append("The job will run on 24 processors as configured. If it runs for the entire configured time, it will consume 24 x " + runtime_Value + " cpu hours"); } if ( sequence_type_Value.equals("AA") && (! partition_file_Value || more_memory_Value ) && specify_numpatterns_Value > 5999 && specify_numpatterns_Value < 40000 ) { sbWarn.append("The job will run on 48 processors as configured. If it runs for the entire configured time, it will consume 48 x " + runtime_Value + " cpu hours"); } if ( sequence_type_Value.equals("AA") && (! partition_file_Value || more_memory_Value ) && specify_numpatterns_Value > 39999 ) { sbWarn.append("The job will run on 128 processors as configured. If it runs for the entire configured time, it will consume 128 x " + runtime_Value + " cpu hours"); } if ( sequence_type_Value.equals("AA") && partition_file_Value && ! more_memory_Value ) { sbWarn.append("The job will run on 12 processors as configured. If it runs for the entire configured time, it will consume 12 x " + runtime_Value + " cpu hours"); } if ( sequence_type_Value.equals("AA") && (! partition_file_Value || more_memory_Value ) && specify_numpatterns_Value > 39999 && runtime_Value >= 24 && runtime_Value <= 48) { sbWarn.append("WARNING: If your job runs for the full configured time, it will consume 3,000 - 6,000 cpu hours. Please consider if you want to do this."); } if ( sequence_type_Value.equals("AA") && (! partition_file_Value || more_memory_Value ) && specify_numpatterns_Value > 39999 && runtime_Value > 48 && runtime_Value <= 72) { sbWarn.append("WARNING: If your job runs for the full configured time, it will consume 6,000 - 9,000 cpu hours. Please consider if you want to do this."); } if ( sequence_type_Value.equals("AA") && (! partition_file_Value || more_memory_Value ) && specify_numpatterns_Value > 39999 && runtime_Value > 72 && runtime_Value <= 96) { sbWarn.append("WARNING: If your job runs for the full configured time, it will consume 9,000 - 12,000 cpu hours. Please consider if you want to do this."); } if ( sequence_type_Value.equals("AA") && (! partition_file_Value || more_memory_Value ) && specify_numpatterns_Value > 39999 && runtime_Value > 96 && runtime_Value <= 120) { sbWarn.append("WARNING: If your job runs for the full configured time, it will consume 12,000 - 15,000 cpu hours. Please consider if you want to do this."); } if ( sequence_type_Value.equals("AA") && (! partition_file_Value || more_memory_Value ) && specify_numpatterns_Value > 39999 && runtime_Value > 120 && runtime_Value <= 144) { sbWarn.append("WARNING: If your job runs for the full configured time, it will consume 15,000 - 18,000 cpu hours. Please consider if you want to do this."); } if ( sequence_type_Value.equals("AA") && (! partition_file_Value || more_memory_Value ) && specify_numpatterns_Value > 39999 && runtime_Value > 144 && runtime_Value <= 168) { sbWarn.append("WARNING: If your job runs for the full configured time, it will consume 18,000 - 21,000 cpu hours. Please consider if you want to do this."); } sbWarn.append("
"); } private boolean checkValueIsInteger(StringBuilder sb, String specify_Value, String special_Value, OptionIndex index) { boolean checkOK = true; //String specify_Value = getValueAsString(OptionIndex.SPECIFY_RESAMPLEINT_); if (specify_Value != null && !specify_Value.isBlank() && (special_Value != null ? !specify_Value.equals(special_Value) : true)) { int resampleint = 0; try { resampleint = Integer.parseInt(specify_Value); } catch (Exception e) { } if (resampleint <= 0) { sb.append("This field (" + nameAndLabels[index.ordinal()].label + ") must be either '" + (special_Value == null? "" : special_Value) + "' or an integer that is bigger than zero
"); checkOK = false; } } return checkOK; } private Options getOptionsFromIndex(OptionIndex index) { if (index.ordinal() <= OptionIndex.SPECIFY_PREFIX_.ordinal()) return simpleOptions; else if (index.ordinal() <= OptionIndex.THOROUGH_ESTIMATION_.ordinal()) return advancedOptions; else if (index.ordinal() <= OptionIndex.SPECIFY_ANCESTRALTREE_FILE_.ordinal()) return advancedOptions2; else if (index.ordinal() <= OptionIndex.SPECIFY_TREEFILENAME_.ordinal()) return advancedOptions3; else return advancedOptions4; } private String getValueAsString(OptionIndex index) { return filterOutExceptions(index, getValueAsString(getOptionsFromIndex(index), nameAndLabels[index.ordinal()].name)); } private Boolean getValueAsBoolean(OptionIndex index) { return getValueAsBoolean(getOptionsFromIndex(index), nameAndLabels[index.ordinal()].name); } private String filterOutExceptions(OptionIndex index, String value) { if (value == null || value.isBlank()) return value; if (value.strip().isBlank()) return value.strip(); if (index == OptionIndex.ITER_INTERVAL_ || index == OptionIndex.NUM_RELL_ || index == OptionIndex.SPECIFY_MINCAT_ || index == OptionIndex.SPECIFY_MAXCAT_ || index == OptionIndex.MAX_ITERS_ || index == OptionIndex.SPECIFY_NUMQUARTETS_ ) { if (Integer.parseInt(value) == 0) return null; } if (index == OptionIndex.CC_UFBOOT_ || index == OptionIndex.SPECIFY_TIEBREAKER_ ) { if (Double.parseDouble(value) == 0.0) return null; } return value; } private void setFileSelectorEnabled(OptionIndex index, boolean enabled) { setFileSelectorEnabled(getOptionsFromIndex(index), nameAndLabels[index.ordinal()].name, enabled); } private JSONObject jsonCommand = new JSONObject(); private Map inputParams = new HashMap(); @SuppressWarnings("unchecked") public void populateJsonCommand() { for (OptionIndex opt : OptionIndex.values()) { if (nameAndLabels[opt.ordinal()].isFile) continue; setParam(opt, ParamType.VParam); } } public JSONObject getJsonCommand() { return jsonCommand; } public Map> getVParams() { return MrBayesUtilities.getVParams(jsonCommand); } public Map getInputParams() { List files = new ArrayList(); final AnnotatedPluginDocument doc = selectedDocuments[0]; try { final SequenceAlignmentDocument alignmentDoc = (SequenceAlignmentDocument) doc.getDocument(); File tempFolder; tempFolder = FileUtilities.createTempFile("Geneious", "IQTREEXSEDE_1_01_01", false); tempFolder.delete(); tempFolder.mkdirs(); StringBuilder inFileBldr = new StringBuilder(); List seqDocList = alignmentDoc.getSequences(); for(SequenceDocument seqDocument: seqDocList){ //MrBayes does not like space or dot(s) in taxa name String seqName = seqDocument.getName().trim() .replaceAll(SPACE, UNDERSCORE) .replaceAll("\\"+ DOT, "") .replaceAll("\\(","") .replaceAll("\\)",""); String seqString = seqDocument.getSequenceString().trim(); //System.out.println(seqString); //System.out.println(seqName + TAB + seqString); inFileBldr.append( ">" + seqName + NEWLINE + seqString + NEWLINE); } File outputFile = new File(tempFolder, GENEIOUS_FORMAT); files.add(outputFile); SafePrintWriter out = new SafePrintWriter(new FileWriter(outputFile)); out.println(inFileBldr.toString()); out.close(); } catch (IOException | DocumentOperationException e) { // TODO Auto-generated catch block e.printStackTrace(); } //Map inputParams = new HashMap(); //inputParams.put("infile_", "C:\\Users\\mzhuang\\Cipres_input\\infile1"); inputParams.put("infile_", files.get(0).toString()); for (OptionIndex opt : OptionIndex.values()) { if (!nameAndLabels[opt.ordinal()].isFile) continue; setParam(opt, ParamType.InputParam); } return inputParams; } public HashMap getMetadata(String jobName){ jobName = getJobName(); return MrBayesUtilities.getMetadata(jobName); } @SuppressWarnings("unchecked") private void setParam(OptionIndex index, ParamType type) { Option opt = findOptionByName(getOptionsFromIndex(index), nameAndLabels[index.ordinal()].name); if (opt == null || !opt.isEnabled()) return; String value = null; if (opt instanceof BooleanOption) value = getBooleanValueAsString(index); else value = getValueAsString(index); if (value != null && !value.isBlank()) { if (type.equals(ParamType.VParam)) jsonCommand.put(nameAndLabels[index.ordinal()].parameter, value); else if (type.equals(ParamType.InputParam)) inputParams.put(nameAndLabels[index.ordinal()].parameter, value); } } private String getBooleanValueAsString(OptionIndex index) { BooleanOption bo = (BooleanOption)findOptionByName(getOptionsFromIndex(index), nameAndLabels[index.ordinal()].name); if (!bo.isEnabled()) return null; if (index == OptionIndex.PARAMETRICAL_TEST_ || index == OptionIndex.SPECIFY_SAFE_) { if (!bo.getValue()) return null; } if (bo.getValue()) return ONE; else return ZERO; } }