code: def parse_single_report(f):
      
  
      parsed_data = OrderedDict()
      for l in f.splitlines():
          s = l.split("\t")
          try:
              parsed_data[s[0]] = int(s[2])
          except (IndexError, ValueError):
              pass
      return parsed_data
docs: Parse a samtools idxstats idxstats