Skip to content

Commit

Permalink
inspect and fix failing tests
Browse files Browse the repository at this point in the history
  • Loading branch information
KanduriC committed Jan 20, 2025
1 parent 0c0aedb commit 55c0c5b
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions tests/expand_repertoire_components/test_ImplantationHelper.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ def test_get_absolute_number_of_repertoires():
pgen_intervals_array = ImplantationHelper.get_pgen_intervals(pgen_dat=pgen_dat,
pgen_count_map_obj=signal_pgen_count_map)
abs_rep_num = ImplantationHelper.get_absolute_number_of_repertoires(pgen_intervals_array, signal_pgen_count_map)
assert abs_rep_num == [2, 2]
assert abs_rep_num == [1, 1]


def test_get_repertoire_sequence_presence_indices():
Expand All @@ -37,7 +37,7 @@ def test_get_repertoire_sequence_presence_indices():
abs_rep_num = ImplantationHelper.get_absolute_number_of_repertoires(pgen_intervals_array, signal_pgen_count_map)
seq_presence_indices = ImplantationHelper.get_repertoire_sequence_presence_indices(6, abs_rep_num)
assert len(seq_presence_indices) == 6
assert len(np.concatenate(seq_presence_indices).ravel().tolist()) == 4 # see prepare_test_data why this value is 4
assert len(np.concatenate(seq_presence_indices).ravel().tolist()) == 2 # see prepare_test_data why this value is 4


def test_write_public_repertoire_chunks(tmp_path):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ def test__get_avg_total_implantation_count(tmp_path):
pgen_count_map_obj=signal_pgen_count_map)
avg_implant_count = test_gen._get_avg_total_implantation_count(pgen_intervals_array)
assert isinstance(avg_implant_count, int)
assert avg_implant_count == 4 # because of thresholding in PgenCountMap.get_absolute_number_of_repertoires
assert avg_implant_count == 2 # because of thresholding in PgenCountMap.get_absolute_number_of_repertoires


def test__determine_signal_sequence_combination(tmp_path):
Expand All @@ -48,7 +48,7 @@ def test__determine_signal_sequence_combination(tmp_path):
sequence_proportion, implantation_count, implantable_seq_subset_indices = test_gen._determine_signal_sequence_combination(
pgen_intervals_array, round(len(pgen_intervals_array) * 0.5))
assert sequence_proportion == 0.4
assert implantation_count == 2
assert implantation_count == 1
assert implantable_seq_subset_indices == [1]


Expand Down

0 comments on commit 55c0c5b

Please sign in to comment.