code: def parse_featurecounts_report (self, f):
          
  
          file_names = list()
          parsed_data = dict()
          for l in f['f'].splitlines():
              thisrow = list()
              s = l.split("\t")
              if len(s) < 2:
                  continue
              if s[0] == 'Status':
                  for f_name in s[1:]:
                      file_names.append(f_name)
              else:
                  k = s[0]
                  if k not in self.featurecounts_keys:
                      self.featurecounts_keys.append(k)
                  for val in s[1:]:
                      try:
                          thisrow.append(int(val))
                      except ValueError:
                          pass
              if len(thisrow) > 0:
                  parsed_data[k] = thisrow
          # Check that this actually is a featureCounts file, as format and parsing is quite general
          if 'Assigned' not in parsed_data.keys():
              return None
          for idx, f_name in enumerate(file_names):
  
              # Clean up sample name
              s_name = self.clean_s_name(f_name, f['root'])
  
              # Reorganised parsed data for this sample
              # Collect total count number
              data = dict()
              data['Total'] = 0
              for k in parsed_data:
                  data[k] = parsed_data[k][idx]
                  data['Total'] += parsed_data[k][idx]
  
              # Calculate the percent aligned if we can
              try:
                  data['percent_assigned'] = (float(data['Assigned'])/float(data['Total'])) * 100.0
              except (KeyError, ZeroDivisionError):
                  pass
  
              # Add to the main dictionary
              if len(data) > 1:
                  if s_name in self.featurecounts_data:
                      log.debug("Duplicate sample name found! Overwriting: {}".format(s_name))
                  self.add_data_source(f, s_name)
                  self.featurecounts_data[s_name] = data
docs: Parse the featureCounts log file.