Exemplo n.º 1
0
  /** After clicking execute button, all data in dialog is saved to GoIOptionsPack */
  public void storeValuesToOptionsPack(QueryOptionsPack opt) {
    // store Length Limit
    opt.setLengthLimit(Integer.parseInt(lengthLimit.getText()));

    // if currentView is selected
    if (currentViewButton.getSelection()) {
      opt.setCurrentView(true);
    }
    // if newView is selected
    else {
      opt.setCurrentView(false);
    }

    if (downstreamButton != null) {
      // if downstream is selected
      if (downstreamButton.getSelection()) {
        opt.setDownstream(true);
        opt.setUpstream(false);
      }
      // if upstream is selected
      else if (upstreamButton.getSelection()) {
        opt.setDownstream(false);
        opt.setUpstream(true);
      }
      // if both is selected
      else {
        opt.setDownstream(true);
        opt.setUpstream(true);
      }
    }

    // store stop distance according to user's selection
    if (shortestPlusKButton != null) {
      opt.setLimitType(!shortestPlusKButton.getSelection());
      opt.setShortestPlusKLimit(Integer.parseInt(shortestPlusK.getText()));
    }

    // if strict is selected.
    if (strictButton != null && strictButton.getSelection()) {
      opt.setStrict(true);
    } else {
      opt.setStrict(false);
    }

    if (sourceST != null) opt.setSourceList(sourceST.getSymbols());
    if (targetST != null) opt.setTargetList(targetST.getSymbols());

    if (forSIF) {
      opt.setSifTypes(selectedTypes);
    }
  }
Exemplo n.º 2
0
 private void collectUnknownSymbols(SymbolText st, java.util.List<String> unkwn) {
   if (st != null) {
     for (String s : st.getSymbols()) {
       if (HGNC.getSymbol(s) == null && !unkwn.contains(s)) unkwn.add(s);
     }
   }
 }