コード例 #1
0
  /**
   * Add into to a hash
   *
   * @param hits
   * @param marker
   * @param hit2add
   * @param showGeneDetails
   * @param compareTemplate
   */
  void regionsAddHit(
      HashSet<String> hits,
      Marker hit2add,
      Marker marker,
      boolean showGeneDetails,
      boolean compareTemplate) {
    String hitStr = hit2add.getClass().getSimpleName();

    if (compareTemplate) {
      Gene gene = (Gene) hit2add.findParent(Gene.class);
      if (gene != null)
        hitStr +=
            (hit2add.isStrandPlus() == marker.isStrandPlus())
                ? "_TEMPLATE_STRAND"
                : "_NON_TEMPLATE_STRAND";
    }

    if (showGeneDetails && (hit2add instanceof Gene)) {
      Gene gene = (Gene) hit2add;
      hitStr +=
          "["
              + gene.getBioType()
              + ", "
              + gene.getGeneName()
              + ", "
              + (gene.isProteinCoding() ? "protein" : "not-protein")
              + "]";
    }

    hits.add(hitStr); // Add marker name to the list
  }