From 4f293d657212059c78fb7649e330842bfea5909a Mon Sep 17 00:00:00 2001 From: "cmzmasek@gmail.com" Date: Wed, 23 Apr 2014 23:19:54 +0000 Subject: [PATCH] cleanup --- .../java/src/org/forester/application/msa_compactor.java | 6 +++--- forester/java/src/org/forester/msa/MsaMethods.java | 4 ++-- .../src/org/forester/msa_compactor/MsaCompactor.java | 14 +++++++------- 3 files changed, 12 insertions(+), 12 deletions(-) diff --git a/forester/java/src/org/forester/application/msa_compactor.java b/forester/java/src/org/forester/application/msa_compactor.java index 8e71f5e..11b6ac8 100644 --- a/forester/java/src/org/forester/application/msa_compactor.java +++ b/forester/java/src/org/forester/application/msa_compactor.java @@ -200,7 +200,7 @@ public class msa_compactor { output_format = MSA_FORMAT.PHYLIP; } if ( cla.isOptionSet( OUTPUT_REMOVED_SEQS_OPTION ) ) { - String s = cla.getOptionValueAsCleanString( OUTPUT_REMOVED_SEQS_OPTION ); + final String s = cla.getOptionValueAsCleanString( OUTPUT_REMOVED_SEQS_OPTION ); removed_seqs_out_base = new File( s ); } if ( realign ) { @@ -210,7 +210,7 @@ public class msa_compactor { checkPathToMafft( path_to_mafft ); if ( cla.isOptionSet( MAFFT_OPTIONS ) ) { mafft_options = cla.getOptionValueAsCleanString( MAFFT_OPTIONS ); - if ( ForesterUtil.isEmpty( mafft_options ) || mafft_options.length() < 3 ) { + if ( ForesterUtil.isEmpty( mafft_options ) || ( mafft_options.length() < 3 ) ) { ForesterUtil.fatalError( PRG_NAME, "gap ratio is out of range: " + gap_ratio ); } } @@ -245,7 +245,7 @@ public class msa_compactor { else { System.out.println( "Chart and diagnostics only : true" ); } - if ( out != null || removed_seqs_out_base != null ) { + if ( ( out != null ) || ( removed_seqs_out_base != null ) ) { System.out.println( "Output format : " + ( output_format == MSA_FORMAT.FASTA ? "fasta" : "phylip" ) ); } diff --git a/forester/java/src/org/forester/msa/MsaMethods.java b/forester/java/src/org/forester/msa/MsaMethods.java index 25330e0..1a94b74 100644 --- a/forester/java/src/org/forester/msa/MsaMethods.java +++ b/forester/java/src/org/forester/msa/MsaMethods.java @@ -168,9 +168,9 @@ public final class MsaMethods { } final public static DescriptiveStatistics calculateEffectiveLengthStatistics( final Msa msa ) { - DescriptiveStatistics stats = new BasicDescriptiveStatistics(); + final DescriptiveStatistics stats = new BasicDescriptiveStatistics(); for( int row = 0; row < msa.getNumberOfSequences(); ++row ) { - Sequence s = msa.getSequence( row ); + final Sequence s = msa.getSequence( row ); stats.addValue( s.getLength() - s.getNumberOfGapResidues() ); } return stats; diff --git a/forester/java/src/org/forester/msa_compactor/MsaCompactor.java b/forester/java/src/org/forester/msa_compactor/MsaCompactor.java index b8332bb..56cc729 100644 --- a/forester/java/src/org/forester/msa_compactor/MsaCompactor.java +++ b/forester/java/src/org/forester/msa_compactor/MsaCompactor.java @@ -428,31 +428,31 @@ public class MsaCompactor { return null; } - public final void setStep( int step ) { + public final void setStep( final int step ) { _step = step; } - public final void setNorm( boolean norm ) { + public final void setNorm( final boolean norm ) { _norm = norm; } - public final void setStepForDiagnostics( int step_for_diagnostics ) { + public final void setStepForDiagnostics( final int step_for_diagnostics ) { _step_for_diagnostics = step_for_diagnostics; } - public final void setMinLength( int min_length ) { + public final void setMinLength( final int min_length ) { _min_length = min_length; } - public final void setGapRatio( double gap_ratio ) { + public final void setGapRatio( final double gap_ratio ) { _gap_ratio = gap_ratio; } - public final void setOutputFormat( MSA_FORMAT output_format ) { + public final void setOutputFormat( final MSA_FORMAT output_format ) { _output_format = output_format; } - public final void setRealign( boolean realign ) { + public final void setRealign( final boolean realign ) { _realign = realign; } -- 1.7.10.2