compactor work
authorcmzmasek@gmail.com <cmzmasek@gmail.com@ca865154-3058-d1c3-3e42-d8f55a55bdbd>
Thu, 5 Feb 2015 04:19:47 +0000 (04:19 +0000)
committercmzmasek@gmail.com <cmzmasek@gmail.com@ca865154-3058-d1c3-3e42-d8f55a55bdbd>
Thu, 5 Feb 2015 04:19:47 +0000 (04:19 +0000)
forester/java/src/org/forester/application/msa_compactor.java
forester/java/src/org/forester/archaeopteryx/tools/InferenceManager.java
forester/java/src/org/forester/msa_compactor/MsaCompactor.java

index 8184e15..e60d886 100644 (file)
@@ -394,6 +394,9 @@ public class msa_compactor {
                     msa_props = mc.chart( step, realign, norm );
                 }
                 Chart.display( msa_props, initial_number_of_seqs, report_entropy, in.getName() );
+                System.out.println();
+                System.out.println( "Final MSA properties" );
+                printMsaInfo( msa,  MsaMethods.calculateEffectiveLengthStatistics( msa ));
             }
         }
         catch ( final IllegalArgumentException iae ) {
@@ -422,20 +425,20 @@ public class msa_compactor {
     }
 
     private static void printMsaInfo( DeleteableMsa msa, final DescriptiveStatistics msa_stats ) {
-        System.out.println( "MSA length                         : " + msa.getLength() );
-        System.out.println( "Number of sequences                : " + msa.getNumberOfSequences() );
-        System.out.println( "Median sequence length             : " + NF_1.format( msa_stats.median() ) );
-        System.out.println( "Mean sequence length               : "
+        System.out.println( "MSA length                           : " + msa.getLength() );
+        System.out.println( "Number of sequences                  : " + msa.getNumberOfSequences() );
+        System.out.println( "Median sequence length               : " + NF_1.format( msa_stats.median() ) );
+        System.out.println( "Mean sequence length                 : "
                 + NF_1.format( msa_stats.arithmeticMean() ) );
-        System.out.println( "Max sequence length                : " + ( ( int ) msa_stats.getMax() ) );
-        System.out.println( "Min sequence length                : " + ( ( int ) msa_stats.getMin() ) );
-        System.out.println( "Gap ratio                          : "
+        System.out.println( "Max sequence length                  : " + ( ( int ) msa_stats.getMax() ) );
+        System.out.println( "Min sequence length                  : " + ( ( int ) msa_stats.getMin() ) );
+        System.out.println( "Gap ratio                            : "
                 + NF_4.format( MsaMethods.calcGapRatio( msa ) ) );
-        System.out.println( "Mean gap count per 100 residues    : "
+        System.out.println( "Mean gap count per sequence          : "
                 + NF_1.format( MsaMethods.calcNumberOfGapsStats( msa ).arithmeticMean() ) );
-        System.out.println( "Normalized Shannon Entropy (entn7) : "
+        System.out.println( "Normalized Shannon Entropy (entn7)   : "
                 + NF_4.format( MsaMethods.calcNormalizedShannonsEntropy( 7, msa ) ) );
-        System.out.println( "Normalized Shannon Entropy (entn21): "
+        System.out.println( "Normalized Shannon Entropy (entn21)  : "
                 + NF_4.format( MsaMethods.calcNormalizedShannonsEntropy( 21, msa ) ) );
     }
 
index f38940b..c673f76 100644 (file)
@@ -7,7 +7,7 @@ import org.forester.archaeopteryx.Configuration;
 
 public final class InferenceManager {
 
-    private final static String DEFAULT_PATHS[] = { "C:\\Program Files\\", "C:\\Program Files (x86)\\", "/bin/",
+    private final static String DEFAULT_PATHS[] = {"C:\\Program Files\\mafft-win\\", "C:\\Program Files\\", "C:\\Program Files (x86)\\", "/bin/",
         "/usr/local/bin/", "/usr/bin/"     };
     private final File          _path_to_local_mafft;
     private final File          _path_to_local_fastme;
index 6209da1..b4d2fe7 100644 (file)
@@ -179,6 +179,7 @@ public class MsaCompactor {
             }
             ++i;
         }
+        
         if ( _phylogentic_inference ) {
             decorateTree( phy, msa_props, true );
             displayTree( phy );
@@ -350,7 +351,14 @@ public class MsaCompactor {
         if ( _phylogentic_inference ) {
             decorateTree( phy, msa_props, false );
             displayTree( phy );
-        }
+            System.out.println( "calculating phylogentic tree..." );
+            System.out.println();
+            final Phylogeny phy2 = calcTree();
+            addSeqs2Tree( _msa, phy2 );
+            displayTree( phy2 );
+        }   
+      
+       
         return msa_props;
     }
 
@@ -401,7 +409,13 @@ public class MsaCompactor {
         if ( _phylogentic_inference ) {
             decorateTree( phy, msa_props, false );
             displayTree( phy );
-        }
+            System.out.println( "calculating phylogentic tree..." );
+            System.out.println();
+            final Phylogeny phy2 = calcTree();
+            addSeqs2Tree( _msa, phy2 );
+            displayTree( phy2 );
+        }   
+       
         return msa_props;
     }
 
@@ -456,7 +470,8 @@ public class MsaCompactor {
             final Phylogeny phy2 = calcTree();
             addSeqs2Tree( _msa, phy2 );
             displayTree( phy2 );
-        }
+        }   
+       
         return msa_props;
     }