def main_with_args(args): print(title_string) if len(args) < 1: parser.print_usage() print(description_string) return parameters = parser.parse_args(args) p_dict = vars(parameters) if p_dict['debug']: print('Parsed parameters:') print(p_dict) action = p_dict['ldpred_action'] if action == 'coord': coord_genotypes.main(p_dict) elif action == 'gibbs': LDpred_gibbs.main(p_dict) elif action == 'inf': LDpred_inf.main(p_dict) elif action == 'p+t': LD_pruning_thres.main(p_dict) elif action == 'score': validate.main(p_dict) elif action == 'all': pass else: parser.print_help(sys.stderr) sys.exit(1)
def main(): if len(sys.argv)==1: print ('ERROR: No options provided.\n') parser.print_help(sys.stderr) sys.exit(1) parameters = parser.parse_args() p_dict= vars(parameters) if p_dict['debug']: print ('Parsed parameters:') print(p_dict) action = p_dict['ldpred_action'] if action=='coord': coord_genotypes.main(p_dict) elif action=='gibbs': LDpred_gibbs.main(p_dict) elif action=='inf': LDpred_inf.main(p_dict) elif action=='p+t': LD_pruning_thres.main(p_dict) elif action=='score': validate.main(p_dict) elif action=='ldfile': ld.get_ld_dict(p_dict['cf'], p_dict['ldf'], p_dict['ldr'],wallaceld=True) elif action=='all': pass
def main(): parameters = parser.parse_args() p_dict = vars(parameters) if p_dict['debug']: print('Parsed parameters:') print(p_dict) action = p_dict['ldpred_action'] if action == 'coord': coord_genotypes.main(p_dict) elif action == 'gibbs': LDpred_gibbs.main(p_dict) elif action == 'inf': LDpred_inf.main(p_dict) elif action == 'p+t': LD_pruning_thres.main(p_dict) elif action == 'score': validate.main(p_dict) elif action == 'all': pass
def main(): print(title_string) if len(sys.argv)==1: parser.print_help(sys.stderr) sys.exit(1) parameters = parser.parse_args() p_dict= vars(parameters) if p_dict['debug']: print ('Parsed parameters:') print(p_dict) action = p_dict['ldpred_action'] if action=='coord': coord_genotypes.main(p_dict) elif action=='gibbs': LDpred_gibbs.main(p_dict) elif action=='inf': LDpred_inf.main(p_dict) elif action=='p+t': LD_pruning_thres.main(p_dict) elif action=='score': validate.main(p_dict) elif action=='all': pass
def main(): print(title_string) if len(sys.argv) == 1: parser.print_help(sys.stderr) sys.exit(1) parameters = parser.parse_args() p_dict = vars(parameters) if p_dict['debug']: print('Parsed parameters:') print(p_dict) action = p_dict['ldpred_action'] if action == 'coord': coord_genotypes.main(p_dict) elif action == 'gibbs': LDpred_gibbs.main(p_dict) elif action == 'inf': LDpred_inf.main(p_dict) elif action == 'p+t': LD_pruning_thres.main(p_dict) elif action == 'score': validate.main(p_dict) elif action == 'all': pass
def test_coord_genotypes(self): p_dict = make_p_dict( '--debug', 'coord', '--gf=%s/test_data/sim1_0_test' % TEST_DIR, '--vgf=%s/test_data/sim1_0_test' % TEST_DIR, '--ssf=%s/test_data/sim1_0_ss.txt' % TEST_DIR, '--ssf-format=LDPRED', '--out=%s_coord_genotypes.hdf5' % self.tmp_file_prefix, ) summary_dict = coord_genotypes.main(p_dict) # summary_dict[11]['value'], if present, is the count of non-matching nts. # It should be 0. self.assertEqual(summary_dict.get(11, {}).get('value', 0), 0) with h5py.File(p_dict['out'], 'r') as h5f: self.assertEqual(len(h5f['sum_stats']['chrom_1']['betas']), 2000)