code: def get_qtls_from_rqtl_data(matrix, lod_threshold):
      t_matrix = list(zip(*matrix))
      qtls = [['Trait', 'Linkage Group', 'Position', 'Exact marker', 'LOD']]
      for row in t_matrix[3:]:
          lgroup = None
          max_lod = None
          peak = None
          cnt = 1
          while cnt < len(row):
              if lgroup is None:
                  lgroup = t_matrix[1][cnt]
              if lgroup == t_matrix[1][cnt]:
                  if max_lod is None:
                      max_lod = float(row[cnt])
                  if float(row[cnt]) > float(max_lod):
                      max_lod = float(row[cnt])
                      peak = cnt
              else:
                  if max_lod \
                          and float(max_lod) > float(lod_threshold) \
                          and peak:
                      qtl = [row[0],
                             t_matrix[1][peak],
                             t_matrix[2][peak],
                             t_matrix[0][peak],
                             max_lod,
                             ]
                      qtls.append(qtl)
                  lgroup = None
                  max_lod = None
                  peak = cnt
              cnt = cnt + 1
      return qtls