cput=2000:0:0
mem=256
N_PARTICLES=30;
parpool(30);


n_chunk = 220;

model_A_path = 'results/models_2015/Bl6_WT_6Wk_thymus_outframe_aggregate.mat';
model_A_name = 'Bl6_WT_6Wk_thymus_outframe_aggregate';
model_B_path = 'results/models_2015/Bl6_WT_E17_thymus_outframe_aggregate.mat';
model_B_name = 'Bl6_WT_E17_thymus_outframe_aggregate';
alignments_file_base_name = 'results/alignments/aggregate_Bl6_WT_D4_blood_unique_outframe/aggregate_Bl6_WT_D4_blood_unique_outframe';
model_type = 'Mus_V_DJ_cuts_insertions_dinuc_ntbias_model';
out_file = 'results/test.mat'

model_A = load(model_A_path, 'model');
model_A = model_A.model;
model_B = load(model_B_path, 'model');
model_B = model_B.model;


tic;
[model_A_info] = get_infer_using_model(alignments_file_base_name, model_A, n_chunk);
[model_B_info] = get_infer_using_model(alignments_file_base_name, model_B, n_chunk);
toc;

model_A_info.name = model_A_name;
model_A_info.model_type = model_type;
model_A_info.alignments_used = alignments_file_base_name;
model_B_info.name = model_B_name;
model_B_info.model_type = model_type;
model_B_info.alignments_used = alignments_file_base_name;

save(out_file, 'model_A_info', 'model_B_info');


delete(gcp);
