def dinuc_shuffling_generator(argu): seqs, fg_gc_list, fg_lengths = get_seqs(argu.fg_file) bg_gc_list, bg_lengths = dinuc_shuff.generate_sequences(seqs, argu.nfold) make_r_gc_plots(fg_gc_list, bg_gc_list, "Foreground", "Generated background", "GC", "\nGC plot") make_r_len_plots(fg_lengths, bg_lengths, "Foreground", "Generated background", "Len", "\nLength plot")
def dinuc_shuffling_generator(argu): seqs, fg_gc_list, fg_lengths = get_seqs(argu.fg_file) bg_gc_list, bg_lengths = dinuc_shuff.generate_sequences(seqs, argu.nfold) make_r_gc_plots(fg_gc_list, bg_gc_list, "Foreground", "Generated background", "GC", "\nGC plot") make_r_len_plots(fg_lengths, bg_lengths, "Foreground", "Generated background", "Len", "\nLength plot")
def main(): args = sys.argv utils.validate_input(args) sub_matrix_path, seqs_paths = utils.split_input(args) sub_matrix = utils.read_scoring_matrix(sub_matrix_path) alphabet = utils.read_alphabet(sub_matrix_path) seqs_dict = utils.get_seqs(seqs_paths) i = 0 for id1, seq1 in seqs_dict.items(): j = 0 for id2, seq2 in seqs_dict.items(): if i < j: timestart = datetime.now() hsps = utils.find_hsps(k, T, sub_matrix, seq1, seq2, alphabet) msps = utils.extend_hsps_to_msps(hsps, sub_matrix, seq1, seq2, X) graph = utils.gen_graph(msps) score = utils.runDAG(graph) timedelta = datetime.now() - timestart utils.update_output_file(id1, id2, score) print(f"({id1}, {id2}):\t{timedelta}\t msps: {len(msps)}") j += 1 i += 1
def dinuc_shuffling_window_generator(argu): seqs, _, _ = get_seqs(argu.fg_file) _, _ = dinuc_win_shuff.generate_sequences(seqs, argu.winlen, argu.step, argu.nfold)
def dinuc_shuffling_generator(argu): seqs, _, _ = get_seqs(argu.fg_file) _, _ = dinuc_shuff.generate_sequences(seqs, argu.nfold)
def dinuc_shuffling_window_generator(argu): seqs, _, _ = get_seqs(argu.fg_file) _, _ = dinuc_win_shuff.generate_sequences(seqs, argu.winlen, argu.step, argu.nfold)
def dinuc_shuffling_generator(argu): seqs, _, _ = get_seqs(argu.fg_file) _, _ = dinuc_shuff.generate_sequences(seqs, argu.nfold)