Author: pwang
Date: 2011-10-21 16:39:10 -0700 (Fri, 21 Oct 2011)
New Revision: 27269

Modified:
   
csplugins/trunk/ucsd/pwang/jActiveModules31/src/main/java/csplugins/jActiveModules/ActivePaths.java
Log:
Fixed a bug

Modified: 
csplugins/trunk/ucsd/pwang/jActiveModules31/src/main/java/csplugins/jActiveModules/ActivePaths.java
===================================================================
--- 
csplugins/trunk/ucsd/pwang/jActiveModules31/src/main/java/csplugins/jActiveModules/ActivePaths.java
 2011-10-21 23:38:07 UTC (rev 27268)
+++ 
csplugins/trunk/ucsd/pwang/jActiveModules31/src/main/java/csplugins/jActiveModules/ActivePaths.java
 2011-10-21 23:39:10 UTC (rev 27269)
@@ -150,7 +150,12 @@
                this.cyApplicationManagerService = cyApplicationManagerService;
                this.cyEventHelperService = cyEventHelperService;
 
-               MAX_NETWORK_VIEWS = new 
Integer(this.cytoscapeProperties.getProperties().getProperty("defaultPluginDownloadUrl")).intValue();
+               try {                   
+                       MAX_NETWORK_VIEWS = new 
Integer(this.cytoscapeProperties.getProperties().getProperty("moduleNetworkViewCreationThreshold")).intValue();
                 
+               }
+               catch (Exception e){
+                       MAX_NETWORK_VIEWS = 5;
+               }
                layoutAlgorithm = 
this.cyLayoutsService.getLayout("force-directed");
                //if (!eventFired){
                //      this.cyEventHelperService.fireEvent();
@@ -416,7 +421,7 @@
                logger.info("Processing Expression Data into Hash");
                HashMap tempHash = new HashMap();
                logger.info("Do some testing of the ExpressionData object");
-               CyTable nodeAttributes = this.cyNetwork.getDefaultNodeTable(); 
//Cytoscape.getNodeAttributes();
+               CyTable nodeAttributes = this.cyNetwork.getDefaultNodeTable();
 
                // Create two identical lists of genes
                List<CyNode> geneList = new ArrayList<CyNode>();
@@ -435,12 +440,14 @@
                final Map<String, Integer> geneNameToIndexMap = new 
HashMap<String, Integer>();
                for (int i = 0; i < geneList.size(); i++) {
                        final String geneName = 
geneList.get(i).getCyRow().get("name", String.class); //.getIdentifier();
+                       
                        geneNameToIndexMap.put(geneName, new Integer(i));
                        for (int j = 0; j < attrNames.length; j++)
                        {
                                //attribValues[j][i] = 
nodeAttributes.get.getDoubleAttribute(geneName, attrNames[j]);
-                               Collection<CyRow> rows = 
nodeAttributes.getMatchingRows(attrNames[j], geneName);
+                               Collection<CyRow> rows = 
nodeAttributes.getMatchingRows("name", geneName);
                                Object[] objs = rows.toArray();
+                               // We assume name is unique, we expect one row 
returned for each name
                                CyRow row = (CyRow) objs[0];
                                attribValues[j][i] = row.get(attrNames[j], 
Double.class);
                        }

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