Skip to content

Commit

Permalink
Update tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Ulthran committed Nov 1, 2023
1 parent 2960002 commit e36d3dc
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 10 deletions.
32 changes: 22 additions & 10 deletions .tests/e2e/test_full_run.py
Original file line number Diff line number Diff line change
Expand Up @@ -80,24 +80,36 @@ def run_sunbeam(setup):
shutil.copytree(os.path.join(output_fp, "logs/"), "logs/")
shutil.copytree(os.path.join(project_dir, "stats/"), "stats/")

bfragilis_cov_fp = os.path.join(output_fp, "mapping/Bfragilis/coverage.csv")
ecoli_cov_fp = os.path.join(output_fp, "mapping/Ecoli/coverage.csv")
bfragilis_sliding_cov_fp = os.path.join(output_fp, "mapping/Bfragilis/sliding_coverage.csv")
ecoli_sliding_cov_fp = os.path.join(output_fp, "mapping/Ecoli/sliding_coverage.csv")
bfragilis_filtered_cov_fp = os.path.join(output_fp, "mapping/filtered/Bfragilis/coverage_filtered.csv")
ecoli_filtered_cov_fp = os.path.join(output_fp, "mapping/filtered/Ecoli/coverage_filtered.csv")
bfragilis_num_reads_fp = os.path.join(output_fp, "mapping/Bfragilis/numReads.csv")
ecoli_num_reads_fp = os.path.join(output_fp, "mapping/Ecoli/numReads.csv")

benchmarks_fp = os.path.join(project_dir, "stats/")

yield bfragilis_cov_fp, ecoli_cov_fp, benchmarks_fp
yield bfragilis_sliding_cov_fp, ecoli_sliding_cov_fp, bfragilis_filtered_cov_fp, ecoli_filtered_cov_fp, bfragilis_num_reads_fp, ecoli_num_reads_fp, benchmarks_fp


def test_full_run(run_sunbeam):
(
bfragilis_cov_fp,
ecoli_cov_fp,
bfragilis_sliding_cov_fp,
ecoli_sliding_cov_fp,
bfragilis_filtered_cov_fp,
ecoli_filtered_cov_fp,
bfragilis_num_reads_fp,
ecoli_num_reads_fp,
benchmarks_fp,
) = run_sunbeam

# Check output
assert os.path.exists(bfragilis_cov_fp)
assert os.path.exists(ecoli_cov_fp)

assert os.stat(bfragilis_cov_fp).st_size != 0
assert os.stat(ecoli_cov_fp).st_size != 0
assert os.path.exists(bfragilis_sliding_cov_fp)
assert os.path.exists(ecoli_sliding_cov_fp)
assert os.path.exists(bfragilis_filtered_cov_fp)
assert os.path.exists(ecoli_filtered_cov_fp)
assert os.path.exists(bfragilis_num_reads_fp)
assert os.path.exists(ecoli_num_reads_fp)

assert os.stat(bfragilis_sliding_cov_fp).st_size != 0
assert os.stat(ecoli_sliding_cov_fp).st_size != 0
1 change: 1 addition & 0 deletions sbx_mapping.smk
Original file line number Diff line number Diff line change
Expand Up @@ -234,6 +234,7 @@ rule summarize_num_reads:
"(cat {input}) > {output}"


# TODO: Remove if not needed


rule samtools_mpileup:
Expand Down

0 comments on commit e36d3dc

Please sign in to comment.