git://source.jalview.org
/
jalview.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
phylotastic hackathon at NESCENT 120607
[jalview.git]
/
forester
/
java
/
src
/
org
/
forester
/
archaeopteryx
/
tools
/
AncestralTaxonomyInferrer.java
diff --git
a/forester/java/src/org/forester/archaeopteryx/tools/AncestralTaxonomyInferrer.java
b/forester/java/src/org/forester/archaeopteryx/tools/AncestralTaxonomyInferrer.java
index
09e8804
..
55a740d
100644
(file)
--- a/
forester/java/src/org/forester/archaeopteryx/tools/AncestralTaxonomyInferrer.java
+++ b/
forester/java/src/org/forester/archaeopteryx/tools/AncestralTaxonomyInferrer.java
@@
-30,12
+30,13
@@
import java.net.UnknownHostException;
import javax.swing.JOptionPane;
import org.forester.analysis.AncestralTaxonomyInference;
import javax.swing.JOptionPane;
import org.forester.analysis.AncestralTaxonomyInference;
+import org.forester.analysis.AncestralTaxonomyInferenceException;
import org.forester.archaeopteryx.MainFrameApplication;
import org.forester.archaeopteryx.TreePanel;
import org.forester.phylogeny.Phylogeny;
import org.forester.archaeopteryx.MainFrameApplication;
import org.forester.archaeopteryx.TreePanel;
import org.forester.phylogeny.Phylogeny;
-import org.forester.ws.uniprot.UniProtWsTools;
+import org.forester.ws.seqdb.SequenceDbWsTools;
-public class AncestralTaxonomyInferrer implements Runnable {
+public class AncestralTaxonomyInferrer extends RunnableProcess {
private final Phylogeny _phy;
private final MainFrameApplication _mf;
private final Phylogeny _phy;
private final MainFrameApplication _mf;
@@
-47,17
+48,17
@@
public class AncestralTaxonomyInferrer implements Runnable {
_treepanel = treepanel;
}
_treepanel = treepanel;
}
- private String getBaseUrl() {
- return UniProtWsTools.BASE_URL;
+ public static String getBaseUrl() {
+ return SequenceDbWsTools.BASE_UNIPROT_URL;
}
private void inferTaxonomies() {
}
private void inferTaxonomies() {
- _mf.getMainPanel().getCurrentTreePanel().setWaitCursor();
+ start( _mf, "ancestral taxonomy" );
try {
AncestralTaxonomyInference.inferTaxonomyFromDescendents( _phy );
}
catch ( final AncestralTaxonomyInferenceException e ) {
try {
AncestralTaxonomyInference.inferTaxonomyFromDescendents( _phy );
}
catch ( final AncestralTaxonomyInferenceException e ) {
- _mf.getMainPanel().getCurrentTreePanel().setArrowCursor();
+ end( _mf );
JOptionPane.showMessageDialog( _mf,
e.getMessage(),
"Error during ancestral taxonomy inference",
JOptionPane.showMessageDialog( _mf,
e.getMessage(),
"Error during ancestral taxonomy inference",
@@
-65,7
+66,7
@@
public class AncestralTaxonomyInferrer implements Runnable {
return;
}
catch ( final UnknownHostException e ) {
return;
}
catch ( final UnknownHostException e ) {
- _mf.getMainPanel().getCurrentTreePanel().setArrowCursor();
+ end( _mf );
JOptionPane.showMessageDialog( _mf,
"Could not connect to \"" + getBaseUrl() + "\"",
"Network error during ancestral taxonomy inference",
JOptionPane.showMessageDialog( _mf,
"Could not connect to \"" + getBaseUrl() + "\"",
"Network error during ancestral taxonomy inference",
@@
-73,19
+74,27
@@
public class AncestralTaxonomyInferrer implements Runnable {
return;
}
catch ( final Exception e ) {
return;
}
catch ( final Exception e ) {
- _mf.getMainPanel().getCurrentTreePanel().setArrowCursor();
+ end( _mf );
e.printStackTrace();
JOptionPane.showMessageDialog( _mf,
e.toString(),
e.printStackTrace();
JOptionPane.showMessageDialog( _mf,
e.toString(),
+ "Unexpected exception during ancestral taxonomy inference",
+ JOptionPane.ERROR_MESSAGE );
+ return;
+ }
+ catch ( final Error e ) {
+ end( _mf );
+ JOptionPane.showMessageDialog( _mf,
+ e.toString(),
"Unexpected error during ancestral taxonomy inference",
JOptionPane.ERROR_MESSAGE );
return;
}
"Unexpected error during ancestral taxonomy inference",
JOptionPane.ERROR_MESSAGE );
return;
}
- _mf.getMainPanel().getCurrentTreePanel().setArrowCursor();
_phy.setRerootable( false );
_treepanel.setTree( _phy );
_mf.showWhole();
_treepanel.setEdited( true );
_phy.setRerootable( false );
_treepanel.setTree( _phy );
_mf.showWhole();
_treepanel.setEdited( true );
+ end( _mf );
try {
JOptionPane.showMessageDialog( _mf,
"Ancestral taxonomy inference successfully completed",
try {
JOptionPane.showMessageDialog( _mf,
"Ancestral taxonomy inference successfully completed",