code: def parse_bismark_bam2nuc(self, f):
          
          if f['s_name'] in self.bismark_data['bam2nuc']:
              log.debug("Duplicate deduplication sample log found! Overwriting: {}".format(f['s_name']))
          self.add_data_source(f, section='bam2nuc')
          self.bismark_data['bam2nuc'][f['s_name']] = dict()
  
          headers = None
          for l in f['f']:
              sections = l.rstrip().split("\t")
              if headers is None:
                  headers = sections
              else:
                  for i, h in enumerate(headers):
                      if i == 0:
                          k = sections[0]
                      else:
                          key = "{}_{}".format(k, h.lower().replace(' ','_'))
                          self.bismark_data['bam2nuc'][f['s_name']][key] = sections[i]
docs: Parse reports generated by Bismark bam2nuc