from typing import OrderedDict


def to_gff_attributes(s):
    """Convert a GFF attribute string to an OrderedDict."""
    attr_d = OrderedDict()
    attributes = s.split(';')
    for attribute in attributes:
        k, v = attribute.split('=')
        if ',' in v:
            v = v.split(',')
        attr_d[k] = v
    return attr_d