Skip to content

Commit

Permalink
Comment on test
Browse files Browse the repository at this point in the history
  • Loading branch information
veghp committed Jun 14, 2022
1 parent 141d075 commit b659707
Showing 1 changed file with 23 additions and 12 deletions.
35 changes: 23 additions & 12 deletions tests/test_gel_analysis.py
Original file line number Diff line number Diff line change
@@ -1,33 +1,44 @@
"""
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)
clones.plot_all_validations_patterns(validations)
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

0 comments on commit b659707

Please sign in to comment.