def merged_genmodelwrapper_1363_TRB(): fn_margs, fn_params = get_1363_TRB_marginals_and_params_filenames() gmw = GenModelWrapper(fn_params, fn_margs, '1363_TRB_', DummyLogger()) gmw.merge_alleles(assert_merge_definitions=True) return gmw
merge_defs.set_merge_definitions([merge_def1]) return merge_defs data_folder = get_testdata_folder() fn_ced = os.path.join(data_folder, 'models_imgt_ref_dir_sep2019', 'HC') fn_1363 = os.path.join(fn_ced, '1363_TRB') out_marginals = os.path.join(fn_1363, '1363_TRB_marginals.txt') out_params = os.path.join(fn_1363, '1363_TRB_params.txt') print out_marginals print out_params out_marginals = 'C:/CiR/pTCR/IGOR_models/Unproductive_models/models_imgt_ref_dir_sep2019/HC/1365_TRB/1365_TRB_marginals.txt' out_params = 'C:/CiR/pTCR/IGOR_models/Unproductive_models/models_imgt_ref_dir_sep2019/HC/1365_TRB/1365_TRB_params.txt' gmw = GenModelWrapper(out_params, out_marginals, '1363_TRB_', StdOutLogger()) gmw.merge_alleles(assert_merge_definitions=True) bn = gmw.get_bayesian_network_wrapper().get_network() # truncate_bn = create_truncated_network(bn) # truncate_bn_wrapper = BayesianNetworkWrapper(truncate_bn) merge_defs = create_merg_defs(bn) merged_bayesian_network = gmw.get_bayesian_network_wrapper( ).create_network_with_merged_events(merge_defs, bake=False) merged_bayesian_network.bake() bnwrapper = BayesianNetworkWrapper(merged_bayesian_network) states = {} n = gmw.get_eventname_for_nickname('v_choice') state = bnwrapper.get_state(n) states[n] = state
def genmodelwrapper_1516_TRB(): fn_margs, fn_params = get_1516_TRB_marginals_and_params_filenames() gmw = GenModelWrapper(fn_params, fn_margs, '1516_TRB_', DummyLogger()) return gmw
def test_1__load_tra_genmodelwrapper(): fn_margs, fn_params = get_1516_TRA_marginals_and_params_filenames() gmw = GenModelWrapper(fn_params, fn_margs, '1516_TRA_', DummyLogger()) assert (gmw is not None)