示例#1
0
  /** Called from bicat.gui.window.Search */
  public void search(int data, int list, int idx, String genes, String chips, boolean andSearch) {

    if (engine.isDebug()) System.out.println("Starting search ...");

    Dataset BcR = (Dataset) engine.getDatasetList().get(data);
    LinkedList biclusterList = (LinkedList) BcR.getBCsList(list).get(idx);

    biclusterList = search(biclusterList, genes, chips, andSearch);

    // do management ...
    BcR.updateSearchBiclustersLists(biclusterList, list, idx);

    if (owner != null) {
      owner.updateSearchMenu();
      owner.buildTree();

      owner.getTree().setSelectionPath(owner.getPreprocessedPath());
      owner.getTree().setSelectionPath(owner.getPreprocessedPath());
      int row = owner.getTree().getRowCount() - 1;
      while (row >= 0) {
        owner.getTree().collapseRow(row);
        row--;
      }
    }
  }
示例#2
0
  /**
   * Called from bicat.gui.window.GenePairAnalysis
   *
   * @throws Exception
   */
  public void genePairAnalysis(
      int data, int list, int idx, int minCoocScore, int minCommonScore, boolean byCooc)
      throws Exception {

    Dataset BcR = (Dataset) engine.getDatasetList().get(data);
    LinkedList biclusterList = (LinkedList) BcR.getBCsList(list).get(idx);

    HashMap gpa = new HashMap();

    if (engine.isDebug()) {
      System.out.println("Starting gene pair analysis ...");
      System.out.println("Hashmap for biclusterList: " + biclusterList.toString());
    }

    if (byCooc) gpa = gpaByCoocurrence(biclusterList, minCoocScore, BcR);
    else gpa = gpaByCommonChips(biclusterList, minCommonScore);

    if (engine.isDebug()) System.out.println("Hashmap size for gpa: " + gpa.size());
    // do management ...
    BcR.updateAnalysisBiclustersLists(gpa, list, idx);

    if (owner != null) {
      owner.updateAnalysisMenu();
      owner.buildTree();

      owner.getTree().setSelectionPath(owner.getPreprocessedPath());
      owner.getTree().setSelectionPath(owner.getPreprocessedPath());
      int row = owner.getTree().getRowCount() - 1;
      while (row >= 0) {
        owner.getTree().collapseRow(row);
        row--;
      }
    }
  }
示例#3
0
  /** Called from bicat.gui.window.Filter */
  public void filter(
      int data, int list, int idx, int minG, int maxG, int minC, int maxC, int nrBCs, int overlap) {

    if (engine.isDebug()) System.out.println("Starting filter ...");

    Dataset BcR = (Dataset) engine.getDatasetList().get(data);

    LinkedList biclusterList = (LinkedList) BcR.getBCsList(list).get(idx);
    int limit_G = BcR.getGeneCount();
    int limit_C = BcR.getWorkingChipCount();

    biclusterList = filterBySize(biclusterList, minG, maxG, minC, maxC, limit_G, limit_C);
    biclusterList = filterByOverlap(biclusterList, nrBCs, overlap);

    // do management ...
    BcR.updateFilterBiclustersLists(biclusterList, list, idx);

    if (owner != null) {
      owner.updateFilterMenu();
      owner.buildTree();

      owner.getTree().setSelectionPath(owner.getPreprocessedPath());
      int row = owner.getTree().getRowCount() - 1;
      while (row >= 0) {
        owner.getTree().collapseRow(row);
        row--;
      }
    }
  }