Author: kono
Date: 2011-11-02 15:36:32 -0700 (Wed, 02 Nov 2011)
New Revision: 27383
Removed:
csplugins/trunk/ucsd/kono/bingo3/lib/plugin-api-3.0.0-alpha8-SNAPSHOT-jar-with-dependencies.jar
Modified:
csplugins/trunk/ucsd/kono/bingo3/manifest.mf
csplugins/trunk/ucsd/kono/bingo3/nbproject/build-impl.xml
csplugins/trunk/ucsd/kono/bingo3/nbproject/genfiles.properties
csplugins/trunk/ucsd/kono/bingo3/nbproject/project.properties
csplugins/trunk/ucsd/kono/bingo3/nbproject/project.xml
csplugins/trunk/ucsd/kono/bingo3/src/BiNGO/BingoAlgorithm.java
csplugins/trunk/ucsd/kono/bingo3/src/BiNGO/BinomialTestCalculate.java
csplugins/trunk/ucsd/kono/bingo3/src/BiNGO/BinomialTestCalculateUnder.java
csplugins/trunk/ucsd/kono/bingo3/src/BiNGO/CalculateTestTask.java
csplugins/trunk/ucsd/kono/bingo3/src/BiNGO/DisplayBiNGOWindow.java
csplugins/trunk/ucsd/kono/bingo3/src/BiNGO/DistributionCount.java
csplugins/trunk/ucsd/kono/bingo3/src/BiNGO/HypergeometricTestCalculate.java
csplugins/trunk/ucsd/kono/bingo3/src/BiNGO/HypergeometricTestCalculateUnder.java
csplugins/trunk/ucsd/kono/bingo3/src/BiNGO/ParentChildIntersectionCount.java
csplugins/trunk/ucsd/kono/bingo3/src/BiNGO/SettingsPanel.java
csplugins/trunk/ucsd/kono/bingo3/src/BiNGO/SettingsPanelActionListener.java
csplugins/trunk/ucsd/kono/bingo3/src/BiNGO/TheVisualStyle.java
Log:
First version of Bingo for Cytoscape 3.
Deleted:
csplugins/trunk/ucsd/kono/bingo3/lib/plugin-api-3.0.0-alpha8-SNAPSHOT-jar-with-dependencies.jar
===================================================================
(Binary files differ)
Modified: csplugins/trunk/ucsd/kono/bingo3/manifest.mf
===================================================================
--- csplugins/trunk/ucsd/kono/bingo3/manifest.mf 2011-11-02 21:14:36 UTC
(rev 27382)
+++ csplugins/trunk/ucsd/kono/bingo3/manifest.mf 2011-11-02 22:36:32 UTC
(rev 27383)
@@ -1 +1,4 @@
+Manifest-Version: 1.0
+Class-Path: *
Cytoscape-Plugin: BiNGO.BiNGOplugin
+
Modified: csplugins/trunk/ucsd/kono/bingo3/nbproject/build-impl.xml
===================================================================
--- csplugins/trunk/ucsd/kono/bingo3/nbproject/build-impl.xml 2011-11-02
21:14:36 UTC (rev 27382)
+++ csplugins/trunk/ucsd/kono/bingo3/nbproject/build-impl.xml 2011-11-02
22:36:32 UTC (rev 27383)
@@ -142,6 +142,7 @@
<or>
<available file="${src.dir}"/>
<available file="${src.resources.dir}"/>
+ <available file="${src.lib.dir}"/>
</or>
</condition>
<condition property="netbeans.home+have.tests">
@@ -209,6 +210,7 @@
<target
depends="-pre-init,-init-private,-init-user,-init-project,-do-init"
name="-init-check">
<fail unless="src.dir">Must set src.dir</fail>
<fail unless="src.resources.dir">Must set src.resources.dir</fail>
+ <fail unless="src.lib.dir">Must set src.lib.dir</fail>
<fail unless="test.src.dir">Must set test.src.dir</fail>
<fail unless="build.dir">Must set build.dir</fail>
<fail unless="dist.dir">Must set dist.dir</fail>
@@ -230,7 +232,7 @@
</target>
<target depends="-init-ap-cmdline-properties" if="ap.supported.internal"
name="-init-macrodef-javac-with-processors">
<macrodef name="javac" uri="http://www.netbeans.org/ns/j2se-project/3">
- <attribute default="${src.dir}:${src.resources.dir}"
name="srcdir"/>
+ <attribute
default="${src.dir}:${src.resources.dir}:${src.lib.dir}" name="srcdir"/>
<attribute default="${build.classes.dir}" name="destdir"/>
<attribute default="${javac.classpath}" name="classpath"/>
<attribute default="${javac.processorpath}" name="processorpath"/>
@@ -270,7 +272,7 @@
</target>
<target depends="-init-ap-cmdline-properties"
name="-init-macrodef-javac-without-processors" unless="ap.supported.internal">
<macrodef name="javac" uri="http://www.netbeans.org/ns/j2se-project/3">
- <attribute default="${src.dir}:${src.resources.dir}"
name="srcdir"/>
+ <attribute
default="${src.dir}:${src.resources.dir}:${src.lib.dir}" name="srcdir"/>
<attribute default="${build.classes.dir}" name="destdir"/>
<attribute default="${javac.classpath}" name="classpath"/>
<attribute default="${javac.processorpath}" name="processorpath"/>
@@ -302,7 +304,7 @@
</target>
<target
depends="-init-macrodef-javac-with-processors,-init-macrodef-javac-without-processors"
name="-init-macrodef-javac">
<macrodef name="depend"
uri="http://www.netbeans.org/ns/j2se-project/3">
- <attribute default="${src.dir}:${src.resources.dir}"
name="srcdir"/>
+ <attribute
default="${src.dir}:${src.resources.dir}:${src.lib.dir}" name="srcdir"/>
<attribute default="${build.classes.dir}" name="destdir"/>
<attribute default="${javac.classpath}" name="classpath"/>
<sequential>
@@ -601,13 +603,14 @@
<include name="*"/>
</dirset>
</pathconvert>
- <j2seproject3:depend
srcdir="${src.dir}:${src.resources.dir}:${build.generated.subdirs}"/>
+ <j2seproject3:depend
srcdir="${src.dir}:${src.resources.dir}:${src.lib.dir}:${build.generated.subdirs}"/>
</target>
<target depends="init,deps-jar,-pre-pre-compile,-pre-compile,
-copy-persistence-xml,-compile-depend" if="have.sources" name="-do-compile">
<j2seproject3:javac gensrcdir="${build.generated.sources.dir}"/>
<copy todir="${build.classes.dir}">
<fileset dir="${src.dir}"
excludes="${build.classes.excludes},${excludes}" includes="${includes}"/>
<fileset dir="${src.resources.dir}"
excludes="${build.classes.excludes},${excludes}" includes="${includes}"/>
+ <fileset dir="${src.lib.dir}"
excludes="${build.classes.excludes},${excludes}" includes="${includes}"/>
</copy>
</target>
<target if="has.persistence.xml" name="-copy-persistence-xml">
@@ -628,7 +631,7 @@
<target depends="init,deps-jar,-pre-pre-compile" name="-do-compile-single">
<fail unless="javac.includes">Must select some files in the IDE or set
javac.includes</fail>
<j2seproject3:force-recompile/>
- <j2seproject3:javac excludes=""
gensrcdir="${build.generated.sources.dir}" includes="${javac.includes}"
sourcepath="${src.dir}:${src.resources.dir}"/>
+ <j2seproject3:javac excludes=""
gensrcdir="${build.generated.sources.dir}" includes="${javac.includes}"
sourcepath="${src.dir}:${src.resources.dir}:${src.lib.dir}"/>
</target>
<target name="-post-compile-single">
<!-- Empty placeholder for easier customization. -->
@@ -854,6 +857,9 @@
<fileset dir="${src.resources.dir}" excludes="*.java,${excludes}"
includes="${includes}">
<filename name="**/*.java"/>
</fileset>
+ <fileset dir="${src.lib.dir}" excludes="*.java,${excludes}"
includes="${includes}">
+ <filename name="**/*.java"/>
+ </fileset>
<fileset dir="${build.generated.sources.dir}"
erroronmissingdir="false">
<include name="**/*.java"/>
<exclude name="*.java"/>
@@ -866,6 +872,9 @@
<fileset dir="${src.resources.dir}" excludes="${excludes}"
includes="${includes}">
<filename name="**/doc-files/**"/>
</fileset>
+ <fileset dir="${src.lib.dir}" excludes="${excludes}"
includes="${includes}">
+ <filename name="**/doc-files/**"/>
+ </fileset>
<fileset dir="${build.generated.sources.dir}"
erroronmissingdir="false">
<include name="**/doc-files/**"/>
</fileset>
Modified: csplugins/trunk/ucsd/kono/bingo3/nbproject/genfiles.properties
===================================================================
--- csplugins/trunk/ucsd/kono/bingo3/nbproject/genfiles.properties
2011-11-02 21:14:36 UTC (rev 27382)
+++ csplugins/trunk/ucsd/kono/bingo3/nbproject/genfiles.properties
2011-11-02 22:36:32 UTC (rev 27383)
@@ -1,8 +1,8 @@
-build.xml.data.CRC32=b1d01065
+build.xml.data.CRC32=07104f27
build.xml.script.CRC32=4642fb0d
[email protected]
# This file is used by a NetBeans-based IDE to track changes in generated
files such as build-impl.xml.
# Do not edit this file. You may delete it but then the IDE will never
regenerate such files for you.
-nbproject/build-impl.xml.data.CRC32=b1d01065
-nbproject/build-impl.xml.script.CRC32=1420ab4f
+nbproject/build-impl.xml.data.CRC32=07104f27
+nbproject/build-impl.xml.script.CRC32=4f266269
nbproject/[email protected]
Modified: csplugins/trunk/ucsd/kono/bingo3/nbproject/project.properties
===================================================================
--- csplugins/trunk/ucsd/kono/bingo3/nbproject/project.properties
2011-11-02 21:14:36 UTC (rev 27382)
+++ csplugins/trunk/ucsd/kono/bingo3/nbproject/project.properties
2011-11-02 22:36:32 UTC (rev 27383)
@@ -25,9 +25,11 @@
excludes=
file.reference.colt.jar-1=lib/colt.jar
file.reference.concurrent.jar=lib/concurrent.jar
-file.reference.plugin-api-3.0.0-alpha8-SNAPSHOT-jar-with-dependencies.jar=lib/plugin-api-3.0.0-alpha8-SNAPSHOT-jar-with-dependencies.jar
+file.reference.plugin-api-3.0.0-alpha8-SNAPSHOT-jar-with-dependencies.jar=/Users/kono/Documents/workspaceC3M3/project/api/plugin-api/target/plugin-api-3.0.0-alpha8-SNAPSHOT-jar-with-dependencies.jar
includes=**
+jar.archive.disabled=${jnlp.enabled}
jar.compress=true
+jar.index=${jnlp.enabled}
javac.classpath=\
${file.reference.colt.jar-1}:\
${file.reference.concurrent.jar}:\
@@ -37,12 +39,11 @@
javac.deprecation=false
javac.processorpath=\
${javac.classpath}
-javac.source=1.5
-javac.target=1.5
+javac.source=1.6
+javac.target=1.6
javac.test.classpath=\
${javac.classpath}:\
${build.classes.dir}:\
- ${libs.junit.classpath}:\
${libs.junit_4.classpath}
javadoc.additionalparam=
javadoc.author=false
@@ -55,10 +56,19 @@
javadoc.use=true
javadoc.version=false
javadoc.windowtitle=
+jnlp.codebase.type=no.codebase
+jnlp.descriptor=application
+jnlp.enabled=false
+jnlp.mixed.code=default
+jnlp.offline-allowed=false
+jnlp.signed=false
+jnlp.signing=
+jnlp.signing.alias=
+jnlp.signing.keystore=
main.class=
manifest.file=manifest.mf
meta.inf.dir=${src.dir}/META-INF
-mkdist.disabled=false
+mkdist.disabled=true
platform.active=default_platform
run.classpath=\
${javac.classpath}:\
@@ -72,5 +82,6 @@
${build.test.classes.dir}
source.encoding=UTF-8
src.dir=src
+src.lib.dir=lib
src.resources.dir=resources
test.src.dir=test
Modified: csplugins/trunk/ucsd/kono/bingo3/nbproject/project.xml
===================================================================
--- csplugins/trunk/ucsd/kono/bingo3/nbproject/project.xml 2011-11-02
21:14:36 UTC (rev 27382)
+++ csplugins/trunk/ucsd/kono/bingo3/nbproject/project.xml 2011-11-02
22:36:32 UTC (rev 27383)
@@ -8,6 +8,7 @@
<source-roots>
<root id="src.dir"/>
<root id="src.resources.dir"/>
+ <root id="src.lib.dir"/>
</source-roots>
<test-roots>
<root id="test.src.dir"/>
Modified: csplugins/trunk/ucsd/kono/bingo3/src/BiNGO/BingoAlgorithm.java
===================================================================
--- csplugins/trunk/ucsd/kono/bingo3/src/BiNGO/BingoAlgorithm.java
2011-11-02 21:14:36 UTC (rev 27382)
+++ csplugins/trunk/ucsd/kono/bingo3/src/BiNGO/BingoAlgorithm.java
2011-11-02 22:36:32 UTC (rev 27383)
@@ -3,6 +3,8 @@
import java.util.HashMap;
import java.util.Map;
+import org.cytoscape.work.TaskMonitor;
+
/**
* Created by User: risserlin Date: Jun 13, 2006 Time: 1:00:50 PM
*/
@@ -61,7 +63,7 @@
this.params = params;
}
- public CalculateTestTask calculate_distribution() {
+ public CalculateTestTask calculate_distribution(TaskMonitor tm) throws
InterruptedException {
CalculateTestTask test = null;
HashMap testMap = null;
@@ -71,39 +73,27 @@
} else if (params.getTest().equals(HYPERGEOMETRIC)) {
if (params.getOverOrUnder().equals(OVERSTRING)) {
test = new HypergeometricTestCalculate(new
StandardDistributionCount(params.getAnnotation(),
- params.getOntology(),
params.getSelectedNodes(), params.getAllNodes(), params.getAlias()));
+ params.getOntology(),
params.getSelectedNodes(), params.getAllNodes(), params.getAlias()), tm);
} else {
test = new HypergeometricTestCalculateUnder(new
StandardDistributionCountNeg(params.getAnnotation(),
- params.getOntology(),
params.getSelectedNodes(), params.getAllNodes(), params.getAlias()));
+ params.getOntology(),
params.getSelectedNodes(), params.getAllNodes(), params.getAlias()), tm);
}
} else if (params.getTest().equals(BINOMIAL)) {
if (params.getOverOrUnder().equals(OVERSTRING)) {
test = new BinomialTestCalculate(new
StandardDistributionCount(params.getAnnotation(),
- params.getOntology(),
params.getSelectedNodes(), params.getAllNodes(), params.getAlias()));
+ params.getOntology(),
params.getSelectedNodes(), params.getAllNodes(), params.getAlias()), tm);
} else {
test = new BinomialTestCalculateUnder(new
StandardDistributionCountNeg(params.getAnnotation(),
- params.getOntology(),
params.getSelectedNodes(), params.getAllNodes(), params.getAlias()));
+ params.getOntology(),
params.getSelectedNodes(), params.getAllNodes(), params.getAlias()), tm);
}
} else if (params.getTest().equals(PARENT_CHILD_INTERSECTION)) {
if (params.getOverOrUnder().equals(OVERSTRING)) {
test = new HypergeometricTestCalculate(new
ParentChildIntersectionCount(params.getAnnotation(),
- params.getOntology(),
params.getSelectedNodes(), params.getAllNodes(), params.getAlias()));
+ params.getOntology(),
params.getSelectedNodes(), params.getAllNodes(), params.getAlias(), tm), tm);
} else {
// to be implemented
}
}
-
- // Configure JTask
- /*
- * JTaskConfig config = new JTaskConfig();
- *
- * // Show Cancel/Close Buttons
config.displayCancelButton(true);
- * config.displayStatus(true);
- */
- // Execute Task via TaskManager
- // This automatically pops-open a JTask Dialog Box.
- // This method will block until the JTask Dialog Box is
disposed.
- // boolean success = TaskManager.executeTask(test, config);
return test;
}
@@ -120,19 +110,6 @@
} else {
correctionMap = null;
}
- // Configure JTask
- /*
- * JTaskConfig config = new JTaskConfig();
- *
- * // Show Cancel/Close Buttons
config.displayCancelButton(true);
- * config.displayStatus(true);
- */
-
- // Execute Task via TaskManager
- // This automatically pops-open a JTask Dialog Box.
- // This method will block until the JTask Dialog Box is
disposed.
- // only perform if a correction method has been chosen
-
}
return correction;
}
Modified: csplugins/trunk/ucsd/kono/bingo3/src/BiNGO/BinomialTestCalculate.java
===================================================================
--- csplugins/trunk/ucsd/kono/bingo3/src/BiNGO/BinomialTestCalculate.java
2011-11-02 21:14:36 UTC (rev 27382)
+++ csplugins/trunk/ucsd/kono/bingo3/src/BiNGO/BinomialTestCalculate.java
2011-11-02 22:36:32 UTC (rev 27383)
@@ -86,8 +86,11 @@
* constructor with as arguments the selected cluster, the reference set
* (from graph or annotation file), the annotation, the ontology and the
* significance threshold.
+ * @throws InterruptedException
*/
- public BinomialTestCalculate(DistributionCount dc) {
+ public BinomialTestCalculate(DistributionCount dc, TaskMonitor tm)
throws InterruptedException {
+ taskMonitor = tm;
+ taskMonitor.setTitle("Calculating Binomial Distribution");
// calculates x (#genes in selection assigned to each GO
class), X
// (total #genes in selection),
// n (# genes in reference set assigned to each GO class) and N
(total #
@@ -100,11 +103,6 @@
this.maxValue = mapSmallX.size();
}
-
-// public void run(TaskMonitor tm) throws Exception {
-// this.taskMonitor = tm;
-// calculate();
-// }
public void cancel() {
this.interrupted = true;
@@ -118,7 +116,7 @@
* @throws InterruptedException
*/
public void calculate() throws InterruptedException {
-
+
BinomialDistribution bt;
binomialTestMap = new HashMap<Integer, String>();
@@ -197,33 +195,4 @@
return mapBigN;
}
- /**
- * Non-blocking call to interrupt the task.
- */
- public void halt() {
-
- }
-
- /**
- * Sets the Task Monitor.
- *
- * @param taskMonitor
- * TaskMonitor Object.
- */
- public void setTaskMonitor(TaskMonitor taskMonitor) {
- if (this.taskMonitor != null) {
- throw new IllegalStateException("Task Monitor is
already set.");
- }
- this.taskMonitor = taskMonitor;
- }
-
- /**
- * Gets the Task Title.
- *
- * @return human readable task title.
- */
- public String getTitle() {
- return new String("Calculating Binomial Distribution");
- }
-
}
Modified:
csplugins/trunk/ucsd/kono/bingo3/src/BiNGO/BinomialTestCalculateUnder.java
===================================================================
--- csplugins/trunk/ucsd/kono/bingo3/src/BiNGO/BinomialTestCalculateUnder.java
2011-11-02 21:14:36 UTC (rev 27382)
+++ csplugins/trunk/ucsd/kono/bingo3/src/BiNGO/BinomialTestCalculateUnder.java
2011-11-02 22:36:32 UTC (rev 27383)
@@ -88,9 +88,11 @@
* constructor with as arguments the selected cluster, the reference set
* (from graph or annotation file), the annotation, the ontology and the
* significance threshold.
+ * @throws InterruptedException
*/
- public BinomialTestCalculateUnder(DistributionCount dc) {
-
+ public BinomialTestCalculateUnder(DistributionCount dc, TaskMonitor tm)
throws InterruptedException {
+ this.taskMonitor = tm;
+ this.taskMonitor.setTitle("Calculating Binomial Distribution");
// calculates x (#genes in selection assigned to each GO
class), X
// (total #genes in selection),
// n (# genes in reference set assigned to each GO class) and N
(total #
@@ -110,7 +112,6 @@
* @throws InterruptedException
*/
public void calculate() throws InterruptedException {
-
BinomialDistributionUnder bt;
binomialTestMap = new HashMap();
@@ -188,11 +189,4 @@
public void cancel() {
this.interrupted = true;
}
-
- public void run(TaskMonitor tm) throws Exception {
- this.taskMonitor = tm;
- this.taskMonitor.setTitle("Calculating Binomial Distribution");
- calculate();
- }
-
}
Modified: csplugins/trunk/ucsd/kono/bingo3/src/BiNGO/CalculateTestTask.java
===================================================================
--- csplugins/trunk/ucsd/kono/bingo3/src/BiNGO/CalculateTestTask.java
2011-11-02 21:14:36 UTC (rev 27382)
+++ csplugins/trunk/ucsd/kono/bingo3/src/BiNGO/CalculateTestTask.java
2011-11-02 22:36:32 UTC (rev 27383)
@@ -35,6 +35,8 @@
import java.util.Map;
+import org.cytoscape.work.TaskMonitor;
+
/**
* Classes that perform statistical tests can implement this interface so that
* they can be monitored by a GUI like a
Modified: csplugins/trunk/ucsd/kono/bingo3/src/BiNGO/DisplayBiNGOWindow.java
===================================================================
--- csplugins/trunk/ucsd/kono/bingo3/src/BiNGO/DisplayBiNGOWindow.java
2011-11-02 21:14:36 UTC (rev 27382)
+++ csplugins/trunk/ucsd/kono/bingo3/src/BiNGO/DisplayBiNGOWindow.java
2011-11-02 22:36:32 UTC (rev 27383)
@@ -223,67 +223,6 @@
final TaskManager tm = adapter.getTaskManager();
tm.execute(new GenericTaskFactory(new CreateViewTask(network)));
- // final CyNetworkViewFactory viewFactory =
- // adapter.getCyNetworkViewFactory();
- // final CyNetworkView bingoCyNetworkView =
- // viewFactory.getNetworkView(network);
- //
- // // from MCODE plugin, MCODEResultsDialog class layout graph
and fit
- // it to window
- // // randomize node positions before layout so that they don't
all
- // layout in a line
- // // (so they don't fall into a local minimum for the
SpringEmbedder)
- // // If the SpringEmbedder implementation changes, this code
may need
- // to
- // // be removed
- // final Collection<View<CyNode>> nodeViews =
- // bingoCyNetworkView.getNodeViews();
- // for (final View<CyNode> nv:nodeViews) {
- // nv.setXPosition(nv.getXPosition() * Math.random());
- // // height is small for many default drawn graphs, thus +100
- // nv.setYPosition((nv.getYPosition() + 100) * Math.random());
- // }
- //
- // // apply spring embedded layout...
- // SpringEmbeddedLayouter spring = new
- // SpringEmbeddedLayouter(bingoCyNetworkView);
- // // Configure JTask
- // JTaskConfig config = new JTaskConfig();
- //
- // // Show Cancel/Close Buttons
- // config.displayCancelButton(true);
- // config.displayStatus(true);
- //
- // // Execute Task via TaskManager
- // // This automatically pops-open a JTask Dialog Box.
- // // This method will block until the JTask Dialog Box is
disposed.
- // boolean success = TaskManager.executeTask(spring, config);
-
- // Cytoscape.getDesktop().toFront();
- // bingoCyNetworkView.fitContent();
- // // create visual style with ID dependent on clusterName
- // TheVisualStyle vs = new TheVisualStyle(clusterName, (new
- // Double(alpha)).doubleValue());
- // VisualStyle visualStyle = vs.createVisualStyle(network);
- // CytoscapeDesktop cytoscapedesktop = Cytoscape.getDesktop();
- // VisualMappingManager vmm =
Cytoscape.getVisualMappingManager();
- // try {
- // vmm.getCalculatorCatalog().addVisualStyle(visualStyle);
- // // VisualStyle oldStyle =
vmm.setVisualStyle(visualStyle.getName());
- // bingoCyNetworkView.applyVizmapper(visualStyle);
- // // bingoCyNetworkView.setVisualStyle(visualStyle.getName());
- // } catch (Exception e) {
- // JOptionPane.showMessageDialog(cytoscapedesktop,
- // "A visual style already exists for the cluster name you
specified." +
- // "\n"
- // + "The existing style will be overwritten.");
- //
vs.adaptVisualStyle(vmm.getCalculatorCatalog().getVisualStyle(visualStyle.getName()),
- // network);
- // // VisualStyle oldStyle =
vmm.setVisualStyle(visualStyle.getName());
- //
bingoCyNetworkView.applyVizmapper(vmm.getCalculatorCatalog().getVisualStyle(visualStyle.getName()));
- // // bingoCyNetworkView.setVisualStyle(visualStyle.getName());
- // }
-
// add color scale panel
JFrame window = new JFrame(clusterName + " Color Scale");
String alpha1 = SignificantFigures.sci_format(alpha, 3);
Modified: csplugins/trunk/ucsd/kono/bingo3/src/BiNGO/DistributionCount.java
===================================================================
--- csplugins/trunk/ucsd/kono/bingo3/src/BiNGO/DistributionCount.java
2011-11-02 21:14:36 UTC (rev 27382)
+++ csplugins/trunk/ucsd/kono/bingo3/src/BiNGO/DistributionCount.java
2011-11-02 22:36:32 UTC (rev 27383)
@@ -51,6 +51,4 @@
*/
void countBigX();
- void calculate();
-
}
Modified:
csplugins/trunk/ucsd/kono/bingo3/src/BiNGO/HypergeometricTestCalculate.java
===================================================================
--- csplugins/trunk/ucsd/kono/bingo3/src/BiNGO/HypergeometricTestCalculate.java
2011-11-02 21:14:36 UTC (rev 27382)
+++ csplugins/trunk/ucsd/kono/bingo3/src/BiNGO/HypergeometricTestCalculate.java
2011-11-02 22:36:32 UTC (rev 27383)
@@ -82,8 +82,11 @@
/**
* constructor with as argument the selected cluster and the annotation,
* ontology and alpha.
+ * @throws InterruptedException
*/
- public HypergeometricTestCalculate(DistributionCount dc) {
+ public HypergeometricTestCalculate(DistributionCount dc, TaskMonitor
tm) throws InterruptedException {
+ this.taskMonitor = tm;
+ this.taskMonitor.setTitle("Calculating Hypergeometric
Distribution");
dc.calculate();
this.mapSmallN = dc.getMapSmallN();
this.mapSmallX = dc.getMapSmallX();
@@ -98,7 +101,6 @@
* @throws InterruptedException
*/
public void calculate() throws InterruptedException {
-
HypergeometricDistribution hd;
hypergeometricTestMap = new HashMap();
@@ -177,10 +179,4 @@
public void cancel() {
this.interrupted = true;
}
-
- public void run(TaskMonitor tm) throws Exception {
- this.taskMonitor = tm;
- this.taskMonitor.setTitle("Calculating Hypergeometric
Distribution");
- calculate();
- }
}
Modified:
csplugins/trunk/ucsd/kono/bingo3/src/BiNGO/HypergeometricTestCalculateUnder.java
===================================================================
---
csplugins/trunk/ucsd/kono/bingo3/src/BiNGO/HypergeometricTestCalculateUnder.java
2011-11-02 21:14:36 UTC (rev 27382)
+++
csplugins/trunk/ucsd/kono/bingo3/src/BiNGO/HypergeometricTestCalculateUnder.java
2011-11-02 22:36:32 UTC (rev 27383)
@@ -90,9 +90,11 @@
/**
* constructor with as argument the selected cluster and the annotation,
* ontology and alpha.
+ * @throws InterruptedException
*/
- public HypergeometricTestCalculateUnder(DistributionCount dc) {
-
+ public HypergeometricTestCalculateUnder(DistributionCount dc,
TaskMonitor tm) throws InterruptedException {
+ this.taskMonitor = tm;
+ this.taskMonitor.setTitle("Calculating Hypergeometric
Distribution");
dc.calculate();
this.mapSmallN = dc.getMapSmallN();
this.mapSmallX = dc.getMapSmallX();
@@ -108,6 +110,7 @@
* @throws InterruptedException
*/
public void calculate() throws InterruptedException {
+
HypergeometricDistributionUnder hd;
hypergeometricTestMap = new HashMap();
@@ -205,11 +208,4 @@
public void cancel() {
this.interrupted = true;
}
-
- public void run(TaskMonitor tm) throws Exception {
- this.taskMonitor = tm;
- this.taskMonitor.setTitle("Calculating Hypergeometric
Distribution");
- calculate();
- }
-
}
Modified:
csplugins/trunk/ucsd/kono/bingo3/src/BiNGO/ParentChildIntersectionCount.java
===================================================================
---
csplugins/trunk/ucsd/kono/bingo3/src/BiNGO/ParentChildIntersectionCount.java
2011-11-02 21:14:36 UTC (rev 27382)
+++
csplugins/trunk/ucsd/kono/bingo3/src/BiNGO/ParentChildIntersectionCount.java
2011-11-02 22:36:32 UTC (rev 27383)
@@ -97,7 +97,10 @@
private boolean interrupted = false;
- public ParentChildIntersectionCount(Annotation annotation, Ontology
ontology, Set selectedNodes, Set refNodes, Map alias) {
+ public ParentChildIntersectionCount(Annotation annotation, Ontology
ontology, Set selectedNodes, Set refNodes, Map alias, TaskMonitor tm) {
+ this.taskMonitor = tm;
+ tm.setTitle("Counting genes in GO categories...");
+
this.annotation = annotation;
this.ontology = ontology;
this.alias = alias;
@@ -137,17 +140,6 @@
}
/**
- * method for recursing through tree to root
- */
-
- /*
- * public void up (int goID, HashSet classifications){ OntologyTerm
child =
- * ontology.getTerm(goID); int [] parents =
child.getParentsAndContainers
- * (); for(int t = 0; t < parents.length; t++){
- * classifications.add(parents[t] + "");
up(parents[t],classifications); } }
- */
-
- /**
* method for making the hashmap for small n.
*/
public void countSmallN() {
@@ -289,10 +281,4 @@
public void cancel() {
this.interrupted = true;
}
-
-// public void run(TaskMonitor tm) throws Exception {
-// this.taskMonitor = tm;
-// tm.setTitle("Counting genes in GO categories...");
-// calculate();
-// }
}
Modified: csplugins/trunk/ucsd/kono/bingo3/src/BiNGO/SettingsPanel.java
===================================================================
--- csplugins/trunk/ucsd/kono/bingo3/src/BiNGO/SettingsPanel.java
2011-11-02 21:14:36 UTC (rev 27382)
+++ csplugins/trunk/ucsd/kono/bingo3/src/BiNGO/SettingsPanel.java
2011-11-02 22:36:32 UTC (rev 27383)
@@ -350,14 +350,6 @@
gridbag.setConstraints(clusterVsPanel, c);
add(clusterVsPanel);
- /*
- * if (bdsAnnot.isThereAnnotInMemorie()){ JLabel jl = new
- * JLabel("Use Annotation/Ontology of BioDataServer in Memory
:");
- * gridbag.setConstraints(jl, c); add(jl);
- *
- * gridbag.setConstraints(bdsAnnot, c); add(bdsAnnot); }
- */
-
gridbag.setConstraints(ontologyLabel, c);
add(ontologyLabel);
Modified:
csplugins/trunk/ucsd/kono/bingo3/src/BiNGO/SettingsPanelActionListener.java
===================================================================
--- csplugins/trunk/ucsd/kono/bingo3/src/BiNGO/SettingsPanelActionListener.java
2011-11-02 21:14:36 UTC (rev 27382)
+++ csplugins/trunk/ucsd/kono/bingo3/src/BiNGO/SettingsPanelActionListener.java
2011-11-02 22:36:32 UTC (rev 27383)
@@ -106,9 +106,12 @@
/**
* constant string for the none-label in the combobox.
*/
- private final String CATEGORY_BEFORE_CORRECTION =
BingoAlgorithm.CATEGORY_BEFORE_CORRECTION;
- private final String CATEGORY_CORRECTION =
BingoAlgorithm.CATEGORY_CORRECTION;
+ private static final String CATEGORY_BEFORE_CORRECTION =
BingoAlgorithm.CATEGORY_BEFORE_CORRECTION;
+ private static final String CATEGORY_CORRECTION =
BingoAlgorithm.CATEGORY_CORRECTION;
+
+ private TaskMonitor tMonitor;
+
/**
* Constructor with all the settings of the settingspanel as arguments.
*/
@@ -281,6 +284,7 @@
"Some genes in the text input panel are not defined in the reference set.
Please check your input settings"
+ "\n");
}
+
if (consistencyCheck) {
int[] testData
= getClassificationsFromVector(params.getSelectedNodes(),
noClassificationsSet);
@@ -934,79 +938,6 @@
// Execute task here!
final TaskManager tm = adapter.getTaskManager();
tm.execute(new GenericTaskFactory(calc));
-
-// Map testMap = null;
-// Map correctionMap = null;
-// Map mapSmallX = null;
-// Map mapSmallN = null;
-// Map mapBigX = null;
-// Map mapBigN = null;
-//
-// BingoAlgorithm algorithm = new BingoAlgorithm(params);
-// CalculateTestTask test = algorithm.calculate_distribution();
-//
-// // Execute task here!
-// final TaskManager tm = adapter.getTaskManager();
-// tm.execute(new GenericTaskFactory(test));
-//
-// testMap = test.getTestMap();
-// CalculateCorrectionTask correction =
algorithm.calculate_corrections(testMap);
-//
-// if ((correction != null) && (!params.getTest().equals(NONE))) {
-// tm.execute(new GenericTaskFactory(correction));
-// correctionMap = correction.getCorrectionMap();
-// }
-// mapSmallX = test.getMapSmallX();
-// mapSmallN = test.getMapSmallN();
-// mapBigX = test.getMapBigX();
-// mapBigN = test.getMapBigN();
-//
-// DisplayBiNGOWindow display;
-// CreateBiNGOFile file;
-//
-// if (params.getVisualization().equals(VIZSTRING)) {
-// display = new DisplayBiNGOWindow(testMap,
correctionMap, mapSmallX, mapSmallN, mapBigX, mapBigN, params
-// .getSignificance().toString(),
params.getOntology(), params.getCluster_name(), params.getCategory()
-// + "", adapter);
-//
-// // displaying the BiNGO CyNetwork.
-// display.makeWindow();
-// }
-// if ((goBin == null) || goBin.isWindowClosed()) {
-// goBin = new BiNGO.GOlorize.GoBin(settingsPanel,
startNetworkView);
-// }
-//
-// if (params.getAnnotationFile() == null) {
-// params.setAnnotationFile("Cytoscape loaded annotation:
" + params.getAnnotation().toString());
-// }
-//
-// if (params.getOntologyFile() == null) {
-// params.setOntologyFile("Cytoscape loaded ontology: " +
params.getOntology().toString());
-// }
-//
-// goBin.createResultTab(testMap, correctionMap, mapSmallX,
mapSmallN, mapBigX, mapBigN, params.getSignificance()
-// .toString(), params.getAnnotation(),
params.getAlias(), params.getOntology(), params
-// .getAnnotationFile().toString(),
params.getOntologyFile().toString(), params.getTest() + "",
-// params.getCorrection() + "",
params.getOverOrUnder() + "", params.getFileoutput_dir(),
-// params.getCluster_name() + ".bgo",
params.getReferenceSet() + "", params.getCategory() + "",
-// selectedNodes, startNetwork, startNetworkView);
-//
-// if (params.isFileoutput()) {
-// file = new CreateBiNGOFile(testMap, correctionMap,
mapSmallX, mapSmallN, mapBigX, mapBigN, params
-// .getSignificance().toString(),
params.getAnnotation(), params.getDeleteCodes(), params.getAlias(),
-// params.getOntology(),
params.getAnnotationFile().toString(), params.getOntologyFile().toString(),
-// params.getTest() + "",
params.getCorrection() + "", params.getOverOrUnder() + "",
-// params.getFileoutput_dir(),
params.getCluster_name() + ".bgo", params.getReferenceSet() + "",
-// params.getCategory() + "",
selectedNodes, noClassificationsSet);
-// file.makeFile();
-//
-// if (params.getTest().equals(NONE) &&
params.getCorrection().equals(NONE)) {
-// CreateAnnotationFile file2 = new
CreateAnnotationFile(params.getAnnotation(), params.getAlias(),
-// params.getOntology(),
params.getFileoutput_dir(), params.getCluster_name() + ".anno",
-// selectedNodes);
-// file2.makeFile();
-// }
-// }
}
private final class PostProcessTask extends AbstractTask {
@@ -1031,7 +962,7 @@
Map mapBigN = null;
BingoAlgorithm algorithm = new BingoAlgorithm(params);
- CalculateTestTask test =
algorithm.calculate_distribution();
+ CalculateTestTask test =
algorithm.calculate_distribution(tm);
test.calculate();
testMap = test.getTestMap();
Modified: csplugins/trunk/ucsd/kono/bingo3/src/BiNGO/TheVisualStyle.java
===================================================================
--- csplugins/trunk/ucsd/kono/bingo3/src/BiNGO/TheVisualStyle.java
2011-11-02 21:14:36 UTC (rev 27382)
+++ csplugins/trunk/ucsd/kono/bingo3/src/BiNGO/TheVisualStyle.java
2011-11-02 22:36:32 UTC (rev 27383)
@@ -104,7 +104,7 @@
//FIXME
// style.getDependency().set(Definition.NODE_SIZE_LOCKED, true);
- style.setDefaultValue(RichVisualLexicon.NODE_LABEL_FONT_SIZE,
14);
+ style.setDefaultValue(RichVisualLexicon.NODE_LABEL_FONT_SIZE,
11);
style.setDefaultValue(RichVisualLexicon.NODE_WIDTH, 40d);
style.setDefaultValue(RichVisualLexicon.NODE_HEIGHT, 40d);
style.setDefaultValue(RichVisualLexicon.NODE_BORDER_WIDTH, 2d);
@@ -114,7 +114,8 @@
//
style.getNodeAppearanceCalculator().getDefaultAppearance().set(VisualPropertyType.NODE_BORDER_OPACITY,
120);
// Edge default appearence definitions
- //FIXME
+
+ //FIXME: These are DING-dependent VP
// style.getEdgeAppearanceCalculator().getDefaultAppearance().set(
// VisualPropertyType.EDGE_TGTARROW_SHAPE,
ArrowShape.DELTA);
// style.getEdgeAppearanceCalculator().getDefaultAppearance().set(
@@ -123,8 +124,10 @@
// VisualPropertyType.EDGE_SRCARROW_SHAPE,
ArrowShape.NONE);
style.setDefaultValue(RichVisualLexicon.EDGE_LINE_TYPE,
LineTypeVisualProperty.SOLID);
- style.setDefaultValue(RichVisualLexicon.EDGE_WIDTH, 4d);
+ style.setDefaultValue(RichVisualLexicon.EDGE_WIDTH, 2d);
style.setDefaultValue(RichVisualLexicon.EDGE_STROKE_UNSELECTED_PAINT,
Color.DARK_GRAY);
+ style.setDefaultValue(RichVisualLexicon.EDGE_TRANSPARENCY, 190);
+
style.setDefaultValue(RichVisualLexicon.NETWORK_BACKGROUND_PAINT, Color.WHITE);
// Display NODE_LABEL as a label
@@ -145,41 +148,24 @@
double cols2 = -(Math.log(alpha) / Math.log(10)) + 5.0;
final BoundaryRangeValues<Paint> colbrVal2 = new
BoundaryRangeValues<Paint>(COL_MAX, COL_MAX, COL_MAX);
- // FIXME This section should be called, but never happens.
if (nodeColorMapping instanceof ContinuousMapping) {
- System.out.println("##### This is ContinuousMapping");
((ContinuousMapping<Double, Paint>)
nodeColorMapping).addPoint(cols1, colbrVal1);
((ContinuousMapping<Double, Paint>)
nodeColorMapping).addPoint(cols2, colbrVal2);
}
-// // Node Size Mapping
-// //TODO: Update when 2.8 released.
-// final ContinuousMapping wMapping = new ContinuousMapping(
-// DEF_NODE_SIZE, ObjectMapping.NODE_MAPPING);
-// wMapping.setControllingAttributeName(NODE_SIZE, network, false);
-// final ContinuousMapping hMapping = new ContinuousMapping(
-// DEF_NODE_SIZE, ObjectMapping.NODE_MAPPING);
-// hMapping.setControllingAttributeName(NODE_SIZE, network, false);
-//
-// // The following code defines the range of values
-//
-// BoundaryRangeValues brVals;
-// int j;
-// for (j = 0; j <= 1; j++) {
-// brVals = new BoundaryRangeValues();
-// final double size = 380d * j + 20d;
-// final double s = 99 * j + 1;
-// brVals.lesserValue = size;
-// brVals.equalValue = size;
-// brVals.greaterValue = size;
-// wMapping.addPoint(s, brVals);
-// hMapping.addPoint(s, brVals);
-// }
-//
-// final Calculator nodeSizeCalculator = new BasicCalculator(
-// "Bingo Node Size_" + networkName, wMapping,
-// VisualPropertyType.NODE_SIZE);
-//
style.getNodeAppearanceCalculator().setCalculator(nodeSizeCalculator);
+ // Node Size Mapping
+ final ContinuousMapping<Double, Double> nodeWidthMapping =
(ContinuousMapping<Double, Double>)
continuousF.createVisualMappingFunction(NODE_SIZE, Double.class,
RichVisualLexicon.NODE_WIDTH);
+ style.addVisualMappingFunction(nodeWidthMapping);
+ final ContinuousMapping<Double, Double> nodeHeightMapping =
(ContinuousMapping<Double, Double>)
continuousF.createVisualMappingFunction(NODE_SIZE, Double.class,
RichVisualLexicon.NODE_HEIGHT);
+ style.addVisualMappingFunction(nodeHeightMapping);
+
+ for (int j = 0; j <= 1; j++) {
+ final double size = 380d * j + 20d;
+ final double s = 99 * j + 1;
+ final BoundaryRangeValues<Double> brVals = new
BoundaryRangeValues<Double>(size, size, size);
+ nodeWidthMapping.addPoint(s, brVals);
+ nodeHeightMapping.addPoint(s, brVals);
+ }
}
public VisualStyle createVisualStyle(final CyNetwork network) {
--
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.