def parse_attribute(attStr, default='*', ID_tags=
    'ID,gene_id,transcript_id,mRNA_id', Name_tags=
    'Name,gene_name,transcript_name,mRNA_name', Type_tags=
    'Type,gene_type,gene_biotype,biotype', Parent_tags='Parent'):
    """
    Parse attributes in GTF or GFF3

    Parameters
    ----------
    attStr: string
        String containing attributes either in GTF or GFF3 format.
    default: string
        default value for ID, Name, Type and Parent.
    ID_tags: string
        Multiple tags for ID. Use comma for delimit. 
        If multiple tags found, use the last one.
    Name_tags: string
        Multiple tags for Name. Use comma for delimit. 
        If multiple tags found, use the last one.
    Type_tags: string
        Multiple tags for Type. Use comma for delimit. 
        If multiple tags found, use the last one.
    Parent_tags: string
        Multiple tags for Parent. Use comma for delimit. 
        If multiple tags found, use the last one.

    Returns
    -------
    RV: library of string
        Library of all tags, always including ID, Name, Type, Parenet.
    """
    RV = {}
    RV['ID'] = default
    RV['Name'] = default
    RV['Type'] = default
    RV['Parent'] = default
    ID_tags = ID_tags.split(',')
    Name_tags = Name_tags.split(',')
    Type_tags = Type_tags.split(',')
    Parent_tags = Parent_tags.split(',')
    attList = attStr.rstrip().split(';')
    for att in attList:
        while len(att) > 0 and att[0] == ' ':
            att = att[1:]
        if len(att) == 0:
            continue
        if att.find('=') > -1:
            _att = att.split('=')
        else:
            _att = att.split(' ')
        if len(_att) < 2:
            print("Can't pase this attribute: %s" % att)
            continue
        if _att[1][0] == '"':
            _att[1] = _att[1].split('"')[1]
        if ID_tags.count(_att[0]) == 1:
            RV['ID'] = _att[1]
        elif Name_tags.count(_att[0]) == 1:
            RV['Name'] = _att[1]
        elif Type_tags.count(_att[0]) == 1:
            RV['Type'] = _att[1]
        elif Parent_tags.count(_att[0]) == 1:
            RV['Parent'] = _att[1]
        else:
            RV[_att[0]] = _att[1]
    return RV
