コード例 #1
0
ファイル: hase.py プロジェクト: urmovosa/hase
                        break
                    else:
                        print 'There are {} common ids in phenotype files and PD data!'.format(
                            np.sum(phen_ind != -1))
                    C_test = C[phen_ind]
                    b_cov_test = b_cov[:, phen_ind]

                    b4 = B4(phenotype, genotype)
                    print("B4 shape is {}".format(b4.shape))
                    t_stat, SE = HASE(b4, a_inv, b_cov_test, C_test, N_con, DF)

                    if mapper.cluster == 'y':
                        Analyser.cluster = True
                        Analyser.chunk = ch
                        Analyser.node = mapper.node[1]
                    Analyser.t_stat = t_stat
                    Analyser.SE = SE
                    Analyser.threshold = args.thr
                    Analyser.out = args.out
                    Analyser.save_result(phen_names[(phen_ind != -1)])

                    t_stat = None
                    Analyser.t_stat = None
                    gc.collect()

            else:
                t_stat, SE = HASE(b4, a_inv, b_cov, C, N_con, DF)

                Analyser.t_stat = t_stat
                Analyser.SE = SE
                Analyser.threshold = args.thr
コード例 #2
0
ファイル: hase.py プロジェクト: roshchupkin/hase
					phen_ind=np.in1d(keys, names)
					phen_ind_inv=np.in1d(names,keys)
					if np.sum(phen_ind)==0:
						print 'There is no common ids in phenotype file {} and PD data!'.format((phen.folder._data.filename))
						break
					C_test=C[phen_ind]
					b_cov_test=b_cov[:,phen_ind]

					b4 = B4(phenotype,genotype)
					t_stat,SE =HASE(b4, a_inv, b_cov_test, C_test, N_con, DF)

					if mapper.cluster=='y':
						Analyser.cluster=True
						Analyser.chunk=ch
						Analyser.node=mapper.node[1]
					Analyser.t_stat=t_stat
					Analyser.SE=SE
					Analyser.threshold=args.thr
					Analyser.out=args.out
					Analyser.save_result(  names[phen_ind_inv] )

					t_stat=None
					Analyser.t_stat=None
					gc.collect()

			else:
				t_stat,SE=HASE(b4, a_inv, b_cov, C, N_con, DF)

				Analyser.t_stat=t_stat
				Analyser.SE=SE
				Analyser.threshold=args.thr