Skip to content

Commit

Permalink
included test to ensure sex chr marker plots are created
Browse files Browse the repository at this point in the history
  • Loading branch information
rnmitchell committed Nov 3, 2023
1 parent 3ca3eed commit b8a902b
Showing 1 changed file with 12 additions and 2 deletions.
14 changes: 12 additions & 2 deletions lusSTR/tests/test_suite.py
Original file line number Diff line number Diff line change
Expand Up @@ -289,11 +289,21 @@ def test_snakemake(command, output, format_out, convert_out, all_out, tmp_path):
assert filecmp.cmp(exp_output, obs_output) is True


def test_marker_plots(tmp_path):
@pytest.mark.parametrize(
"sex",
[True, False],
)
def test_marker_plots(sex, tmp_path):
inputfile = data_file("UAS_bulk_input/Positive Control Sample Details Report 2315.xlsx")
exp_output = str(tmp_path / "MarkerPlots/lusstr_output_Positive_Control_marker_plots.pdf")
arglist = ["config", "-w", str(tmp_path), "--input", inputfile]
sex_exp = str(tmp_path / "MarkerPlots/lusstr_output_Positive_Control_sexchr_marker_plots.pdf")
if sex:
arglist = ["config", "-w", str(tmp_path), "--input", inputfile, "--sex"]
else:
arglist = ["config", "-w", str(tmp_path), "--input", inputfile]
lusSTR.cli.main(lusSTR.cli.get_parser().parse_args(arglist))
snakemake_arglist = ["strs", "convert", "-w", str(tmp_path)]
lusSTR.cli.main(lusSTR.cli.get_parser().parse_args(snakemake_arglist))
assert os.path.exists(exp_output) is True
if sex:
assert os.path.exists(sex_exp) is True

0 comments on commit b8a902b

Please sign in to comment.