Author: mes
Date: 2010-09-15 10:31:22 -0700 (Wed, 15 Sep 2010)
New Revision: 21870

Modified:
   csplugins/trunk/ucsd/mes/VennDiagram/build.xml
   csplugins/trunk/ucsd/mes/VennDiagram/resources/plugin.props
   csplugins/trunk/ucsd/mes/VennDiagram/src/edu/uic/ncdm/venn/VennAnalytic.java
Log:
bug fix for non-intersecting sets

Modified: csplugins/trunk/ucsd/mes/VennDiagram/build.xml
===================================================================
--- csplugins/trunk/ucsd/mes/VennDiagram/build.xml      2010-09-15 17:26:05 UTC 
(rev 21869)
+++ csplugins/trunk/ucsd/mes/VennDiagram/build.xml      2010-09-15 17:31:22 UTC 
(rev 21870)
@@ -1,5 +1,5 @@
 
-<project name="VennDiagram" default="all" basedir=".">
+<project name="VennDiagram" default="all" basedir="." 
xmlns:artifact="antlib:org.apache.maven.artifact.ant">
 
   <!-- =================================================================== -->
   <!-- Initialization target                                               -->
@@ -7,7 +7,7 @@
   <target name="init">
     <tstamp/>
     <property name="name" value="VennDiagram"/>
-    <property name="version" value="1.0.1"/>
+    <property name="version" value="1.0"/>
 
     <echo message="Building ${name} version ${version} ..."/>
 
@@ -19,8 +19,6 @@
 
     <!-- Define the directories -->
     <property name="root.dir" value="."/>
-    <property name="cytoscape.dir" value="${root.dir}/../../../../cytoscape"/>
-    <property name="cytoscape.lib.dir" value="${cytoscape.dir}/lib"/>
     <property name="resources.dir" value="${root.dir}/resources"/>
     <property name="src.dir" value="${root.dir}/src"/>
     <property name="tests.dir" value="${root.dir}/tests"/>
@@ -33,27 +31,29 @@
     <property name="project.jar" value="${name}.jar"/>
     <property name="test.jar" value="${name}-tests.jar"/>
 
+    <artifact:remoteRepository 
+       id="cytoscape_releases" 
+       
url="http://cytoscape.wodaklab.org/nexus/content/repositories/releases/"; />
+    <artifact:remoteRepository 
+       id="cytoscape_snapshots" 
+       
url="http://cytoscape.wodaklab.org/nexus/content/repositories/snapshots/"; />
+    <artifact:dependencies pathId="dependency.classpath">
+      <dependency groupId="cytoscape" 
+                  artifactId="application" 
+                  version="2.8.0-beta1"/>
+    </artifact:dependencies>
+
     <!-- Define the class path -->
     <path id="project.class.path">
-      <fileset dir="${cytoscape.dir}">
-        <include name="*.jar"/>
-      </fileset>
-      <fileset dir="${cytoscape.lib.dir}">
-        <include name="*.jar"/>
-      </fileset>
+      <path refid="dependency.classpath"/>
     </path>
    
     <!-- Define the junit class path - It needs to find what we just built --> 
     <path id="junit.class.path" >
+      <path refid="dependency.classpath"/>
       <fileset dir="${root.dir}">
         <include name="*.jar"/>
       </fileset>
-      <fileset dir="${cytoscape.dir}">
-        <include name="*.jar"/>
-      </fileset>
-      <fileset dir="${cytoscape.lib.dir}">
-        <include name="*.jar"/>
-      </fileset>
     </path>
 
     <!-- Make sure tests is in the right place -->
@@ -92,12 +92,11 @@
   <!-- =================================================================== -->
   <target name="jar" 
           depends="compile" >
-<!--             
-       <copy toDir="${build.dir}">
-               <fileset dir="${resources.dir}/testData" includes="*" />
-       </copy>
--->
-       <copy file="${resources.dir}/plugin.props" 
todir="${build.dir}/edu/uic/ncdm/venn"/>
+       <filter token="version" value="${version}"/>
+       <copy file="${resources.dir}/plugin.props" 
+             todir="${build.dir}/edu/uic/ncdm/venn"
+                 filtering="true"
+                 overwrite="true"/>
     <jar destfile="${project.jar}" >
       <fileset dir="${build.dir}"
                includes="**"/>

Modified: csplugins/trunk/ucsd/mes/VennDiagram/resources/plugin.props
===================================================================
--- csplugins/trunk/ucsd/mes/VennDiagram/resources/plugin.props 2010-09-15 
17:26:05 UTC (rev 21869)
+++ csplugins/trunk/ucsd/mes/VennDiagram/resources/plugin.props 2010-09-15 
17:31:22 UTC (rev 21870)
@@ -11,10 +11,10 @@
 pluginDescription=This plugin generates a Venn/Euler Diagram of shared nodes 
for a selection of networks.
 
 # Plugin version number, this must be two numbers separated by a decimlal.  
Ex. 0.2, 14.03
-pluginVersion=0.1
+pluginversi...@version@
 
 # Compatible Cytoscape version
-cytoscapeVersion=2.5,2.6,2.7
+cytoscapeVersion=2.5,2.6,2.7,2.8
 
 # Category, use one of the categories listed on the website or create your own
 pluginCategory=Analysis
@@ -24,7 +24,3 @@
 # each additional author institution pair must be separated from other pairs 
bye a ; (semicolon)
 pluginAuthorsIntsitutions=Leland Wilkinson:University of Illinois, 
Chicago;Mike Smoot:UC San Diego
 
-# -- The following properties should be set ONLY BY CORE PLUGINS -- #
-downloadURL=http://cytoscape.org/plugins/plugins.xml
-uniqueID=1123456641
-

Modified: 
csplugins/trunk/ucsd/mes/VennDiagram/src/edu/uic/ncdm/venn/VennAnalytic.java
===================================================================
--- 
csplugins/trunk/ucsd/mes/VennDiagram/src/edu/uic/ncdm/venn/VennAnalytic.java    
    2010-09-15 17:26:05 UTC (rev 21869)
+++ 
csplugins/trunk/ucsd/mes/VennDiagram/src/edu/uic/ncdm/venn/VennAnalytic.java    
    2010-09-15 17:31:22 UTC (rev 21870)
@@ -303,12 +303,12 @@
     }
 
     public void computeInitialConfiguration() {
-        if (nCircles < 3) {
+        double[][] s = computeDistanceMatrix();
+        if (s == null) {
             fixedStart();
             return;
         }
 
-        double[][] s = computeDistanceMatrix();
         double[] q = new double[nCircles];
         double[][] x = new double[nCircles][2];
 
@@ -353,6 +353,7 @@
     }
 
     private double[][] computeDistanceMatrix() {
+        int nIntersections = 0;
         double[][] s = new double[nCircles][nCircles];
         for (int i = 0; i < nPolygons; i++) {
             char[] c = encode(i);
@@ -367,12 +368,16 @@
                 }
             }
         }
-        for (int i = 1; i < s.length; i++) {
-            for (int j = 0; j < i; j++) {
-                s[i][j] = -s[i][j];
-                s[j][i] = s[i][j];
+        for (int j = 1; j < s.length; j++) {
+            for (int k = 0; k < j; k++) {
+                if (s[j][k] != 0)
+                    nIntersections++;
+                s[j][k] = -s[j][k];
+                s[k][j] = s[j][k];
             }
         }
+        if (nIntersections < nCircles)
+            s = null;
         return s;
     }
 

-- 
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.

Reply via email to