+ @Override
+ public MainPanel getMainPanel() {
+ return _mainpanel;
+ }
+
+ private void readSpeciesTree( final Configuration configuration, final String species_tree_url_str )
+ throws MalformedURLException, FileNotFoundException, IOException {
+ final URL species_tree_url = new URL( species_tree_url_str );
+ final Phylogeny[] species_trees = AptxUtil.readPhylogeniesFromUrl( species_tree_url,
+ configuration
+ .isValidatePhyloXmlAgainstSchema(),
+ configuration
+ .isReplaceUnderscoresInNhParsing(),
+ false,
+ TAXONOMY_EXTRACTION.NO,
+ false );
+ if ( ( species_trees != null ) && ( species_trees.length > 0 ) ) {
+ AptxUtil.printAppletMessage( ArchaeopteryxA.NAME, "successfully read species tree" );
+ if ( species_trees[ 0 ].isEmpty() ) {
+ ForesterUtil.printErrorMessage( ArchaeopteryxA.NAME, "species tree is empty" );
+ }
+ else if ( !species_trees[ 0 ].isRooted() ) {
+ ForesterUtil.printErrorMessage( ArchaeopteryxA.NAME, "species tree is not rooted" );
+ }
+ else {
+ setSpeciesTree( species_trees[ 0 ] );
+ AptxUtil.printAppletMessage( ArchaeopteryxA.NAME, "species tree OK" );
+ }
+ }
+ else {
+ ForesterUtil.printErrorMessage( ArchaeopteryxA.NAME, "failed to read species tree from "
+ + species_tree_url_str );
+ }
+ }
+
+ void buildAnalysisMenu() {
+ _analysis_menu = MainFrame.createMenu( "Analysis", getConfiguration() );
+ _analysis_menu.add( _gsdi_item = new JMenuItem( "GSDI (Generalized Speciation Duplication Inference)" ) );
+ _analysis_menu.add( _gsdir_item = new JMenuItem( "GSDIR (GSDI with re-rooting)" ) );
+ customizeJMenuItem( _gsdi_item );
+ customizeJMenuItem( _gsdir_item );
+ // _analysis_menu.addSeparator();
+ // _analysis_menu.add( _lineage_inference = new JMenuItem( INFER_ANCESTOR_TAXONOMIES ) );
+ // customizeJMenuItem( _lineage_inference );
+ // _lineage_inference.setToolTipText( "Inference of ancestor taxonomies/lineages" );
+ _jmenubar.add( _analysis_menu );
+ }
+