def read_metadata(metadata_file_fp):
    """Read metadata into dictionary.
    """
    metadata = {}
    with open(metadata_file_fp) as metadata_file_f:
        for line in metadata_file_f:
            line = line.strip().split('\t')
            sample_id = line[0]
            if sample_id not in metadata:
                metadata[sample_id] = line[1:]
            else:
                raise ValueError("Duplicate samples: %s" % sample_id)
    return metadata