def driverGnab(dataD, driverList):

    print " "
    print " ************************************************************* "
    print " ************************************************************* "
    print " "
    print " in driverGnab ... "

    # check that the input feature matrix looks ok ...
    try:
        numRow = len(dataD['rowLabels'])
        numCol = len(dataD['colLabels'])
        rowLabels = dataD['rowLabels']
        print " %d rows x %d columns " % (numRow, numCol)
        # print rowLabels[:5]
        # print rowLabels[-5:]
    except:
        print " ERROR in driverGnab ??? bad data ??? "
        return (dataD)

    mutationTypes = [":y_n_somatic", ":code_potential_somatic",
                     ":missense_somatic",
                     ":y_del_somatic", ":y_amp_somatic"]
    numTypes = len(mutationTypes)

    numK = 1
    newNameVec = [0] * (numK * numTypes)
    newDataMat = [0] * (numK * numTypes)

    dMat = dataD['dataMatrix']

    kFeat = 0
    if (1):

        for aMutType in mutationTypes:

            newFeatName = "B:GNAB:driverMut" + "::::" + aMutType

            # first make sure we don't already have a feature with this name
            # ...
            stopNow = 0
            for iRow in range(numRow):
                if (newFeatName == rowLabels[iRow]):
                    stopNow = 1
            if (stopNow):
                continue

            print " tentative new feature #%d ... <%s> " % (kFeat, newFeatName)
            newNameVec[kFeat] = newFeatName
            newDataMat[kFeat] = numpy.zeros(numCol)

            for iR in range(numRow):

                if (iR % 1000 == 0):
                    print iR, numRow

                if (1):
                    gnabLabel = rowLabels[iR]
                    if (not gnabLabel.startswith("B:GNAB:")):
                        continue
                    if (gnabLabel.find(aMutType) < 0):
                        continue

                    try:
                        gnabTokens = gnabLabel.split(':')
                        gnabGene = gnabTokens[2].upper()
                    except:
                        print " FAILED to parse GNAB feature name ??? ", gnabLabel
                        continue

                    print "         considering ", iR, gnabTokens, gnabGene
                    if (gnabGene in driverList):
                        for iCol in range(numCol):
                            if (dMat[iR][iCol] == 1):
                                print "             yes!  setting bit at ", kFeat, iCol
                                newDataMat[kFeat][iCol] = 1

            if (1):
                print " --> keeping this feature ... ", kFeat, newFeatName
                kFeat += 1

    numNewFeat = kFeat
    print " "
    print " --> number of new features : ", numNewFeat
    print len(newDataMat), len(newDataMat[0])

    # now we need to append these new features to the input data matrix
    newRowLabels = [0] * (numRow + numNewFeat)
    newMatrix = [0] * (numRow + numNewFeat)
    for iR in range(numRow):
        newRowLabels[iR] = rowLabels[iR]
        newMatrix[iR] = dMat[iR]
    for iR in range(numNewFeat):
        newRowLabels[iR + numRow] = newNameVec[iR]
        newMatrix[iR + numRow] = newDataMat[iR]

    dataD['rowLabels'] = newRowLabels
    dataD['dataMatrix'] = newMatrix

    print " "
    print " --> finished with driverGnab ... "
    print " "

    return (dataD)