import functions as func import numpy as np np.set_printoptions(precision=3) mat = func.read_matrix("./matrix.txt") A = mat[:, :-1] b = mat[:, -1] print(f"Matrix A:\n{A}\nb column:\n {b}") print(f"Gaussian elimination: {func.gaussian_elim(A, b)}") print(f"Jacobi iterative method: {func.jacobi_method(A, b)}") print(f"Gauss-Seidel iterative method: {func.gauss_seidel_method(A, b)}") print(f"Square root method: {func.square_root_method(A, b)}") print(f"Determinant: {func.determinant(A)}") print(f"Inversed matrix(Square root method): \n{func.square_invert(A)}")
message.append('experiment_name = ' + experiment_name) message.append('working_dir = ' + working_dir) message.append('read_two = ' + read_two) message.append('log_path = ' + log_path) message.append('output_dir = ' + output_dir) message.append('append_target_directory = ' + str(append_target_directory)) message.append('num_threads = ' + str(num_threads)) write_to_log(start_time, log_path, '\n'.join(message)) message = [] # MAIN FUNCTIONS ## Set up start_time = time.time() write_to_log(start_time, log_path, "Start set up") group_barcode_matrix = read_matrix(csv_matrix) indices_list = create_indices_list(indices_path) create_target_directory(output_dir, append_target_directory) desired_barcodes = read_matrix(desired_barcodes) if groups: desired_barcodes, group_barcode_matrix = convert_groups_to_barcodes( desired_barcodes, group_barcode_matrix) file_dictionary = create_fastq_files(output_dir, indices_list, group_barcode_matrix) write_to_log(start_time, log_path, "Finished set up") start_time = time.time() write_to_log(start_time, log_path, "Beginning creation of coord_dic") coord_barcode_matrix, line_count, error_indices_count = \ create_coordinates_barcodes_dictionary (read_one, group_barcode_matrix, desired_barcodes, indices_list) percentage_error = round((error_indices_count / (line_count / 4)) * 100, 2)