Author: scooter
Date: 2010-09-24 16:26:39 -0700 (Fri, 24 Sep 2010)
New Revision: 22056
Removed:
csplugins/trunk/ucsf/scooter/clusterMaker/src/clusterMaker/algorithms/TransClust/
Modified:
csplugins/trunk/ucsf/scooter/clusterMaker/src/clusterMaker/algorithms/DistanceMatrix.java
csplugins/trunk/ucsf/scooter/clusterMaker/src/clusterMaker/algorithms/EdgeAttributeHandler.java
Log:
Support "None" attribute for clustering
Modified:
csplugins/trunk/ucsf/scooter/clusterMaker/src/clusterMaker/algorithms/DistanceMatrix.java
===================================================================
---
csplugins/trunk/ucsf/scooter/clusterMaker/src/clusterMaker/algorithms/DistanceMatrix.java
2010-09-24 23:23:29 UTC (rev 22055)
+++
csplugins/trunk/ucsf/scooter/clusterMaker/src/clusterMaker/algorithms/DistanceMatrix.java
2010-09-24 23:26:39 UTC (rev 22056)
@@ -64,8 +64,12 @@
edgeWeights[edgeIndex] = Double.MIN_VALUE;
- if(!edgeAttributes.hasAttribute(id,edgeAttributeName))
+ if(!edgeAttributes.hasAttribute(id,edgeAttributeName)) {
+ // Special-case for "None" attribute. We just
assign an edge value of 1.
+ if
(edgeAttributeName.equals(EdgeAttributeHandler.NONEATTRIBUTE))
+ edgeWeights[edgeIndex] = 1.0;
continue;
+ }
double edgeWeight = 0.0;
if(edgeAttributes.getType(edgeAttributeName) ==
edgeAttributes.TYPE_FLOATING)
Modified:
csplugins/trunk/ucsf/scooter/clusterMaker/src/clusterMaker/algorithms/EdgeAttributeHandler.java
===================================================================
---
csplugins/trunk/ucsf/scooter/clusterMaker/src/clusterMaker/algorithms/EdgeAttributeHandler.java
2010-09-24 23:23:29 UTC (rev 22055)
+++
csplugins/trunk/ucsf/scooter/clusterMaker/src/clusterMaker/algorithms/EdgeAttributeHandler.java
2010-09-24 23:26:39 UTC (rev 22056)
@@ -56,6 +56,8 @@
public class EdgeAttributeHandler
implements TunableListener, ActionListener, HistoChangeListener {
+ public static final String NONEATTRIBUTE = "--None--";
+
private ClusterProperties clusterProperties;
private DistanceMatrix matrix = null;
private boolean adjustLoops = true;
@@ -272,6 +274,7 @@
attributeArray = new String[1];
// Create the list by combining node and edge attributes into a
single list
List<String> attributeList = new ArrayList<String>();
+ attributeList.add(NONEATTRIBUTE);
getAttributesList(attributeList, Cytoscape.getEdgeAttributes());
String[] attrArray = attributeList.toArray(attributeArray);
if (attrArray.length > 1)
--
You received this message because you are subscribed to the Google Groups
"cytoscape-cvs" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/cytoscape-cvs?hl=en.