code: def getCumPos(data):
      
      pos = getPosNew(data)
      chrom= data.geno['col_header']['chrom'][:]
      n_chroms = int(chrom.max())
      x = 0
      for chrom_i in range(1,n_chroms+1):
          I = chrom==chrom_i
          pos[I]+=x
          x=pos[I].max()
      return pos
docs: getCumulativePosition