Esempio n. 1
0
  /**
   * Return the number of bps before loc in the sorted set
   *
   * @param loc the location before which we are counting bases
   * @return
   */
  public long sizeBeforeLoc(GenomeLoc loc) {
    long s = 0;

    for (GenomeLoc e : this) {
      if (e.isBefore(loc)) s += e.size();
      else if (e.isPast(loc)) ; // don't do anything
      else // loc is inside of s
      s += loc.getStart() - e.getStart();
    }

    return s;
  }
Esempio n. 2
0
 /**
  * Return the size, in bp, of the genomic regions by all of the regions in this set
  *
  * @return size in bp of the covered regions
  */
 public long coveredSize() {
   long s = 0;
   for (GenomeLoc e : this) s += e.size();
   return s;
 }