def featurelist2map(lst):
    """
    create a dictionary for a list of features
    for each name one name one entry is created in the map containing 
    1. pos : the position of the features with the name
    2. sgn : a sorted list of signs of the features with the name
    3. cnt : the number of features with the name
    3. scr : the sum of the scores of features with the name

    @param[in] lst a list of features 
    """
    mp = {}
    for f in lst:
        if not f.name in mp:
            mp[f.name] = {}
            mp[f.name]['pos'] = set()
            mp[f.name]['sgn'] = None
            mp[f.name]['cnt'] = 0
            mp[f.name]['scr'] = 0
            mp[f.name]['start'] = 100000000
            mp[f.name]['stop'] = -1
            mp[f.name]['type'] = ''
        if f.strand > 0:
            mp[f.name]['start'] = min(f.start, mp[f.name]['start'])
            mp[f.name]['stop'] = max(f.stop, mp[f.name]['stop'])
        else:
            mp[f.name]['start'] = min(f.start, mp[f.name]['stop'])
            mp[f.name]['stop'] = max(f.stop, mp[f.name]['start'])
        mp[f.name]['pos'] = mp[f.name]['pos'].union(set(range(f.start, f.
            stop + 1)))
        if mp[f.name]['sgn'] == None or mp[f.name]['sgn'] == f.strand:
            mp[f.name]['sgn'] = f.strand
        else:
            f.strand = 0
        mp[f.name]['cnt'] += 1
        if f.score == None:
            mp[f.name]['scr'] += 0
        else:
            mp[f.name]['scr'] += f.score * (f.stop - f.start + 1)
        mp[f.name]['type'] = f.type
    return mp
