Skip to content

Commit

Permalink
Merge pull request #13 from phac-nml/tests
Browse files Browse the repository at this point in the history
Tests
  • Loading branch information
mattheww95 authored Dec 20, 2024
2 parents 5368769 + d3643cf commit a4a38c5
Show file tree
Hide file tree
Showing 7 changed files with 58 additions and 1 deletion.
Empty file removed tests.py
Empty file.
7 changes: 7 additions & 0 deletions tests/data/data_empty_row.tsv
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
Sample A1 A2 A3 A4
r1 1 1 1 0
r2 1 1 1 0
r3 1 1 1 0
r4 1 1 1 0
r5 2 2 2 0
r6 1 0 0 0
7 changes: 7 additions & 0 deletions tests/data/data_empty_row_q.tsv
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
Sample A1 A2 A3 A4
r1 1 1 1 0
r2 1 1 1 0
r3 1 1 1 0
r4 1 1 1 0
r5 2 2 2 0
r6 1 ? ? ?
7 changes: 7 additions & 0 deletions tests/data/data_empty_row_space.tsv
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
Sample A1 A2 A3 A4
r1 1 1 1 0
r2 1 1 1 0
r3 1 1 1 0
r4 1 1 1 0
r5 2 2 2 0
r6 1
7 changes: 7 additions & 0 deletions tests/data/data_empty_row_us.tsv
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
Sample A1 A2 A3 A4
r1 1 1 1 0
r2 1 1 1 0
r3 1 1 1 0
r4 1 1 1 0
r5 2 2 2 0
r6 1 _ _ _
2 changes: 1 addition & 1 deletion tests/test_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,11 @@
(["14", "1000", "12"], 'int'),
([14, 1000, 12], 'int'),
([""], ''),
([14, 20, "AA"], 'hash'),
#! These tests are commented out for the sake of having some
#! set of tests be present and readily testable but if
#! further development is to be performed on Profile Dists
#! these tests should be addressed.
#! ([14, 20, "AA"], 'mix'),
#! (["0.00", "1.0", "3.0"], 'mix'),
#! (["0.3", 1.0, "4.2"], 'mix'),
#! ([0.00, 1.0, 3.0], 'mix'),
Expand Down
29 changes: 29 additions & 0 deletions tests/test_workflows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,3 +25,32 @@
- path: scaled/results.text
md5sum: 6eb56fbf3a925fa7b50f65b78febdad4

- name: Hamming Distance and drop empty columns
command: profile_dists -q tests/data/data.tsv -r tests/data/data.tsv -d hamming -o hamming_count_missing --missing_thresh 0.0
files:
- path: hamming_count_missing/results.text
md5sum: ab0b4f36fcb14e1f50722c52fee9f327

- name: Hamming Distance and drop row 0
command: profile_dists -q tests/data/data_empty_row.tsv -r tests/data/data_empty_row.tsv -d hamming -o hamming --sample_qual_thresh 0.70
files:
- path: hamming/results.text
md5sum: ab0b4f36fcb14e1f50722c52fee9f327

- name: Hamming Distance and drop row question mark
command: profile_dists -q tests/data/data_empty_row_q.tsv -r tests/data/data_empty_row_q.tsv -d hamming -o hamming --sample_qual_thresh 0.70
files:
- path: hamming/results.text
md5sum: ab0b4f36fcb14e1f50722c52fee9f327

- name: Hamming Distance and drop row underscore
command: profile_dists -q tests/data/data_empty_row_us.tsv -r tests/data/data_empty_row_us.tsv -d hamming -o hamming --sample_qual_thresh 0.70
files:
- path: hamming/results.text
md5sum: ab0b4f36fcb14e1f50722c52fee9f327

- name: Hamming Distance and drop space
command: profile_dists -q tests/data/data_empty_row_space.tsv -r tests/data/data_empty_row_space.tsv -d hamming -o hamming --sample_qual_thresh 0.70
files:
- path: hamming/results.text
md5sum: ab0b4f36fcb14e1f50722c52fee9f327

0 comments on commit a4a38c5

Please sign in to comment.