Package org.gvt.model.biopaxl2

Examples of org.gvt.model.biopaxl2.Product


    ScrollingGraphicalViewer viewer = tabToViewerMap.get(tab);
    CompoundModel root = (CompoundModel) viewer.getContents().getModel();

    if (root instanceof BioPAXGraph)
    {
      BioPAXGraph graph = (BioPAXGraph) root;

      assert graph.getName().equals(tab.getText()) :
        "graph name: " + graph.getName() + " tab name: " + tab.getText();

      if (rememberLayout && graph.isMechanistic())
      {
        graph.recordLayout();
      }
    }
    boolean removed = openTabNames.remove(tab.getText());

    assert removed : "tab name: " + tab.getText();
View Full Code Here



    Object compmod = tabToViewerMap.get(tab).getContents().getModel();
    if (compmod instanceof BioPAXGraph)
    {
      BioPAXGraph graph = (BioPAXGraph) compmod;
      pathway p = graph.getPathway();

      if (p != null)
      {
        p.setNAME(newName);
      }
      graph.setName(newName);
    }
    tab.setText(newName);

    assert nameToTabMap.size() == openTabNames.size();
  }
View Full Code Here

    {
      man.associateExperimentData(rootGraph);

      for (ScrollingGraphicalViewer viewer : tabToViewerMap.values())
      {
        BioPAXGraph graph = (BioPAXGraph) viewer.getContents().getModel();
        man.associateExperimentData(graph);
      }
    }
  }
View Full Code Here

    int limit = 10;
    int k = 0;
    int t = 0;

    BioPAXGraph graph = globalSearch ? main.getRootGraph() : main.getPathwayGraph();

    if (targets.isEmpty()) targets = null;

    Map<Node, Map<Integer, List<CausativePath>>> allMap =
      AlgoRunner.searchCausativePaths(graph, targets, limit, t, k);

    // Search the paths map for each target and
    // prepare the result paths to visualize

    List<String> pathIDs = new ArrayList<String>();
    idMap = new HashMap<String, CausativePath>();

    // Collect all paths in a list to be used in excising the original graph and displaying the
    // merge graph

    List<Path> paths = new ArrayList<Path>();

    for (Map<Integer, List<CausativePath>> integerListMap : allMap.values())
    {
      for (List<CausativePath> list : integerListMap.values())
      {
        paths.addAll(list);
      }
    }

    // Open merge graph of result pathways in a new view

    if (!paths.isEmpty() && globalSearch)
    {
      pathwayGraph = graph.excise(paths, false, true);
      pathwayGraph.setName("Causative Paths");
      main.createNewTab(pathwayGraph);
      new CoSELayoutAction(main).run();
     
      new ColorWithExperimentAction(main, pathwayGraph, ExperimentData.EXPRESSION_DATA).run();
View Full Code Here

        int selection = queryTypeBox.getSelectionIndex();

        switch (selection)
        {
          case 0: // Neighbors in loaded file
            BioPAXGraph root = main.getRootGraph();
            if (root != null)
            {
              Collection<physicalEntity> entities = root.getRelatedEntities(refs);

              if (entities.isEmpty())
              {
                MessageDialog.openInformation(main.getShell(), "Not found",
                  "Selected entities are not found in the current model.");
View Full Code Here

            graph.setLastAppliedColoring(null);
            new ColorWithExperimentAction(main, graph, dataManager.getType()).run();
          }
        }

        BioPAXGraph currentGraph = main.getPathwayGraph();
        if (currentGraph != null && currentGraph.getLastAppliedColoring() == null)
        {
          new ColorWithExperimentAction(main, currentGraph, dataManager.getType()).run();
        }

        shell.dispose();
View Full Code Here

  }

  public void run()
  {
    ScrollingGraphicalViewer viewer = main.getViewer();
    BioPAXGraph pathway = main.getPathwayGraph();

    if (pathway == null)
    {
      MessageDialog.openError(main.getShell(), "Error!", "No BioPAX pathway.");
      return;
    }

    if (viewer != null)
    {
      BioPAXGraph original = (BioPAXGraph) viewer.getContents().getModel();

      if (!original.isMechanistic())
      {
        MessageDialog.openError(main.getShell(), "Not Supported!",
          "Duplication is supported only in mechanistic views.");

        return;
      }

      original.recordLayout();
      pathway p = original.getPathway();
      BioPAXGraph graph = main.getRootGraph().excise(p);
      graph.setPathway(null);

      String name = p.getNAME();

      // If the name contains a copy number at the end (like "pathway name (2)"), remove it

      if (name.indexOf(" ") > 0)
      {
        String last = name.substring(name.lastIndexOf(" ") + 1);
        if (last.indexOf("(") == 0 && last.indexOf(")") == last.length() - 1)
        {
          boolean isdigit = true;
          for (int i = 1; isdigit && i < last.length() - 1; i++)
          {
            isdigit = Character.isDigit(last.charAt(i));
          }

          if (isdigit) name = name.substring(0, name.lastIndexOf(" "));
        }
      }

      graph.setName(name);
      main.createNewTab(graph);
      graph.fetchLayout(p.getRDFId());
    }
  }
View Full Code Here

  private void openPathwayInTab(pathway p)
  {
    assert p != null;

    BioPAXGraph graph = main.getRootGraph().excise(p);
    boolean layedout = graph.fetchLayout();
    CTabItem tab = main.createNewTab(graph);

    if (refsToHighlight != null && !refsToHighlight.isEmpty())
    {
      ScrollingGraphicalViewer viewer = main.getTabToViewerMap().get(tab);
View Full Code Here

    item.setBackground(1, ChisioMain.higlightColor);
  }

  private void prepareForBioPAXGraph()
  {
    BioPAXGraph graph = (BioPAXGraph) model;

    for (String[] property : graph.getInspectable())
    {
      addRow(table, property[0]).setText(1, property[1]);
    }
    table.getColumn(1).pack();
    table.pack();
View Full Code Here

      }
     
      merger.merge(target, sources.toArray(new Model[sources.size()]));

      BioPAXReader reader = new BioPAXReader(target);
      BioPAXGraph graph = (BioPAXGraph) reader.readXMLFile(null);

      if (createNewPathway)
      {
        List<String> intids = getInteractionIDs(model);
        newPathwayName = graph.createPathway(
          newPathwayName == null ? "Neighborhood" : newPathwayName, intids);
        main.getAllPathwayNames().add(newPathwayName);
      }

      main.setRootGraph(graph);
View Full Code Here

TOP

Related Classes of org.gvt.model.biopaxl2.Product

Copyright © 2018 www.massapicom. 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.