예제 #1
0
파일: Plots.py 프로젝트: airanmehr/bio
def plotQuantile(df, kde):
    import Util as utl
    quantiles = np.sort(np.append(np.linspace(0.0, 1, 1000)[:-1], np.linspace(0.999, 1, 10)))
    qq = pd.concat([utl.getQantilePvalues(df.COMALE, kde, quantiles=quantiles),
                    utl.getQantilePvalues(df.COMALENC, kde, quantiles=quantiles)], axis=1);
    qq.columns = ['data', 'null'];
    QQPval(qq, fname=utl.paperFiguresPath + 'qq.pdf')
예제 #2
0
파일: QQ.py 프로젝트: airanmehr/bio
def real():
    G = pd.read_pickle(utl.outpath + 'real/real.replicates.uptoF59.maxLikelihoods.regularized.LowCovRemoved.df');
    G = G.s * (G.alt - G.null)
    R = pd.read_pickle(utl.outpath + 'real/real.replicates.uptoF59.df');
    F=pd.read_pickle(utl.outpath+'real/negativeControl.Simulations.maxLikelihoods.regularized.df');F=F.s*(F.alt-F.null)
    kde=utl.getDensity(F,width=100)
    q = np.sort(np.append(np.linspace(0.0, 1, 100)[:-1], np.linspace(0.999, 1, 1000)))
    qq=pd.concat([utl.getQantilePvalues(G,kde,quantiles=q),utl.getQantilePvalues(F,kde,quantiles=q)],axis=1);qq.columns=['data','null'];
    pplt.QQPval(qq, fname=utl.paperFiguresPath + 'qq.pdf')
    reload(pplt)
예제 #3
-1
파일: QQ.py 프로젝트: airanmehr/bio
def Simulation():
    a=pd.read_pickle('{}ROC/{}.df'.format(utl.outpath, 'COMALE'));a=a.s*(a.alt-a.null);
    pos=a.loc[(0.1,'COMALE',0.1,1,0)];neg=a.loc[(0.005,'COMALE',0.0,-1,0)]
    F=pd.read_pickle(utl.outpath+'real/negativeControl.Simulations.maxLikelihoods.regularized.df').loc[0];F=F.s*(F.alt-F.null)
    q=np.linspace(0,1,1200)
    kde=utl.getDensity(F,width=50)
    qq=pd.concat([utl.getQantilePvalues(pos,kde,quantiles=q),utl.getQantilePvalues(neg,kde,quantiles=q)],axis=1);qq.columns=['data','null'];
    pplt.QQPval(qq)
    plt.savefig(utl.paperFiguresPath + 'qqsim.pdf')