Author: sfederow
Date: 2010-11-15 18:23:54 -0800 (Mon, 15 Nov 2010)
New Revision: 22864
Added:
csplugins/trunk/soc/sfederow/CyAnimator/src/CyAnimator/AttributeMapper.java
Modified:
csplugins/trunk/soc/sfederow/CyAnimator/resources/plugin.props
csplugins/trunk/soc/sfederow/CyAnimator/src/CyAnimator/.classpath
csplugins/trunk/soc/sfederow/CyAnimator/src/CyAnimator/CyAnimatorDialog.java
Log:
Modified: csplugins/trunk/soc/sfederow/CyAnimator/resources/plugin.props
===================================================================
--- csplugins/trunk/soc/sfederow/CyAnimator/resources/plugin.props
2010-11-16 02:11:44 UTC (rev 22863)
+++ csplugins/trunk/soc/sfederow/CyAnimator/resources/plugin.props
2010-11-16 02:23:54 UTC (rev 22864)
@@ -16,7 +16,7 @@
pluginVersion=0.9
# Compatible Cytoscape version
-cytoscapeVersion=2.6.2,2.6.3
+cytoscapeVersion=2.6.2,2.6.3,2.7,2.8
# Category, use one of the categories listed on the website or create your own
pluginCategory=Other
Modified: csplugins/trunk/soc/sfederow/CyAnimator/src/CyAnimator/.classpath
===================================================================
--- csplugins/trunk/soc/sfederow/CyAnimator/src/CyAnimator/.classpath
2010-11-16 02:11:44 UTC (rev 22863)
+++ csplugins/trunk/soc/sfederow/CyAnimator/src/CyAnimator/.classpath
2010-11-16 02:23:54 UTC (rev 22864)
@@ -2,5 +2,93 @@
<classpath>
<classpathentry kind="src" path="src"/>
<classpathentry kind="con"
path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
+ <classpathentry kind="lib"
path="/home/sfederow/Cytoscape_v2.7.0/lib/activation.jar"/>
+ <classpathentry kind="lib"
path="/home/sfederow/Cytoscape_v2.7.0/lib/biojava-1.4.jar"/>
+ <classpathentry kind="lib"
path="/home/sfederow/Cytoscape_v2.7.0/lib/colt.jar"/>
+ <classpathentry kind="lib"
path="/home/sfederow/Cytoscape_v2.7.0/lib/coltginy.jar"/>
+ <classpathentry kind="lib"
path="/home/sfederow/Cytoscape_v2.7.0/lib/commons-cli-1.x-cytoscape-custom.jar"/>
+ <classpathentry kind="lib"
path="/home/sfederow/Cytoscape_v2.7.0/lib/com-nerius-math-xform.jar"/>
+ <classpathentry kind="lib"
path="/home/sfederow/Cytoscape_v2.7.0/lib/concurrent.jar"/>
+ <classpathentry kind="lib"
path="/home/sfederow/Cytoscape_v2.7.0/lib/cytoscape-cruft-obo.jar"/>
+ <classpathentry kind="lib"
path="/home/sfederow/Cytoscape_v2.7.0/lib/cytoscape-geom-rtree.jar"/>
+ <classpathentry kind="lib"
path="/home/sfederow/Cytoscape_v2.7.0/lib/cytoscape-geom-spacial.jar"/>
+ <classpathentry kind="lib"
path="/home/sfederow/Cytoscape_v2.7.0/lib/cytoscape-graph-dynamic.jar"/>
+ <classpathentry kind="lib"
path="/home/sfederow/Cytoscape_v2.7.0/lib/cytoscape-graph-fixed.jar"/>
+ <classpathentry kind="lib"
path="/home/sfederow/Cytoscape_v2.7.0/lib/cytoscape-render-export.jar"/>
+ <classpathentry kind="lib"
path="/home/sfederow/Cytoscape_v2.7.0/lib/cytoscape-render-immed.jar"/>
+ <classpathentry kind="lib"
path="/home/sfederow/Cytoscape_v2.7.0/lib/cytoscape-render-stateful.jar"/>
+ <classpathentry kind="lib"
path="/home/sfederow/Cytoscape_v2.7.0/lib/cytoscape-task.jar"/>
+ <classpathentry kind="lib"
path="/home/sfederow/Cytoscape_v2.7.0/lib/cytoscape-util-intr.jar"/>
+ <classpathentry kind="lib"
path="/home/sfederow/Cytoscape_v2.7.0/lib/ding.jar"/>
+ <classpathentry kind="lib"
path="/home/sfederow/Cytoscape_v2.7.0/lib/FastInfoset.jar"/>
+ <classpathentry kind="lib"
path="/home/sfederow/Cytoscape_v2.7.0/lib/fing.jar"/>
+ <classpathentry kind="lib"
path="/home/sfederow/Cytoscape_v2.7.0/lib/freehep-export-2.1.1.jar"/>
+ <classpathentry kind="lib"
path="/home/sfederow/Cytoscape_v2.7.0/lib/freehep-graphics2d-2.1.1.jar"/>
+ <classpathentry kind="lib"
path="/home/sfederow/Cytoscape_v2.7.0/lib/freehep-graphicsio-2.1.1.jar"/>
+ <classpathentry kind="lib"
path="/home/sfederow/Cytoscape_v2.7.0/lib/freehep-graphicsio-java-2.1.1.jar"/>
+ <classpathentry kind="lib"
path="/home/sfederow/Cytoscape_v2.7.0/lib/freehep-graphicsio-ps-2.1.1.jar"/>
+ <classpathentry kind="lib"
path="/home/sfederow/Cytoscape_v2.7.0/lib/freehep-graphicsio-svg-2.1.1.jar"/>
+ <classpathentry kind="lib"
path="/home/sfederow/Cytoscape_v2.7.0/lib/freehep-io-2.0.2.jar"/>
+ <classpathentry kind="lib"
path="/home/sfederow/Cytoscape_v2.7.0/lib/freehep-jas-plotter-2.2.jar"/>
+ <classpathentry kind="lib"
path="/home/sfederow/Cytoscape_v2.7.0/lib/freehep-swing-2.0.3.jar"/>
+ <classpathentry kind="lib"
path="/home/sfederow/Cytoscape_v2.7.0/lib/freehep-util-2.0.2.jar"/>
+ <classpathentry kind="lib"
path="/home/sfederow/Cytoscape_v2.7.0/lib/freehep-xml-2.1.1.jar"/>
+ <classpathentry kind="lib"
path="/home/sfederow/Cytoscape_v2.7.0/lib/giny.jar"/>
+ <classpathentry kind="lib"
path="/home/sfederow/Cytoscape_v2.7.0/lib/glf.jar"/>
+ <classpathentry kind="lib"
path="/home/sfederow/Cytoscape_v2.7.0/lib/http.jar"/>
+ <classpathentry kind="lib"
path="/home/sfederow/Cytoscape_v2.7.0/lib/i4jruntime.jar"/>
+ <classpathentry kind="lib"
path="/home/sfederow/Cytoscape_v2.7.0/lib/itext-2.0.4.jar"/>
+ <classpathentry kind="lib"
path="/home/sfederow/Cytoscape_v2.7.0/lib/jaxb-api.jar"/>
+ <classpathentry kind="lib"
path="/home/sfederow/Cytoscape_v2.7.0/lib/jaxb-impl.jar"/>
+ <classpathentry kind="lib"
path="/home/sfederow/Cytoscape_v2.7.0/lib/jaxws-api.jar"/>
+ <classpathentry kind="lib"
path="/home/sfederow/Cytoscape_v2.7.0/lib/jaxws-rt.jar"/>
+ <classpathentry kind="lib"
path="/home/sfederow/Cytoscape_v2.7.0/lib/jaxws-tools.jar"/>
+ <classpathentry kind="lib"
path="/home/sfederow/Cytoscape_v2.7.0/lib/jdom-1.0.jar"/>
+ <classpathentry kind="lib"
path="/home/sfederow/Cytoscape_v2.7.0/lib/jhall.jar"/>
+ <classpathentry kind="lib"
path="/home/sfederow/Cytoscape_v2.7.0/lib/jnlp.jar"/>
+ <classpathentry kind="lib"
path="/home/sfederow/Cytoscape_v2.7.0/lib/jsr173_api.jar"/>
+ <classpathentry kind="lib"
path="/home/sfederow/Cytoscape_v2.7.0/lib/jsr181-api.jar"/>
+ <classpathentry kind="lib"
path="/home/sfederow/Cytoscape_v2.7.0/lib/jsr250-api.jar"/>
+ <classpathentry kind="lib"
path="/home/sfederow/Cytoscape_v2.7.0/lib/junit.jar"/>
+ <classpathentry kind="lib"
path="/home/sfederow/Cytoscape_v2.7.0/lib/l2fprod-common-all.jar"/>
+ <classpathentry kind="lib"
path="/home/sfederow/Cytoscape_v2.7.0/lib/looks-2.1.4.jar"/>
+ <classpathentry kind="lib"
path="/home/sfederow/Cytoscape_v2.7.0/lib/mimepull.jar"/>
+ <classpathentry kind="lib"
path="/home/sfederow/Cytoscape_v2.7.0/lib/phoebe.dnd.jar"/>
+ <classpathentry kind="lib"
path="/home/sfederow/Cytoscape_v2.7.0/lib/piccolo.jar"/>
+ <classpathentry kind="lib"
path="/home/sfederow/Cytoscape_v2.7.0/lib/resolver.jar"/>
+ <classpathentry kind="lib"
path="/home/sfederow/Cytoscape_v2.7.0/lib/saaj-api.jar"/>
+ <classpathentry kind="lib"
path="/home/sfederow/Cytoscape_v2.7.0/lib/saaj-impl.jar"/>
+ <classpathentry kind="lib"
path="/home/sfederow/Cytoscape_v2.7.0/lib/sjsxp.jar"/>
+ <classpathentry kind="lib"
path="/home/sfederow/Cytoscape_v2.7.0/lib/stax-ex.jar"/>
+ <classpathentry kind="lib"
path="/home/sfederow/Cytoscape_v2.7.0/lib/streambuffer.jar"/>
+ <classpathentry kind="lib"
path="/home/sfederow/Cytoscape_v2.7.0/lib/swing-layout-1.0.3.jar"/>
+ <classpathentry kind="lib"
path="/home/sfederow/Cytoscape_v2.7.0/lib/swingx-1.0.jar"/>
+ <classpathentry kind="lib"
path="/home/sfederow/Cytoscape_v2.7.0/lib/swingx-beaninfo-1.0.jar"/>
+ <classpathentry kind="lib"
path="/home/sfederow/Cytoscape_v2.7.0/lib/tclib.jar"/>
+ <classpathentry kind="lib"
path="/home/sfederow/Cytoscape_v2.7.0/lib/undo.support.jar"/>
+ <classpathentry kind="lib"
path="/home/sfederow/Cytoscape_v2.7.0/lib/violinstrings-1.0.2.jar"/>
+ <classpathentry kind="lib"
path="/home/sfederow/Cytoscape_v2.7.0/lib/woodstox.jar"/>
+ <classpathentry kind="lib"
path="/home/sfederow/Cytoscape_v2.7.0/plugins/AdvancedNetworkMerge.jar"/>
+ <classpathentry kind="lib"
path="/home/sfederow/Cytoscape_v2.7.0/plugins/AutomaticLayout.jar"/>
+ <classpathentry kind="lib"
path="/home/sfederow/Cytoscape_v2.7.0/plugins/biomartClient.jar"/>
+ <classpathentry kind="lib"
path="/home/sfederow/Cytoscape_v2.7.0/plugins/biopax.jar"/>
+ <classpathentry kind="lib"
path="/home/sfederow/Cytoscape_v2.7.0/plugins/browser.jar"/>
+ <classpathentry kind="lib"
path="/home/sfederow/Cytoscape_v2.7.0/plugins/cpath2.jar"/>
+ <classpathentry kind="lib"
path="/home/sfederow/Cytoscape_v2.7.0/plugins/cPath.jar"/>
+ <classpathentry kind="lib"
path="/home/sfederow/Cytoscape_v2.7.0/plugins/CyAnimator.jar"/>
+ <classpathentry kind="lib"
path="/home/sfederow/Cytoscape_v2.7.0/plugins/CytoscapeEditor.jar"/>
+ <classpathentry kind="lib"
path="/home/sfederow/Cytoscape_v2.7.0/plugins/filter.jar"/>
+ <classpathentry kind="lib"
path="/home/sfederow/Cytoscape_v2.7.0/plugins/filters.jar"/>
+ <classpathentry kind="lib"
path="/home/sfederow/Cytoscape_v2.7.0/plugins/helloworld.jar"/>
+ <classpathentry kind="lib"
path="/home/sfederow/Cytoscape_v2.7.0/plugins/linkout.jar"/>
+ <classpathentry kind="lib"
path="/home/sfederow/Cytoscape_v2.7.0/plugins/man.jar"/>
+ <classpathentry kind="lib"
path="/home/sfederow/Cytoscape_v2.7.0/plugins/ManualLayout.jar"/>
+ <classpathentry kind="lib"
path="/home/sfederow/Cytoscape_v2.7.0/plugins/ncbiClient.jar"/>
+ <classpathentry kind="lib"
path="/home/sfederow/Cytoscape_v2.7.0/plugins/psi_mi.jar"/>
+ <classpathentry kind="lib"
path="/home/sfederow/Cytoscape_v2.7.0/plugins/quick_find.jar"/>
+ <classpathentry kind="lib"
path="/home/sfederow/Cytoscape_v2.7.0/plugins/SBMLReader.jar"/>
+ <classpathentry kind="lib"
path="/home/sfederow/Cytoscape_v2.7.0/plugins/TableImport.jar"/>
+ <classpathentry kind="lib"
path="/home/sfederow/Cytoscape_v2.7.0/plugins/yLayouts.jar"/>
+ <classpathentry kind="lib"
path="/home/sfederow/Cytoscape_v2.7.0/cytoscape.jar"/>
<classpathentry kind="output" path="bin"/>
</classpath>
Added:
csplugins/trunk/soc/sfederow/CyAnimator/src/CyAnimator/AttributeMapper.java
===================================================================
--- csplugins/trunk/soc/sfederow/CyAnimator/src/CyAnimator/AttributeMapper.java
(rev 0)
+++ csplugins/trunk/soc/sfederow/CyAnimator/src/CyAnimator/AttributeMapper.java
2010-11-16 02:23:54 UTC (rev 22864)
@@ -0,0 +1,107 @@
+package CyAnimator;
+
+import giny.model.Edge;
+import giny.model.Node;
+import giny.view.EdgeView;
+import giny.view.NodeView;
+
+import cytoscape.CyNetwork;
+import cytoscape.Cytoscape;
+import cytoscape.data.CyAttributes;
+import cytoscape.view.CyNetworkView;
+import cytoscape.CyNode;
+import cytoscape.visual.LineStyle;
+
+import java.awt.Color;
+import java.awt.Paint;
+import java.awt.Stroke;
+import java.io.IOException;
+import java.util.ArrayList;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Map;
+import java.util.HashMap;
+import java.util.regex.*;
+
+
+public class AttributeMapper {
+
+ private List<Node> nodeList = null;
+ private CyAttributes cyNodeAttrs = null;
+ private CyNetwork currentNetwork = null;
+ private CyNetworkView networkView = null;
+ private FrameManager frameManager = null;
+
+
+
+ public AttributeMapper(){
+
+ frameManager = new FrameManager();
+ networkView = Cytoscape.getCurrentNetworkView();
+
+ currentNetwork = Cytoscape.getCurrentNetwork();
+
+ // Get our initial nodeList
+ nodeList = currentNetwork.nodesList();
+
+
+ cyNodeAttrs = Cytoscape.getNodeAttributes();
+ String[] attNames = cyNodeAttrs.getAttributeNames();
+
+ ArrayList<String> numNames = new ArrayList<String>();
+
+ for(int i=0; i<attNames.length; i++){
+ if(cyNodeAttrs.getType(attNames[i]) == 2){
+ numNames.add(attNames[i]);
+ }
+
//System.out.println(attNames[i]+"\t"+cyNodeAttrs.getType(attNames[i]));
+
+ }
+
+ for(String name: numNames){
+ //System.out.println(name);
+
+
+ for(Node node: nodeList){
+ NodeView nodeView =
networkView.getNodeView(node);
+
System.out.println(cyNodeAttrs.getAttribute(node.getIdentifier(), name));
+ double nodeval = 1;
+ try{
+ nodeval =
cyNodeAttrs.getDoubleAttribute(node.getIdentifier(), name);
+ }catch(Exception excp) {
+ continue;
//System.out.println("hey"+excp.getMessage());
+
+ }
+
+
+
+
+
+ if(nodeval < 0){
nodeView.setUnselectedPaint(Color.RED); }
+ else{
nodeView.setUnselectedPaint(Color.GREEN);}//origColor); }
+
+ if(nodeval == 0 || nodeval < .01){ nodeval = 1;
}
+ nodeView.setHeight(Math.abs(nodeval)*100);
+ nodeView.setWidth(Math.abs(nodeval)*100);
+
+ }
+
+ frameManager.addKeyFrame();
+ }
+
+ ArrayList<CyFrame> adjFrames = new ArrayList<CyFrame>();
+ ArrayList<CyFrame> frameList = frameManager.getKeyFrameList();
+ for(CyFrame frame: frameList){
+ frame.setInterCount(10);
+ adjFrames.add(frame);
+ }
+ frameManager.setKeyFrameList(adjFrames);
+ //frameManager.play();
+
+ }
+
+
+ public FrameManager getFrameManager(){
+ return frameManager;
+ }
+}
Modified:
csplugins/trunk/soc/sfederow/CyAnimator/src/CyAnimator/CyAnimatorDialog.java
===================================================================
---
csplugins/trunk/soc/sfederow/CyAnimator/src/CyAnimator/CyAnimatorDialog.java
2010-11-16 02:11:44 UTC (rev 22863)
+++
csplugins/trunk/soc/sfederow/CyAnimator/src/CyAnimator/CyAnimatorDialog.java
2010-11-16 02:23:54 UTC (rev 22864)
@@ -112,6 +112,8 @@
private JButton recordButton;
private JMenuItem menuItem;
+ private JMenuItem attrItem;
+
private JPanel mainPanel;
private JPopupMenu thumbnailMenu;
private JPopupMenu metabolicOptions;
@@ -237,9 +239,13 @@
metabolicOptions = new JPopupMenu();
menuItem = new JMenuItem("Map Metabolic");
+ attrItem = new JMenuItem("Attribute Mapper");
menuItem.addActionListener(this);
+ attrItem.addActionListener(this);
menuItem.setActionCommand("Initiate Metabolic");
+ attrItem.setActionCommand("Initiate Attribute Mapper");
metabolicOptions.add(menuItem);
+ metabolicOptions.add(attrItem);
//mainPanel.setComponentPopupMenu(metabolicOptions);
MouseListener extraPopupListener = new ExtraPopupListener();
framePane.addMouseListener(extraPopupListener);
@@ -394,6 +400,14 @@
}
+ if(command.equals("Initiate Attribute Mapper")){
+
+ AttributeMapper mapper = new AttributeMapper();
+ frameManager = mapper.getFrameManager();
+ updateThumbnails();
+ }
+
+
setVisible(true);
}
--
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.