print "pvals: " + str(pval) print "\n\n\n" print "Load Data!" [y, BED] = getData(bedFil) print "Calculating MU matrix" if num < 1: MU = MU_LMM(BED, (se2, sg2)) else: MU = MU_LMM(BED, [num, epsilon]) if typ == "Top": PrivGWAS.Top(MU, y, epsilon, mret, algor, savename) elif typ == "Count": PrivGWAS.count(MU, y, epsilon, pval, savename) elif typ == "Wald": PrivGWAS.wald(MU, y, epsilon, snps, savename) elif typ == "Herit": print "The estimated heritability:" print "Sigma_e^2 is " + str(MU.se2) print "Sigma_g^2 is " + str(MU.sg2) print "Good bye!" else: print "Specified task " + typ + " not recognized." print "Good bye!" if __name__ == "__main__": args = sys.argv if len(args) > 1 and args[1][0] != "-": fil = open(args[1]) lines = fil.readlines()
print "pvals: "+str(pval); print "\n\n\n"; print "Load Data!" [y,BED]=getData(bedFil); print "Calculating MU matrix" if num<1: MU=MU_LMM(BED,(se2,sg2)); else: MU=MU_LMM(BED,[num,epsilon]); if typ=="Top": PrivGWAS.Top(MU,y,epsilon,mret,algor,savename); elif typ=="Count": PrivGWAS.count(MU,y,epsilon,pval,savename); elif typ=="Wald": PrivGWAS.wald(MU,y,epsilon,snps,savename); elif typ=="Herit": print "The estimated heritability:" print "Sigma_e^2 is "+str(MU.se2); print "Sigma_g^2 is "+str(MU.sg2); print "Good bye!" else: print "Specified task "+typ+" not recognized." print "Good bye!" if __name__=="__main__": args=sys.argv; if len(args)>1 and args[1][0]!="-": fil=open(args[1]);
print "Use exact method!" print "\n\n\n"; print "Load Data!" [y,BED]=getData(bedFil); print "Calculating MU matrix" MU=MU_STRAT(BED,k); if exact: MU.calcMU(k,exact=True); n=len(y); if typ=="Top": PrivGWAS.Top(MU,y,epsilon,mret,algor,savename,snpList); elif typ=="Count": PrivGWAS.count(MU,y,epsilon,pval,savename); elif typ=="Wald": PrivGWAS.wald(MU,y,epsilon,snps,savename,coeff=float(n-k-1)); if __name__=="__main__": args=sys.argv; if len(args)>1 and args[1][0]!="-": fil=open(args[1]); lines=fil.readlines(); fil.close() args=[]; args.append("UI.py") for l in lines: s=l.strip().split();
print "Use exact method!" print "\n\n\n" print "Load Data!" [y, BED] = getData(bedFil) print "Calculating MU matrix" MU = MU_STRAT(BED, k) if exact: MU.calcMU(k, exact=True) n = len(y) if typ == "Top": PrivGWAS.Top(MU, y, epsilon, mret, algor, savename, snpList) elif typ == "Count": PrivGWAS.count(MU, y, epsilon, pval, savename) elif typ == "Wald": PrivGWAS.wald(MU, y, epsilon, snps, savename, coeff=float(n - k - 1)) if __name__ == "__main__": args = sys.argv if len(args) > 1 and args[1][0] != "-": fil = open(args[1]) lines = fil.readlines() fil.close() args = [] args.append("UI.py") for l in lines: s = l.strip().split() args.extend(s) Interface(args)