def getMappingDict(featName, auxName):

    mapDict = {}

    if (featName[1] == ':'):
        if (featName[6] == ':'):
            tokenList = featName.split(':')
            tmpFeatName = tokenList[2]
    else:
        tmpFeatName = featName

    try:
        mapFilename = "../" + auxName + "/" + tmpFeatName + ".map"
        fh = file(mapFilename)
        firstLine = 1
        for aLine in fh:
            aLine = aLine.strip()
            ## aLine = aLine.upper()
            tokenList = aLine.split('\t')
            if (firstLine):
                if (tokenList[0].upper() == tmpFeatName.upper()):
                    numNew = len(tokenList) - 1
                    newNames = tokenList[1:]
                    print newNames
                    firstLine = 0
                else:
                    print " ERROR ??? invalid mapping file ??? "
                    print mapFilename
                    print tokenList
                    print tmpFeatName
                    print " FAILING out of TRY "
                    sys.exit(-1)
            else:
                mapDict[str(tokenList[0])] = tokenList[1:]
        fh.close()
        print " mapping dictionary read from <%s> : " % mapFilename
        print mapDict
        print " "
        return (mapDict, newNames)
    except:
        return (mapDict, [])