- boolean jacknifed_distances = false;
- int jacknife_resamplings = JACKNIFE_NUMBER_OF_RESAMPLINGS_DEFAULT;
- double jacknife_ratio = JACKNIFE_RATIO_DEFAULT;
- long random_seed = JACKNIFE_RANDOM_SEED_DEFAULT;
- if ( cla.isOptionSet( surfacing.JACKNIFE_OPTION ) ) {
- if ( ( number_of_genomes < 3 ) || !perform_pwc ) {
- ForesterUtil.fatalError( surfacing.PRG_NAME, "cannot use jacknife resampling analysis (-"
- + surfacing.JACKNIFE_OPTION + "[=<number of resamplings>]) without pairwise analyses ("
- + surfacing.PAIRWISE_DOMAIN_COMPARISONS_OPTION
- + "=<suffix for pairwise comparison output files>)" );
- }
- jacknifed_distances = true;
- if ( cla.isOptionHasAValue( surfacing.JACKNIFE_OPTION ) ) {
- try {
- jacknife_resamplings = cla.getOptionValueAsInt( surfacing.JACKNIFE_OPTION );
- }
- catch ( final IOException e ) {
- ForesterUtil.fatalError( surfacing.PRG_NAME, "illegal format for number of resamplings" );
- }
- if ( jacknife_resamplings < 2 ) {
- ForesterUtil.fatalError( surfacing.PRG_NAME, "attempt to use less than 2 resamplings" );
- }
- }
- if ( cla.isOptionSet( surfacing.JACKNIFE_RATIO_OPTION )
- && cla.isOptionHasAValue( surfacing.JACKNIFE_RATIO_OPTION ) ) {
- try {
- jacknife_ratio = cla.getOptionValueAsDouble( surfacing.JACKNIFE_RATIO_OPTION );
- }
- catch ( final IOException e ) {
- ForesterUtil.fatalError( surfacing.PRG_NAME, "illegal format for jacknife ratio" );
- }
- if ( ( jacknife_ratio <= 0.0 ) || ( jacknife_ratio >= 1.0 ) ) {
- ForesterUtil.fatalError( surfacing.PRG_NAME, "attempt to use illegal value for jacknife ratio: "
- + jacknife_ratio );
- }
- }
- if ( cla.isOptionSet( surfacing.JACKNIFE_RANDOM_SEED_OPTION )
- && cla.isOptionHasAValue( surfacing.JACKNIFE_RANDOM_SEED_OPTION ) ) {
- try {
- random_seed = cla.getOptionValueAsLong( surfacing.JACKNIFE_RANDOM_SEED_OPTION );
- }
- catch ( final IOException e ) {
- ForesterUtil.fatalError( surfacing.PRG_NAME, "illegal format for random generator seed" );
- }
- }
- }
- // boolean infer_species_trees = false;
- // if ( cla.isOptionSet( surfacing.INFER_SPECIES_TREES_OPTION ) ) {
- // if ( ( output_file == null ) || ( number_of_genomes < 3 )
- // || ForesterUtil.isEmpty( automated_pairwise_comparison_suffix ) ) {
- // ForesterUtil.fatalError( surfacing.PRG_NAME, "cannot infer species trees (-"
- // + surfacing.INFER_SPECIES_TREES_OPTION + " without pairwise analyses ("
- // + surfacing.PAIRWISE_DOMAIN_COMPARISONS_OPTION
- // + "=<suffix for pairwise comparison output files>)" );
- // }
- // infer_species_trees = true;
- // }