def load_EMG_out_k_simulations(FILE): G = list() S = None t = 0 with open(FILE) as FH: for line in FH: if ">" == line[0]: if S is not None : G.append(S) S = ROCsi.segment(line) elif "~" == line[0]: S.add_model(line) # if t > 1000: # break return G
ax_cbar.set_yticklabels([str(x)[:5] for x in np.linspace(0, 10, len(ax_cbar.get_yticklabels()))]) ax_cbar.yaxis.set_label_position("left") plt.show() if __name__ == "__main__": N_by_Wp = False DISCRETE = False foot_print = False fp_si = "/Users/joazofeifa/Lab/simulation_analysis/fp_si-1_K_models_MLE.tsv" disctete = "/Users/joazofeifa/Lab/simulation_analysis/discrete_uni-1_K_models_MLE.tsv" N_by_W_uni = "/Users/joazofeifa/Lab/simulation_analysis/N_wp_uni-1_K_models_MLE.tsv" N_by_W_prior = "/Users/joazofeifa/Lab/simulation_analysis/N_by_Wp_prior-1_K_models_MLE.tsv" disctete = ROCsi.load_tfit_out(disctete, CHECK=False) N_by_W_uni = ROCsi.load_tfit_out(N_by_W_uni, CHECK=False) N_by_W_prior = ROCsi.load_tfit_out(N_by_W_prior, CHECK=False) fp_si = ROCsi.load_tfit_out(fp_si, CHECK=False) display_heat_maps(disctete, N_by_W_uni, N_by_W_prior, fp_si) if foot_print: bg_k_sim_pos = "/Users/joazofeifa/Lab/EMG/TF_predictions/files/fp_by_si.pos.bedgraph" bg_k_sim_neg = "/Users/joazofeifa/Lab/EMG/TF_predictions/files/fp_by_si.neg.bedgraph" int_k_sim = "/Users/joazofeifa/Lab/EMG/TF_predictions/files/fp_by_si_intervals.bed" evaulate_fp_si(bg_k_sim_pos, bg_k_sim_neg, int_k_sim) if DISCRETE: bg_k_sim_pos = "/Users/joazofeifa/Lab/EMG/TF_predictions/files/discete_eval.pos.bedgraph"