From b6597077fc8ba03e7a7ef271bbd24f81f90632f2 Mon Sep 17 00:00:00 2001 From: Peter Vegh Date: Tue, 14 Jun 2022 13:32:10 +0100 Subject: [PATCH] Comment on test --- tests/test_gel_analysis.py | 35 +++++++++++++++++++++++------------ 1 file changed, 23 insertions(+), 12 deletions(-) diff --git a/tests/test_gel_analysis.py b/tests/test_gel_analysis.py index 8e272b4..cd6aff8 100644 --- a/tests/test_gel_analysis.py +++ b/tests/test_gel_analysis.py @@ -1,28 +1,26 @@ """ -Basic tests to check that the core functionalities are at least running. +Complex validation test. """ import matplotlib + matplotlib.use("Agg") import os -from collections import OrderedDict -from bandwitch import (ClonesObservations) -from Bio import SeqIO, Restriction -import pytest +from bandwitch import ClonesObservations def test_complex_validation(tmpdir): - data_dir = os.path.join('tests', 'test_data', 'complex_validation_data') - records_path = os.path.join(data_dir, 'constructs_sequences.zip') - constructs_map_path = os.path.join(data_dir, 'constructs_map.xls') - digestions_map_path = os.path.join(data_dir, 'digestions_map.xls') - aati_zip_path = os.path.join(data_dir, 'digestion_results.zip') + data_dir = os.path.join("tests", "test_data", "complex_validation_data") + records_path = os.path.join(data_dir, "constructs_sequences.zip") + constructs_map_path = os.path.join(data_dir, "constructs_map.xls") + digestions_map_path = os.path.join(data_dir, "digestions_map.xls") + aati_zip_path = os.path.join(data_dir, "digestion_results.zip") clones = ClonesObservations.from_files( records_path=records_path, constructs_map_path=constructs_map_path, aati_zip_path=aati_zip_path, - digestions_map_path=digestions_map_path + digestions_map_path=digestions_map_path, ) validations = clones.validate_all_clones(relative_tolerance=0.03) clones.plot_validations_plate_map(validations) @@ -30,4 +28,17 @@ def test_complex_validation(tmpdir): partial_digest_analysis = clones.partial_digests_analysis() clones.plot_partial_digests_analysis(partial_digest_analysis) summary_table = clones.validations_summary_table( - validations, target=os.path.join(str(tmpdir), 'table.csv')) + validations, target=os.path.join(str(tmpdir), "table.csv") + ) + + +# Chosen digestions, for reference: +# C00 EcoRI,PvuI +# C01 EcoRI,PvuI +# C02 EcoRI,PvuI +# C03 EcoRI,PvuI +# C04 EcoRI,PvuI +# C05 EcoRI,PvuI +# C06 AseI,EcoRI +# C07 AseI,EcoRI +# C08 AseI,EcoRI