Skip to content

Commit

Permalink
added initial end to end tests
Browse files Browse the repository at this point in the history
  • Loading branch information
mattheww95 committed Dec 4, 2024
1 parent 6a96487 commit aa14d20
Show file tree
Hide file tree
Showing 22 changed files with 234 additions and 0 deletions.
Empty file added tests/data/__init__.py
Empty file.
6 changes: 6 additions & 0 deletions tests/data/data.tsv
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
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
1 change: 1 addition & 0 deletions tests/data/hamming/allele_map.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{}
6 changes: 6 additions & 0 deletions tests/data/hamming/query_profile.text
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
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
6 changes: 6 additions & 0 deletions tests/data/hamming/ref_profile.text
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
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
6 changes: 6 additions & 0 deletions tests/data/hamming/results.text
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
dists r1 r2 r3 r4 r5
r1 0 0 0 0 3
r2 0 0 0 0 3
r3 0 0 0 0 3
r4 0 0 0 0 3
r5 3 3 3 3 0
38 changes: 38 additions & 0 deletions tests/data/hamming/run.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
{
"profile_dists": "version: 1.0.2",
"analysis_start_time": "04/12/2024 11:34:37",
"analysis_end_time": "04/12/2024 11:34:38",
"parameters": {
"query": "./data.tsv",
"ref": "./data.tsv",
"outdir": "./hamming",
"outfmt": "matrix",
"file_type": "text",
"distm": "hamming",
"missing_thresh": 1.0,
"sample_qual_thresh": 1.0,
"match_threshold": -1,
"mapping_file": null,
"batch_size": null,
"max_mem": null,
"force": false,
"skip": false,
"columns": null,
"count_missing": false,
"cpus": 1
},
"query_profile_info": {
"num_samples": 5,
"num_samples_pass": 5,
"failed_samples": [],
"parsed_file_path": "./hamming/query_profile.text"
},
"ref_profile_info": {
"num_samples": 5,
"num_samples_pass": 5,
"failed_samples": [],
"parsed_file_path": "./hamming/ref_profile.text"
},
"loci_removed": [],
"result_file": "./hamming/results.text"
}
1 change: 1 addition & 0 deletions tests/data/hamming_count_missing/allele_map.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{}
6 changes: 6 additions & 0 deletions tests/data/hamming_count_missing/query_profile.text
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
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
6 changes: 6 additions & 0 deletions tests/data/hamming_count_missing/ref_profile.text
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
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
6 changes: 6 additions & 0 deletions tests/data/hamming_count_missing/results.text
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
dists r1 r2 r3 r4 r5
r1 0 0 0 0 3
r2 0 0 0 0 3
r3 0 0 0 0 3
r4 0 0 0 0 3
r5 3 3 3 3 0
38 changes: 38 additions & 0 deletions tests/data/hamming_count_missing/run.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
{
"profile_dists": "version: 1.0.2",
"analysis_start_time": "04/12/2024 11:34:27",
"analysis_end_time": "04/12/2024 11:34:27",
"parameters": {
"query": "./data.tsv",
"ref": "./data.tsv",
"outdir": "./hamming_count_missing",
"outfmt": "matrix",
"file_type": "text",
"distm": "hamming",
"missing_thresh": 1.0,
"sample_qual_thresh": 1.0,
"match_threshold": -1,
"mapping_file": null,
"batch_size": null,
"max_mem": null,
"force": false,
"skip": false,
"columns": null,
"count_missing": true,
"cpus": 1
},
"query_profile_info": {
"num_samples": 5,
"num_samples_pass": 5,
"failed_samples": [],
"parsed_file_path": "./hamming_count_missing/query_profile.text"
},
"ref_profile_info": {
"num_samples": 5,
"num_samples_pass": 5,
"failed_samples": [],
"parsed_file_path": "./hamming_count_missing/ref_profile.text"
},
"loci_removed": [],
"result_file": "./hamming_count_missing/results.text"
}
1 change: 1 addition & 0 deletions tests/data/scaled/allele_map.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{}
6 changes: 6 additions & 0 deletions tests/data/scaled/query_profile.text
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
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
6 changes: 6 additions & 0 deletions tests/data/scaled/ref_profile.text
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
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
6 changes: 6 additions & 0 deletions tests/data/scaled/results.text
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
dists r1 r2 r3 r4 r5
r1 0.0 0.0 0.0 0.0 100.0
r2 0.0 0.0 0.0 0.0 100.0
r3 0.0 0.0 0.0 0.0 100.0
r4 0.0 0.0 0.0 0.0 100.0
r5 100.0 100.0 100.0 100.0 0.0
38 changes: 38 additions & 0 deletions tests/data/scaled/run.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
{
"profile_dists": "version: 1.0.2",
"analysis_start_time": "04/12/2024 11:34:49",
"analysis_end_time": "04/12/2024 11:34:50",
"parameters": {
"query": "./data.tsv",
"ref": "./data.tsv",
"outdir": "./scaled",
"outfmt": "matrix",
"file_type": "text",
"distm": "scaled",
"missing_thresh": 1.0,
"sample_qual_thresh": 1.0,
"match_threshold": -1,
"mapping_file": null,
"batch_size": null,
"max_mem": null,
"force": false,
"skip": false,
"columns": null,
"count_missing": false,
"cpus": 1
},
"query_profile_info": {
"num_samples": 5,
"num_samples_pass": 5,
"failed_samples": [],
"parsed_file_path": "./scaled/query_profile.text"
},
"ref_profile_info": {
"num_samples": 5,
"num_samples_pass": 5,
"failed_samples": [],
"parsed_file_path": "./scaled/ref_profile.text"
},
"loci_removed": [],
"result_file": "./scaled/results.text"
}
1 change: 1 addition & 0 deletions tests/data/scaled_count_missing/allele_map.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{}
6 changes: 6 additions & 0 deletions tests/data/scaled_count_missing/query_profile.text
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
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
6 changes: 6 additions & 0 deletions tests/data/scaled_count_missing/ref_profile.text
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
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
6 changes: 6 additions & 0 deletions tests/data/scaled_count_missing/results.text
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
dists r1 r2 r3 r4 r5
r1 0.0 0.0 0.0 0.0 75.0
r2 0.0 0.0 0.0 0.0 75.0
r3 0.0 0.0 0.0 0.0 75.0
r4 0.0 0.0 0.0 0.0 75.0
r5 75.0 75.0 75.0 75.0 0.0
38 changes: 38 additions & 0 deletions tests/data/scaled_count_missing/run.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
{
"profile_dists": "version: 1.0.2",
"analysis_start_time": "04/12/2024 11:33:36",
"analysis_end_time": "04/12/2024 11:33:37",
"parameters": {
"query": "./data.tsv",
"ref": "./data.tsv",
"outdir": "./scaled_count_missing",
"outfmt": "matrix",
"file_type": "text",
"distm": "scaled",
"missing_thresh": 1.0,
"sample_qual_thresh": 1.0,
"match_threshold": -1,
"mapping_file": null,
"batch_size": null,
"max_mem": null,
"force": false,
"skip": false,
"columns": null,
"count_missing": true,
"cpus": 1
},
"query_profile_info": {
"num_samples": 5,
"num_samples_pass": 5,
"failed_samples": [],
"parsed_file_path": "./scaled_count_missing/query_profile.text"
},
"ref_profile_info": {
"num_samples": 5,
"num_samples_pass": 5,
"failed_samples": [],
"parsed_file_path": "./scaled_count_missing/ref_profile.text"
},
"loci_removed": [],
"result_file": "./scaled_count_missing/results.text"
}

0 comments on commit aa14d20

Please sign in to comment.