def mapping_file_to_dict(mapping_data, header):
 map_dict = {}
 for i in range(len(mapping_data)):
  sam = mapping_data[i]
  map_dict[sam[0]] = {}
  for j in range(len(header)):
   if (j == 0):
    continue
   map_dict[sam[0]][header[j]] = sam[j]
 return map_dict

def mapping_file_to_dict ( mapping_data , header ) : map_dict = { } for i in range ( len ( mapping_data ) ) : sam = mapping_data [ i ] map_dict [ sam [ 0 ] ] = { } for j in range ( len ( header ) ) : if ( j == 0 ) : continue map_dict [ sam [ 0 ] ] [ header [ j ] ] = sam [ j ] return map_dict
processes mapping data in list of lists format into a 2 deep dict .