inprogress
authorcmzmasek@gmail.com <cmzmasek@gmail.com@ca865154-3058-d1c3-3e42-d8f55a55bdbd>
Tue, 14 Jan 2014 21:35:33 +0000 (21:35 +0000)
committercmzmasek@gmail.com <cmzmasek@gmail.com@ca865154-3058-d1c3-3e42-d8f55a55bdbd>
Tue, 14 Jan 2014 21:35:33 +0000 (21:35 +0000)
forester/java/src/org/forester/archaeopteryx/Constants.java
forester/java/src/org/forester/archaeopteryx/TreePanel.java
forester/java/src/org/forester/tools/PhylogenyDecorator.java

index ed3e375..c9130e3 100644 (file)
@@ -42,15 +42,15 @@ public final class Constants {
     public final static boolean __SYNTH_LF                                                    = false;                                                               // TODO remove me
     public final static boolean ALLOW_DDBJ_BLAST                                              = false;
     public final static String  PRG_NAME                                                      = "Archaeopteryx";
-    final static String         VERSION                                                       = "0.9817 PD";
-    final static String         PRG_DATE                                                      = "131119";
+    final static String         VERSION                                                       = "0.9818 A";
+    final static String         PRG_DATE                                                      = "140114";
     final static String         DEFAULT_CONFIGURATION_FILE_NAME                               = "_aptx_configuration_file";
     final static String[]       DEFAULT_FONT_CHOICES                                          = { "Arial", "Helvetica",
             "Verdana", "Tahoma", "Dialog", "Lucida Sans", "SansSerif", "Sans-serif", "Sans"  };
     final static boolean        VERBOSE_DEFAULT                                               = false;
     final static int            DOMAIN_STRUCTURE_DEFAULT_WIDTH                                = 200;
     final static String         AUTHOR_EMAIL                                                  = "phyloxml@gmail.com";
-    final static int            DOMAIN_STRUCTURE_E_VALUE_THR_DEFAULT_EXP                      = 0;
+    final static int            DOMAIN_STRUCTURE_E_VALUE_THR_DEFAULT_EXP                      = -3;
     final static float          BUTTON_ZOOM_IN_FACTOR                                         = 1.25f;
     final static float          BUTTON_ZOOM_OUT_FACTOR                                        = 1 / Constants.BUTTON_ZOOM_IN_FACTOR;
     final static float          BUTTON_ZOOM_IN_X_CORRECTION_FACTOR                            = 1.2f;
index 2833f8e..fdd4c77 100644 (file)
@@ -3794,24 +3794,14 @@ public final class TreePanel extends JPanel implements ActionListener, MouseWhee
                                               final boolean to_pdf,
                                               final boolean to_graphics_file ) {
         final List<Confidence> confidences = node.getBranchData().getConfidences();
-        //        if ( confidences.size() == 1 ) {
-        //            final double value = node.getBranchData().getConfidence( 0 ).getValue();
-        //            if ( ( value == Confidence.CONFIDENCE_DEFAULT_VALUE ) || ( value < getOptions().getMinConfidenceValue() ) ) {
-        //                return;
-        //            }
-        //            conf_str = FORMATTER_CONFIDENCE.format( value );
-        //        }
-        //        else if ( confidences.size() > 1 ) {
-        boolean one_ok = false;
         boolean not_first = false;
         Collections.sort( confidences );
         final StringBuilder sb = new StringBuilder();
-        String conf_str = "";
         for( final Confidence confidence : confidences ) {
             final double value = confidence.getValue();
             if ( value != Confidence.CONFIDENCE_DEFAULT_VALUE ) {
-                if ( value >= getOptions().getMinConfidenceValue() ) {
-                    one_ok = true;
+                if ( value < getOptions().getMinConfidenceValue() ) {
+                    return;
                 }
                 if ( not_first ) {
                     sb.append( "/" );
@@ -3831,12 +3821,8 @@ public final class TreePanel extends JPanel implements ActionListener, MouseWhee
                     }
                 }
             }
-            //}
-            if ( one_ok ) {
-                conf_str = sb.toString();
-            }
         }
-        if ( conf_str.length() > 0 ) {
+        if ( sb.length() > 0 ) {
             final double parent_x = node.getParent().getXcoord();
             double x = node.getXcoord();
             g.setFont( getTreeFontSet().getSmallFont() );
@@ -3852,6 +3838,7 @@ public final class TreePanel extends JPanel implements ActionListener, MouseWhee
             else {
                 g.setColor( getTreeColorSet().getConfidenceColor() );
             }
+            final String conf_str = sb.toString();
             TreePanel
                     .drawString( conf_str,
                                  parent_x
index d71be51..74c4fe9 100644 (file)
@@ -203,7 +203,6 @@ public final class PhylogenyDecorator {
         if ( map.isEmpty() ) {
             throw new IllegalArgumentException( "map is empty" );
         }
-      
         int ext_nodes = 0;
         int ext_nodes_updated = 0;
         int int_nodes = 0;