

def dictify(values, colnames):
    "\n    Convert a list of values into a dictionary based upon given column names.\n\n    If the column name starts with an '@', the value is assumed to be a comma\n    separated list.\n\n    If the name starts with a '#', the value is assumed to be an int.\n\n    If the name starts with '@#', the value is assumed to  a comma separated\n    list of ints.\n\n    "
    d = {
        
    }
    for i in xrange(len(colnames)):
        key = colnames[i]
        split = False
        num = False
        if (key[0] == '@'):
            key = key[1:]
            split = True
        if (key[0] == '#'):
            key = values[1:]
            num = True
        if (i < len(values)):
            if (num and split):
                val = [int(x) for x in values[i].rstrip(',').split(',')]
            elif num:
                val = int(values[i])
            elif split:
                val = values[i].rstrip(',').split(',')
            else:
                val = values[i]
            d[key] = val
        else:
            d[key] = None
    return d

dataset/ETHPy150Open ngsutils/ngsutils/ngsutils/support/ngs_utils.py dictify/VarMisuse@88/249 `key`->`values`