}*/
//notice, here we set the selected nodes
currentParamsCopy.setSelectedNodes(selectedNodesRGI);
Algorithm alg1 = null;
boolean newNet=isDirty(network);//judge new network
ParameterSet savedParamsCopy;
if (this.clusterUtil.containsNetworkAlgorithm(network.getSUID().longValue())) {
// alg1 = this.clusterUtil.getNetworkAlgorithm(network.getSUID().longValue());
savedParamsCopy = this.clusterUtil.getCurrentParameters().getParamsCopy(network.getSUID());
analyze=checkParams(currentParamsCopy, newNet);
} else {
//clusterUtil.getNetworkAlgorithm(network.getSUID().longValue())
savedParamsCopy = this.clusterUtil.getCurrentParameters().getParamsCopy(null);
this.analyze = 0;
}
if (analyze == INTERRUPTED || analyze == EXISTS)
JOptionPane.showMessageDialog(AnalyzeAction.this.swingApplication.getJFrame(),
interruptedMessage, "Interrupted", JOptionPane.WARNING_MESSAGE);
else{
final int resultId = this.clusterUtil.getCurrentResultId();
if ((this.analyze == 0) || (isDirty(network)) || (!currentParamsCopy.getAlgorithm().equals(savedParamsCopy.getAlgorithm())) ||
(currentParamsCopy.isIncludeLoops() != savedParamsCopy.isIncludeLoops()) ||
(currentParamsCopy.getDegreeCutoff() != savedParamsCopy.getDegreeCutoff())) {
this.analyze = 1;
// logger.debug("Analysis: score network, find clusters");
this.clusterUtil.getCurrentParameters().setParams(currentParamsCopy, resultId, network.getSUID());
} else if (!checkEqual(savedParamsCopy, currentParamsCopy)) {
this.analyze = 2;
// logger.debug("Analysis: find clusters");
this.clusterUtil.getCurrentParameters().setParams(currentParamsCopy, resultId, network.getSUID());
} else {
this.analyze = 3;
interruptedMessage = "The parameters you specified have not changed.";
this.clusterUtil.getCurrentParameters().setParams(currentParamsCopy, resultId, network.getSUID());
}
if(currentParamsCopy.getAlgorithm().equals(ParameterSet.MCODE ))
alg1 = new MCODE(network.getSUID(), this.clusterUtil);
if(currentParamsCopy.getAlgorithm().equals(ParameterSet.EAGLE ))
alg1 = new EAGLE(network.getSUID(), this.clusterUtil);
if(currentParamsCopy.getAlgorithm().equals(ParameterSet.FAGEC ))
alg1 = new FAGEC(network.getSUID(), this.clusterUtil);
this.clusterUtil.addNetworkAlgorithm(network.getSUID().longValue(), alg1);
/*
//if (!networkManager.containsKey(network.getIdentifier())){
newNet=true;
alg = curParams.getAlg();
//alg = new Algorithm(null);
networkManager.put(network.getSUID(), alg);
//}
//else alg = (Algorithm) networkManager.get(network.getIdentifier());
//check the validation the input parameters
analyze=checkParams(curParams, newNet);
resultId = this.clusterUtil.getCurrentResultId();
if (analyze == INTERRUPTED || analyze == EXISTS)
JOptionPane.showMessageDialog(nullCytoscape.getDesktop(),
interruptedMessage, "Interrupted", JOptionPane.WARNING_MESSAGE);
else{
//update the parameter set with this result title
clusterUtil.getCurrentParameters().setParams(curParams, (resultCounter + 1),
network.getSUID());*/
if ((currentParamsCopy.getScope().equals(ParameterSet.SELECTION)) &&
(currentParamsCopy.getSelectedNodes().length < 1)) {
this.analyze = 3;
interruptedMessage = "You must select ONE OR MORE NODES\nfor this scope.";
}
if (this.analyze == 3) {
JOptionPane.showMessageDialog(this.swingApplication.getJFrame(),
interruptedMessage,
"Analysis Interrupted",
2);
}
else {
final Algorithm alg2=alg1;
AnalysisCompletedListener listener = new AnalysisCompletedListener()
{
public void handleEvent(AnalysisCompletedEvent e)
{
ResultPanel resultsPanel = null;