def prepare_known_seeds(args): seqs_shape, seqs_to_test, bin_file_to_test, desired_numbers = define_constants(args) w_motifs_list = [0] * len(seqs_to_test) for ind, seq in enumerate(seqs_to_test): curr_test_motif = structures.w_motif(seqs_shape[0], seqs_shape[1]) curr_test_motif.from_string(seq) w_motifs_list[ind] = curr_test_motif seqs_dict, seqs_order = IO.read_rna_bin_file(bin_file_to_test) w_seqs_list = [seqs_dict[name] for name in seqs_order] n_motifs_list = type_conversions.w_to_n_motifs_list(w_motifs_list) n_seqs_list = type_conversions.w_to_n_sequences_list(w_seqs_list) return n_motifs_list, n_seqs_list
def read_sequences(rna_bin_filename): seqs_dict, seqs_order = IO.read_rna_bin_file(rna_bin_filename) w_seqs_list = [seqs_dict[name] for name in seqs_order] n_seqs_list = type_conversions.w_to_n_sequences_list(w_seqs_list) return n_seqs_list