def parseCSV(csv_file):
    """parses a CSV file, using the first line as a header (of column names)
    ASSUMES: sampleIDs are the first column
    returns a dictionary of dictionarys, e.g.
    {sampleID: {col1: val1, col2: val2, ...}}
    """
    ret = {}
    f = open(csv_file)
    cols = f.readline().strip().split(",")
    
    #read the rest
    for l in f:
        tmp = l.strip().split(',')
        #enter new record - don't enter the first col, which is sampleID
        ret[tmp[0]] = dict(zip(cols[1:], tmp[1:]))
    f.close()
    return ret