def read_group_string(experiment_sample):
    """
    Generate a SAM header string for the read group.
    Passed to bwa with escaped tabs.
    """
    read_group_fields = [
            '@RG',
            'ID:'+experiment_sample.uid,
            'PL:illumina',
            'PU:'+experiment_sample.uid,
            'LB:'+experiment_sample.uid,
            'SM:'+experiment_sample.uid]

    return('\\t'.join(read_group_fields))