/**
   * Helper function to add the read underneath a pileup element to the map
   *
   * @param p Pileup element
   * @param a Corresponding allele
   * @param likelihood Allele likelihood
   */
  public void add(PileupElement p, Allele a, Double likelihood) {
    if (p == null) throw new IllegalArgumentException("Pileup element cannot be null");
    if (p.getRead() == null)
      throw new IllegalArgumentException("Read underlying pileup element cannot be null");
    if (a == null) throw new IllegalArgumentException("Allele for add() cannot be null");

    add(p.getRead(), a, likelihood);
  }