code: def hicpro_capture_chart (self):
          
  
          keys = OrderedDict()
          keys['valid_pairs_on_target_cap_cap'] = { 'color': '#0039e6', 'name': 'Capture-Capture interactions' }
          keys['valid_pairs_on_target_cap_rep']  = { 'color': '#809fff', 'name': 'Capture-Reporter interactions' }
          keys['valid_pairs_off_target'] = { 'color': '#cccccc', 'name': 'Off-target valid pairs' }
    
          # Check capture info are available
          num_samples = 0
          for s_name in self.hicpro_data:
              for k in keys:
                  num_samples += sum([1 if k in self.hicpro_data[s_name] else 0])
          if num_samples == 0:
              return False
  
          # Config for the plot
          config = {
              'id': 'hicpro_cap_plot',
              'title': 'HiC-Pro: Capture Statistics',
              'ylab': '# Pairs',
              'cpswitch_counts_label': 'Number of Pairs'
          }
  
          return bargraph.plot(self.hicpro_data, keys, config)
docs: Generate Capture Hi-C plot