def parse_metadata(sample_list):
    """
    Determine if samples are paired or single end, and return metadata to match

    :param sample_list: List of Sample objects
    :return: metadata dictionary
    """
    # add the layout type to the sequencing run so we know if it is paired or single end
    if sample_list[0].sequence_file.is_paired_end():
        metadata = {'layoutType': 'PAIRED_END'}
    else:
        metadata = {'layoutType': 'SINGLE_END'}

    return metadata