Examples of CyNetwork


Examples of cytoscape.CyNetwork

      saveLayoutOfViewInFile(view, file);
    }
  }
 
  public static void saveLayoutOfViewInFile(CyNetworkView view, File file){
    CyNetwork network = view.getNetwork();
      @SuppressWarnings("unchecked")
    List<CyNode> nodes = network.nodesList();
      List<CySBMLBoundingBox> boxes = new LinkedList<CySBMLBoundingBox>();
      for (CyNode node : nodes){
        NodeView nodeView = view.getNodeView(node);
       
        String nodeId = node.getIdentifier();
View Full Code Here

Examples of cytoscape.CyNetwork

      loadLayoutForViewFromFile(view, file);
    }
  }
 
  public static void loadLayoutForViewFromFile(CyNetworkView view, File file){
    CyNetwork network = view.getNetwork();
     
      HashMap<String, CySBMLBoundingBox> boxesMap = XMLInterface.readLayoutFromXML(file);
      if (boxesMap != null){
     
        @SuppressWarnings("unchecked")
      List<CyNode> nodes = network.nodesList();
        for (CyNode node : nodes){
          // if position is stored
          String nodeId = node.getIdentifier();
          if (boxesMap.containsKey(nodeId)){
            CySBMLBoundingBox box = boxesMap.get(nodeId);
View Full Code Here

Examples of cytoscape.CyNetwork

      System.out.println("CySBML[INFO] -> No SBMLDocument found for current Network view");
    }
  }
   
  private static SBMLDocument writeLayoutOfNetworkViewToSBMLDocument(CyNetworkView view){
    CyNetwork network = view.getNetwork();
    SBMLDocument doc = NavigationPanel.getInstance().getSBMLDocumentForCyNetwork(network);
    if (doc != null){
      int level = 3;
      int version = 1;
      doc.setLevelAndVersion(level, version);
View Full Code Here

Examples of cytoscape.CyNetwork

    Layout layout = new Layout(level, version);
    String layoutId = view.getIdentifier();
    layout.setId(layoutId);
    layout.setName(layoutId);
   
    CyNetwork network = view.getNetwork();
      @SuppressWarnings("unchecked")
    List<CyNode> nodes = network.nodesList();
      CyAttributes nodeAttributes = Cytoscape.getNodeAttributes();
     
      for (CyNode node : nodes){
        NodeView nodeView = view.getNodeView(node);
        // Test if reaction or species node
View Full Code Here

Examples of cytoscape.CyNetwork

    if (e.getPropertyName().equalsIgnoreCase(CytoscapeDesktop.NETWORK_VIEW_FOCUSED))
    { 
      updateNavigationTree();
     
      //Change the target for the network Event Listener
      CyNetwork network = Cytoscape.getCurrentNetwork();
      if (network != null)
        network.removeSelectEventListener(this);
      network = Cytoscape.getCurrentNetwork();
      if (network != null) {
        network.addSelectEventListener(this);
      }
    }
   
    if (e.getPropertyName().equalsIgnoreCase(Cytoscape.NETWORK_DESTROYED)){
      String deletedNetworkKey = Cytoscape.getCurrentNetwork().getIdentifier();
View Full Code Here

Examples of cytoscape.CyNetwork

      sbmlTree.scrollPathToVisible(path);
    }
  }
 
  private void updateNetworkSelection(List<String> selectedIds){
    CyNetwork network = Cytoscape.getCurrentNetwork();
    network.unselectAllNodes();
    Set<CyNode> cyNodes = new HashSet<CyNode>();
    for (String id : selectedIds){
      cyNodes.add(Cytoscape.getCyNode(id, false))
    }
    network.setSelectedNodeState(cyNodes, true)
    Cytoscape.getCurrentNetworkView().updateView();
  }
View Full Code Here

Examples of cytoscape.CyNetwork

    eAtts = Cytoscape.getEdgeAttributes();
    nAtts = Cytoscape.getNodeAttributes();
  }
 
  public void createSpeciesNetworkAndView(){
    CyNetwork net = createSpeciesNetwork();
    CyNetworkView view = Cytoscape.getNetworkView(net.getIdentifier());

    view.redrawGraph(true, true);
    view.updateView();
  }
View Full Code Here

Examples of cytoscape.CyNetwork

    view.redrawGraph(true, true);
    view.updateView();
  }
 
  public void createReactionNetworkAndView(){
    CyNetwork net = createReactionNetwork();
    CyNetworkView view = Cytoscape.getNetworkView(net.getIdentifier());
    view.redrawGraph(true, true);
    view.updateView();
  }
View Full Code Here

Examples of cytoscape.CyNetwork

  private CyNetwork createSpeciesNetwork(){
    if (network == null || network.equals(Cytoscape.getNullNetwork())){
      return Cytoscape.getNullNetwork();
    }
    String id = network.getIdentifier() + "_" + "SpeciesNet";
    CyNetwork net = Cytoscape.createNetwork(id, true);
   
    addSpeciesNodesToNetwork(net);
    createSpeciesEdgesInNetwork(net);
    return net;
  }
View Full Code Here

Examples of cytoscape.CyNetwork

  private CyNetwork createReactionNetwork(){
    if (network == null || network.equals(Cytoscape.getNullNetwork())){
      return Cytoscape.getNullNetwork();
    }
    String id = network.getIdentifier() + "_" + "ReactionNet";
    CyNetwork net = Cytoscape.createNetwork(id, true);
    // nodes
    addReactionNodesToNetwork(net);
    addQualTransitionNodesToNetwork(net);
    // edges
    createReactionEdgesInNetwork(net);
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.