def extract_metadata_column(sample_ids, metadata, category):
 col_ix = metadata[1].index(category)
 map_sample_ids = zip(*metadata[0])[0]
 category_labels = []
 for (i, sample_id) in enumerate(sample_ids):
  if (sample_id in map_sample_ids):
   row_ix = map_sample_ids.index(sample_id)
   entry = metadata[0][row_ix][col_ix]
   category_labels.append(entry)
 return category_labels

def extract_metadata_column ( sample_ids , metadata , category ) : col_ix = metadata [ 1 ] . index ( category ) map_sample_ids = zip ( * metadata [ 0 ] ) [ 0 ] category_labels = [ ] for ( i , sample_id ) in enumerate ( sample_ids ) : if ( sample_id in map_sample_ids ) : row_ix = map_sample_ids . index ( sample_id ) entry = metadata [ 0 ] [ row_ix ] [ col_ix ] category_labels . append ( entry ) return category_labels
extracts values from the given metadata column .