def readPhenoFile(pfile,idx=None):
    """"
    reading in phenotype file

    pfile   root of the file containing the phenotypes as NxP matrix
            (N=number of samples, P=number of traits)
    """

    usecols = None
    if idx!=None:
        """ different traits are comma-seperated """
        usecols = [int(x) for x in idx.split(',')]
        
    phenoFile = pfile+'.phe'
    assert os.path.exists(phenoFile), '%s is missing.'%phenoFile
    Y = SP.loadtxt(phenoFile,usecols=usecols)
    if (usecols is not None) and (len(usecols)==1): Y = Y[:,SP.newaxis]
        
    Y -= Y.mean(0); Y /= Y.std(0)
    return Y
reading in phenotype file

    pfile   root of the file containing the phenotypes as NxP matrix
            (N=number of samples, P=number of traits)