- if ( ( length < 2 ) || ( length >= msa.getLength() ) ) {
- ForesterUtil.fatalError( PRG_NAME, "target length is out of range: " + length );
+ if ( length >= msa.getLength() ) {
+ ForesterUtil.fatalError( PRG_NAME,
+ "target length is out of range [longer than MSA (" + msa.getLength()
+ + ")]: " + length );
+ }
+ else if ( length < initial_msa_stats.getMin() ) {
+ ForesterUtil.fatalError( PRG_NAME,
+ "target length is out of range [shorter than the shortest sequence ("
+ + initial_msa_stats.getMin() + ") ]: " + length );
+ }
+ }
+ if ( cla.isOptionSet( MIN_LENGTH_OPTION ) ) {
+ if ( cla.isOptionSet( LENGTH_OPTION ) || cla.isOptionSet( REMOVE_WORST_OFFENDERS_OPTION )
+ || cla.isOptionSet( AV_GAPINESS_OPTION ) || cla.isOptionSet( STEP_OPTION )
+ || cla.isOptionSet( REALIGN_OPTION ) || cla.isOptionSet( PATH_TO_MAFFT_OPTION )
+ || cla.isOptionSet( STEP_FOR_DIAGNOSTICS_OPTION ) || cla.isOptionSet( REPORT_ENTROPY )
+ || cla.isOptionSet( OUTPUT_REMOVED_SEQS_OPTION )
+ || cla.isOptionSet( PERFORM_PHYLOGENETIC_INFERENCE ) ) {
+ printHelp();
+ System.exit( 0 );
+ }
+ min_length = cla.getOptionValueAsInt( MIN_LENGTH_OPTION );
+ if ( ( min_length < 2 ) || ( min_length > initial_msa_stats.getMax() ) ) {
+ ForesterUtil.fatalError( PRG_NAME, "value for minimal sequence length is out of range: "
+ + min_length );