original_docstring: 
                 +-----------+
                 |           |
                 |           |
                 +-------+   |
                 |       |   |
                 |       |   |
                 +---+   |   |
                 |   |   |   |
                 |   v   v   v
               |---|---|---|---|---|---|---|
          Bin    1   2   3   4   5   6   7 ...
  
          The bin that is compared to the other bins are the column of the
          table, the bins they are compared to are the rows. Th
          
docstring: 
  
  The bin that is compared to the other bins are the column of the
  table, the bins they are compared to are the rows. Th
docstring_tokens: The bin that is compared to the other bins are the column of the table the bins they are compared to are the rows . Th
code: def _get_counts_for_chroms(self, chrom, bin_size):
          """
                 +-----------+
                 |           |
                 |           |
                 +-------+   |
                 |       |   |
                 |       |   |
                 +---+   |   |
                 |   |   |   |
                 |   v   v   v
               |---|---|---|---|---|---|---|
          Bin    1   2   3   4   5   6   7 ...
  
          The bin that is compared to the other bins are the column of the
          table, the bins they are compared to are the rows. Th
          """
  
          # Generate submatrix for this chromosome as only
          # intra-chromosomal interactions should be considered
          submatrix = self.select(keep_pattern=chrom)
          seen_pairs = set()
          col_counter = 0
          self._chroms_dists_and_countings[chrom] = {}
          self._chroms_dists_and_countings[chrom]["dists"] = np.array([])
          self._chroms_dists_and_countings[chrom]["countings"] = np.array([])
          for col_bin in submatrix.alt_matrix_values():
              col_counter += 1
              row_counter = 0
              for counting, row_bin in zip(
                      submatrix.hic_matrix_df[col_bin],
                      submatrix.hic_matrix_df["Regions"]):
                  row_counter += 1
                  bin_pair = tuple(sorted([row_bin, col_bin]))
                  # Skip bin pair comparison measured before
                  if bin_pair in seen_pairs:
                      continue
                  seen_pairs.add(bin_pair)
                  # Calculate the distance between the two considered bins
                  dist = abs(row_counter - col_counter) * bin_size
                  self._chroms_dists_and_countings[chrom]["dists"] = np.append(
                      self._chroms_dists_and_countings[chrom]["dists"], dist)
                  self._chroms_dists_and_countings[chrom][
                      "countings"] = np.append(
                          self._chroms_dists_and_countings[chrom]["countings"],
                          counting)
code_tokens: def _get_counts_for_chroms ( self , chrom , bin_size ) : submatrix = self . select ( keep_pattern = chrom ) seen_pairs = set ( ) col_counter = 0 self . _chroms_dists_and_countings [ chrom ] = { } self . _chroms_dists_and_countings [ chrom ] [ "dists" ] = np . array ( [ ] ) self . _chroms_dists_and_countings [ chrom ] [ "countings" ] = np . array ( [ ] ) for col_bin in submatrix . alt_matrix_values ( ) : col_counter += 1 row_counter = 0 for counting , row_bin in zip ( submatrix . hic_matrix_df [ col_bin ] , submatrix . hic_matrix_df [ "Regions" ] ) : row_counter += 1 bin_pair = tuple ( sorted ( [ row_bin , col_bin ] ) ) if bin_pair in seen_pairs : continue seen_pairs . add ( bin_pair ) dist = abs ( row_counter - col_counter ) * bin_size self . _chroms_dists_and_countings [ chrom ] [ "dists" ] = np . append ( self . _chroms_dists_and_countings [ chrom ] [ "dists" ] , dist ) self . _chroms_dists_and_countings [ chrom ] [ "countings" ] = np . append ( self . _chroms_dists_and_countings [ chrom ] [ "countings" ] , counting )
short_docstring: +-----------+
  |           |
  |           |
  +-------+   |
  |       |   |
  |       |   |
  +---+   |   |
  |   |   |   |
  |   v   v   v
  |---|---|---|---|---|---|---|
  Bin    1   2   3   4   5   6   7 ...
short_docstring_tokens: + ----------- + | | | | + ------- + | | | | | | | + --- + | | | | | | | v v v | --- | --- | --- | --- | --- | --- | --- | Bin 1 2 3 4 5 6 7 ...
comment: """
                 +-----------+
                 |           |
                 |           |
                 +-------+   |
                 |       |   |
                 |       |   |
                 +---+   |   |
                 |   |   |   |
                 |   v   v   v
               |---|---|---|---|---|---|---|
          Bin    1   2   3   4   5   6   7 ...
  
          The bin that is compared to the other bins are the column of the
          table, the bins they are compared to are the rows. Th
          """$SEP$# Generate submatrix for this chromosome as only$SEP$# intra-chromosomal interactions should be considered$SEP$# Skip bin pair comparison measured before$SEP$# Calculate the distance between the two considered bins