/* Set up the CGView to display the plasmid */
  private void initCgview() {
    int length = plasmid.getSequence().length();
    cgview = new Cgview(length);

    // some optional settings
    cgview.setWidth(getWidth());
    cgview.setHeight(getHeight());
    cgview.setTitle(plasmid.getName());
    cgview.setLabelPlacementQuality(100);
    cgview.setShowWarning(true);
    cgview.setLabelLineLength(8.0d);
    cgview.setLabelLineThickness(0.5f);
    cgview.setLabelShuffle(false);

    // create a FeatureSlot to hold sequence features
    FeatureSlot featureSlot = new FeatureSlot(cgview, CgviewConstants.DIRECT_STRAND);

    // create random sequence features
    List<org.autogene.core.bio.entities.Annotation> annotations = plasmid.getAnnotations();
    HashMap<String, Integer> counts = new HashMap<String, Integer>();

    // create the feature annotations to view in the plasmid
    for (int i = 0; i < annotations.size(); i++) {

      // update the label names such as Aapl (1) and Aapl (2) in the case that
      // there is more than one of the same annotation in two different locations
      Annotation a = annotations.get(i);
      String name = a.getFeature().getName();
      int cur = 1;
      if (counts.containsKey(name)) {
        cur = counts.get(name);
        cur++;
        counts.put(name, cur);

        //   Log.addText("plasmidpanel: " + name + "," + cur);
      } else {
        counts.put(name, cur);
        //   Log.addText("plasmidpanel: " + name + "," + cur);

      }

      // simply create the feature
      System.out.println("ABCD creating feature with " + name + " " + cur);
      Feature feature = new Feature(featureSlot, (name + " (" + cur + ")"));
      feature.setColor(
          a.getScore() == 1.0
              ? ColorConstants.NEUTRAL_COLOR_PERFECT_MATCH
              : ColorConstants.NEUTRAL_COLOR_IMPERFECT_MATCH);
      FeatureRange featureRange = new FeatureRange(feature, a.getStart(), a.getEnd());
    }
  }