import org.forester.archaeopteryx.Options.PHYLOGENY_GRAPHICS_TYPE;
import org.forester.archaeopteryx.tools.AncestralTaxonomyInferrer;
import org.forester.archaeopteryx.tools.GoAnnotation;
+import org.forester.archaeopteryx.tools.InferenceManager;
import org.forester.archaeopteryx.tools.PhyloInferenceDialog;
import org.forester.archaeopteryx.tools.PhylogeneticInferenceOptions;
import org.forester.archaeopteryx.tools.PhylogeneticInferrer;
JMenuItem _read_values_jmi;
private MainFrameApplication( final Phylogeny[] phys, final Configuration config, final String title ) {
+ this( phys, config, title, null );
+ }
+
+ private MainFrameApplication( final Phylogeny[] phys,
+ final Configuration config,
+ final String title,
+ final File current_dir ) {
+ super();
_configuration = config;
if ( _configuration == null ) {
throw new IllegalArgumentException( "configuration is null" );
catch ( final Exception e ) {
AptxUtil.dieWithSystemError( e.toString() );
}
+ if ( ( current_dir != null ) && current_dir.canRead() && current_dir.isDirectory() ) {
+ setCurrentDir( current_dir );
+ }
// hide until everything is ready
setVisible( false );
setOptions( Options.createInstance( _configuration ) );
}
void buildPhylogeneticInferenceMenu() {
+ final InferenceManager inference_manager = InferenceManager.getInstance();
_inference_menu = MainFrame.createMenu( "Inference", getConfiguration() );
- _inference_menu
- .add( _inference_from_msa_item = new JMenuItem( "From Multiple Sequence Alignment...(EXPERIMENTAL - DO NOT USE!!) " ) );
+ _inference_menu.add( _inference_from_msa_item = new JMenuItem( "From Multiple Sequence Alignment..." ) );
customizeJMenuItem( _inference_from_msa_item );
_inference_from_msa_item.setToolTipText( "Basic phylogenetic inference from MSA" );
- _inference_menu
- .add( _inference_from_seqs_item = new JMenuItem( "From Unaligned Sequences...(EXPERIMENTAL - DO NOT USE!!) " ) );
+ _inference_menu.add( _inference_from_seqs_item = new JMenuItem( "From Unaligned Sequences..." ) );
customizeJMenuItem( _inference_from_seqs_item );
_inference_from_seqs_item.setToolTipText( "Basic phylogenetic inference including multiple sequence alignment" );
_jmenubar.add( _inference_menu );
phy.hashIDs();
phy.recalculateNumberOfExternalDescendants( true );
getCurrentTreePanel().resetNodeIdToDistToLeafMap();
- getCurrentTreePanel().updateSetOfCollapsedExternalNodes( phy );
+ getCurrentTreePanel().updateSetOfCollapsedExternalNodes();
getCurrentTreePanel().calculateLongestExtNodeInfo();
getCurrentTreePanel().setNodeInPreorderToNull();
getCurrentTreePanel().recalculateMaxDistanceToRoot();
return new MainFrameApplication( phys, config_file_name, title );
}
+ public static MainFrame createInstance( final Phylogeny[] phys,
+ final Configuration config,
+ final String title,
+ final File current_dir ) {
+ return new MainFrameApplication( phys, config, title, current_dir );
+ }
+
static void setTextForGraphicsSizeChooserMenuItem( final JMenuItem mi, final Options o ) {
mi.setText( "Enter Default Size for Graphics Export... (current: " + o.getPrintSizeX() + ", "
+ o.getPrintSizeY() + ")" );