code: def starts_by_depth(bam_file, data, sample_size=10000000):
      
      binsize = (sample_size / 100) + 1
      seen_starts = set()
      counted = 0
      num_reads = []
      starts = []
      buffer = []
      downsampled = bam.downsample(bam_file, data, sample_size)
      with bam.open_samfile(downsampled) as samfile:
          for read in samfile:
              if read.is_unmapped:
                  continue
              counted += 1
              buffer.append(str(read.tid) + ":" + str(read.pos))
              if counted % binsize == 0:
                  seen_starts.update(buffer)
                  buffer = []
                  num_reads.append(counted)
                  starts.append(len(seen_starts))
          seen_starts.update(buffer)
          num_reads.append(counted)
          starts.append(len(seen_starts))
      return pd.DataFrame({"reads": num_reads, "starts": starts})
docs: Return a set of x, y points where x is the number of reads sequenced and
      y is the number of unique start sites identified
      If sample size < total reads in a file the file will be downsampled.