Skip to content

Commit

Permalink
Merge pull request #14 from phac-nml/dev
Browse files Browse the repository at this point in the history
Dev
  • Loading branch information
mattheww95 authored Dec 20, 2024
2 parents 5368769 + beab20e commit 58efd38
Show file tree
Hide file tree
Showing 8 changed files with 59 additions and 2 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/branch.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:
- name: Check PRs
if: github.repository == 'phac-nml/profile_dists'
run: |
{ [[ ${{github.event.pull_request.head.repo.full_name }} == phac-nml/profile_dists]] && [[ $GITHUB_HEAD_REF == "dev" ]]; } || [[ $GITHUB_HEAD_REF == "patch" ]]
{ [[ ${{github.event.pull_request.head.repo.full_name }} == phac-nml/profile_dists ]] && [[ $GITHUB_HEAD_REF == "dev" ]]; } || [[ $GITHUB_HEAD_REF == "patch" ]]
# If the above check failed, post a comment on the PR explaining the failure
# NOTE - this doesn't currently work if the PR is coming from a fork, due to limitations in GitHub actions secrets
Expand Down
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 58efd38

Please sign in to comment.