for _ in range(3): print(_) for __ in range(10): train_env.maxI = 2 train_env.p = [SNPprob[_], 0] agent = Agent(FLAGS, False, train_env, train_model) seq1 = agent.env.seq1 seq2 = agent.env.seq2 start1, start2, lcslen = lcs.longestSubstring(seq1, seq2) if FLAGS.show_align: dot_plot = 255 * np.ones((len(seq1), len(seq2))) for i in range(lcslen): dot_plot[start1 + i, start2 + i] = 0 if FLAGS.print_align: record = recordalign.record_align() print("test", _, __) print("raw seq len", len(seq1), len(seq2)) print("lcs len 1", start1, lcslen, len(seq1) - start1 - lcslen) print("lcs len 2", start2, lcslen, len(seq2) - start2 - lcslen) past = time.time() if (start1 > 0) and (start2 > 0): agent.set(seq1[start1 - 1::-1] + [0], seq2[start2 - 1::-1] + [0]) if FLAGS.show_align and FLAGS.print_align: rT1, rT2, processingtime, j, dot_plot1 = agent.Global( sess, record) dot_plot[:start1, :start2] = dot_plot1[::-1, ::-1] record.reverse(start1 - 1, start2 - 1)
start = time.time() startdate = time.localtime() X = 100 # Greedy-X algorithm parameter agent.set(seq1, seq2) path = [] score = [] ptime = [] if FLAGS.show_align: dot_plot = 255 * np.ones((len(seq1), len(seq2))) for i in range(lcslen): dot_plot[start1 + i, start2 + i] = 0 if FLAGS.print_align: record = recordalign.record_path() print("Ecoli test") print("raw seq len", len(seq1), len(seq2)) past = time.time() SeedNum = REMiner2.REMiner2(1, seq1, seq2) uX1, uX2, uY1, uY2 = REMiner2.GetSEED(SeedNum, True) uX1, uX2, uY1, uY2 = function.sortalign(uX1, uX2, uY1, uY2) print("Pre-processing stage is completed : " + str(np.size(uX1)) + " seeds are found") print("Time spent : " + str(time.time() - past)) #순서를 다시 잡도록 노력하자, RC 부분이랑 나눠서 순서 정하기