inprogress
[jalview.git] / forester / java / src / org / forester / archaeopteryx / MainFrame.java
index 36e691c..5e7a13d 100644 (file)
@@ -34,7 +34,6 @@ import java.io.IOException;
 import java.util.LinkedList;
 import java.util.List;
 import java.util.Locale;
-import java.util.Map;
 import java.util.NoSuchElementException;
 import java.util.Set;
 
@@ -124,6 +123,13 @@ public abstract class MainFrame extends JFrame implements ActionListener {
     JMenu                       _font_size_menu;
     JMenu                       _help_jmenu;
     JMenuItem[]                 _load_phylogeny_from_webservice_menu_items;
+    // Analysis menu
+    JMenu                       _analysis_menu;
+    JMenuItem                   _load_species_tree_item;
+    JMenuItem                   _gsdi_item;
+    JMenuItem                   _gsdir_item;
+    JMenuItem                   _lineage_inference;
+    JMenuItem                   _function_analysis;
     // file menu:
     JMenuItem                   _open_item;
     JMenuItem                   _open_url_item;
@@ -229,6 +235,7 @@ public abstract class MainFrame extends JFrame implements ActionListener {
     Configuration               _configuration;
     JMenuItem                   _remove_branch_color_item;
     Options                     _options;
+    Phylogeny                   _species_tree;
     InferenceManager            _inference_manager;
     final ProcessPool           _process_pool;
     private String              _previous_node_annotation_ref;
@@ -440,7 +447,7 @@ public abstract class MainFrame extends JFrame implements ActionListener {
             about();
         }
         else if ( o == _help_item ) {
-            help( getConfiguration().getWebLinks() );
+            help();
         }
         else if ( o == _website_item ) {
             try {
@@ -795,7 +802,7 @@ public abstract class MainFrame extends JFrame implements ActionListener {
         return _jmenubar;
     }
 
-    void help( final Map<String, WebLink> weblinks ) {
+    void help() {
         final StringBuilder sb = new StringBuilder();
         sb.append( "Display options\n" );
         sb.append( "-------------------\n" );
@@ -833,14 +840,7 @@ public abstract class MainFrame extends JFrame implements ActionListener {
         sb.append( "Since the Java default memory allocation is quite small, it might by necessary (for trees\n" );
         sb.append( "with more than approximately 5000 external nodes) to increase the memory which Java can use, with\n" );
         sb.append( "the '-Xmx' Java command line option. For example:\n" );
-        sb.append( "java -Xms32m -Xmx256m -cp path\\to\\forester.jar org.forester.archaeopteryx.Archaeopteryx\n\n" );
-        if ( ( weblinks != null ) && ( weblinks.size() > 0 ) ) {
-            sb.append( "Active web links\n" );
-            sb.append( "--------------------\n" );
-            for( final String key : weblinks.keySet() ) {
-                sb.append( " " + weblinks.get( key ).toString() + "\n" );
-            }
-        }
+        sb.append( "java -Xmx1024m -cp path\\to\\forester.jar org.forester.archaeopteryx.Archaeopteryx\n\n" );
         // + "General remarks\n"
         // + "---------------\n"
         // +
@@ -881,7 +881,6 @@ public abstract class MainFrame extends JFrame implements ActionListener {
         // + "    incorrect and need to be inferred again\n"
         // +
         // "    with: \"SDI\"|\"SDI (Speciation Duplication Inference)\n\n"
-        sb.append( "\n" );
         sb.append( "phyloXML\n" );
         sb.append( "-------------------\n" );
         sb.append( "Reference: " + Constants.PHYLOXML_REFERENCE + "\n" );
@@ -1121,10 +1120,10 @@ public abstract class MainFrame extends JFrame implements ActionListener {
         options.setInternalNumberAreConfidenceForNhParsing( ( _internal_number_are_confidence_for_nh_parsing_cbmi != null )
                 && _internal_number_are_confidence_for_nh_parsing_cbmi.isSelected() );
         if ( ( _extract_taxonomy_yes_rbmi != null ) && _extract_taxonomy_yes_rbmi.isSelected() ) {
-            options.setTaxonomyExtractio( TAXONOMY_EXTRACTION.YES );
+            options.setTaxonomyExtractio( TAXONOMY_EXTRACTION.AGRESSIVE );
         }
         else if ( ( _extract_taxonomy_pfam_rbmi != null ) && _extract_taxonomy_pfam_rbmi.isSelected() ) {
-            options.setTaxonomyExtractio( TAXONOMY_EXTRACTION.PFAM_STYLE_ONLY );
+            options.setTaxonomyExtractio( TAXONOMY_EXTRACTION.PFAM_STYLE_STRICT );
         }
         else if ( ( _extract_taxonomy_no_rbmi != null ) && _extract_taxonomy_no_rbmi.isSelected() ) {
             options.setTaxonomyExtractio( TAXONOMY_EXTRACTION.NO );
@@ -1211,7 +1210,7 @@ public abstract class MainFrame extends JFrame implements ActionListener {
 
     private void annotateSequences() {
         if ( getCurrentTreePanel() != null ) {
-            final Set<Integer> nodes = getCurrentTreePanel().getFoundNodes();
+            final Set<Long> nodes = getCurrentTreePanel().getFoundNodes();
             if ( ( nodes == null ) || nodes.isEmpty() ) {
                 JOptionPane
                         .showMessageDialog( this,
@@ -1260,7 +1259,7 @@ public abstract class MainFrame extends JFrame implements ActionListener {
                         desc = desc.replaceAll( "\\s+", " " );
                     }
                     if ( !ForesterUtil.isEmpty( ref ) || !ForesterUtil.isEmpty( desc ) ) {
-                        for( final Integer id : nodes ) {
+                        for( final Long id : nodes ) {
                             final PhylogenyNode n = phy.getNode( id );
                             ForesterUtil.ensurePresenceOfSequence( n );
                             final Annotation ann = ForesterUtil.isEmpty( ref ) ? new Annotation()
@@ -1360,7 +1359,7 @@ public abstract class MainFrame extends JFrame implements ActionListener {
      */
     static void about() {
         final StringBuffer about = new StringBuffer( "Archaeopteryx\nVersion " + Constants.VERSION + "\n" );
-        about.append( "Copyright (C) 2007-2012 Christian M. Zmasek\n" );
+        about.append( "Copyright (C) 2013 Christian M. Zmasek\n" );
         about.append( "All Rights Reserved\n" );
         about.append( "License: GNU Lesser General Public License (LGPL)\n" );
         about.append( "Last modified: " + Constants.PRG_DATE + "\n" );