##Cytoscape 3 Data Import UX
=====================
- n mouse network files
- m human network files
{ | |
"network" : { | |
"selected" : { | |
"type" : "boolean", | |
"value" : true | |
}, | |
"__Annotations" : [ ], | |
"shared name" : { | |
"type" : "string", | |
"value" : "galFiltered.sif" |
package org.cytoscape.io.internal.read; | |
/* | |
* #%L | |
* Cytoscape IO Impl (io-impl) | |
* $Id:$ | |
* $HeadURL:$ | |
* %% | |
* Copyright (C) 2006 - 2013 The Cytoscape Consortium | |
* %% |
// Handle locked values | |
final Set<VisualPropertyDependency<?>> deps = vs.getAllVisualPropertyDependencies(); | |
for(VisualPropertyDependency<?> dep: deps) { | |
if(dep.getIdString().equals("nodeSizeLocked")) { | |
if(dep.isDependencyEnabled()) { | |
dep.setDependency(false); | |
} | |
} | |
// Generate a complete graph | |
// Extract command-line arguments | |
var numberOfNodes = args[0]; | |
if(numberOfNodes == null) | |
numberOfNodes = 10; | |
// Create new network | |
var newNetwork = cyAppAdapter.getCyNetworkFactory().createNetwork(); | |
newNetwork.getRow(newNetwork).set("name", "Complete Graph with " + numberOfNodes + " Nodes"); |
# | |
# Python Script to generate complete graph | |
# | |
NUM_NODES = 20 | |
print "Creating complete graph with " + str(NUM_NODES) + " nodes..." | |
new_network = cyAppAdapter.getCyNetworkFactory().createNetwork() | |
new_network.getRow(new_network).set("name", "Complete Graph Created by Python Script") |
; Node Names - sequence of integers. | |
(def nodenames (take 500 (range))) | |
; Create new network and register it to manager | |
(def newnet(. (. cyAppAdapter getCyNetworkFactory) createNetwork)) | |
(.. newnet (getRow newnet) (set "name" "Random Network Created by Clojure Script")) | |
(.. cyAppAdapter (getCyNetworkManager) (addNetwork newnet)) | |
; Create nodes | |
(doseq [nodename nodenames] |
from java.io import File | |
KEGG_DIR = "/Users/kono/kegg/" | |
pathways = ["hsa00010.xml", "hsa00020.xml", "hsa01100.xml"] | |
loadNetworkTF = cyAppAdapter.get_LoadNetworkFileTaskFactory() | |
taskManager = cyAppAdapter.getTaskManager() | |
allTasks = None | |
for pathway in pathways: |
public class KeggscapeFileFilter extends BasicCyFileFilter { | |
private static final Logger logger = LoggerFactory.getLogger(KeggscapeFileFilter.class); | |
private static final String KEGG_TAG = "www.kegg.jp/kegg"; | |
public KeggscapeFileFilter(Set<String> extensions, Set<String> contentTypes, String description, | |
DataCategory category, StreamUtil streamUtil) { | |
super(extensions, contentTypes, description, category, streamUtil); | |
} |
// VMM is VisualMappingManager | |
VisualStyle psiStyle = null; | |
for (VisualStyle style : vmm.getAllVisualStyles()) { | |
if (style.getTitle().equals(PSIMI25VisualStyleBuilder.DEF_VS_NAME)) { | |
psiStyle = style; | |
break; | |
} | |
} | |
if (psiStyle == null) { | |
psiStyle = vsBuilder.getVisualStyle(); |