+ if ( min_length == -1 ) {
+ if ( chart_only && !realign ) {
+ System.out.println( "Step for output and re-aligning : n/a" );
+ }
+ else {
+ if ( chart_only ) {
+ System.out.println( "Step for re-aligning : " + step );
+ }
+ else {
+ System.out.println( "Step for output and re-aligning : " + step );
+ }
+ }
+ System.out.println( "Step for diagnostics reports : " + step_for_diagnostics );
+ System.out.println( "Calculate normalized Shannon Entropy : " + report_entropy );
+ if ( !norm ) {
+ System.out.println( "Normalize : " + norm );
+ }
+ System.out.println( "Realign with MAFFT : " + realign );
+ if ( realign ) {
+ System.out.println( "MAFFT options : " + mafft_options );
+ }
+ System.out.println( "Simple tree (Kimura distances, NJ) : " + perform_phylogenetic_inference );
+ }
+ System.out.println();
+ final int initial_number_of_seqs = msa.getNumberOfSequences();
+ List<MsaProperties> msa_props = null;
+ final MsaCompactor mc = new MsaCompactor( msa );
+ mc.setInfileName( in.getName() );
+ if ( ( worst_remove > 0 ) || ( av_gap > 0 ) || ( length > 0 ) || ( min_length != -1 ) ) {
+ mc.setOutputFormat( output_format );
+ mc.setOutFileBase( out );
+ }
+ if ( min_length != -1 ) {
+ mc.removeSequencesByMinimalLength( min_length );
+ }
+ else {
+ mc.setPeformPhylogenticInference( perform_phylogenetic_inference );
+ if ( removed_seqs_out_base != null ) {
+ mc.setRemovedSeqsOutBase( removed_seqs_out_base );
+ }
+ mc.setNorm( norm );
+ mc.setRealign( realign );
+ if ( realign ) {
+ mc.setPathToMafft( path_to_mafft );
+ mc.setMafftOptions( mafft_options );
+ }
+ mc.setStep( step );
+ mc.setStepForDiagnostics( step_for_diagnostics );
+ mc.setCalculateNormalizedShannonEntropy( report_entropy );
+ if ( worst_remove > 0 ) {
+ msa_props = mc.removeWorstOffenders( worst_remove );
+ }
+ else if ( av_gap > 0 ) {
+ msa_props = mc.removeViaGapAverage( av_gap );
+ }
+ else if ( length > 0 ) {
+ msa_props = mc.removeViaLength( length );
+ }
+ else {
+ msa_props = mc.chart( step, realign, norm );
+ }
+ Chart.display( msa_props, initial_number_of_seqs, report_entropy, in.getName() );
+ }
+ }
+ catch ( final IllegalArgumentException iae ) {
+ // iae.printStackTrace(); //TODO remove me
+ ForesterUtil.fatalError( PRG_NAME, iae.getMessage() );
+ }
+ catch ( final IOException ioe ) {
+ // ioe.printStackTrace(); //TODO remove me
+ ForesterUtil.fatalError( PRG_NAME, ioe.getMessage() );