Skip to content

Commit

Permalink
updated tests
Browse files Browse the repository at this point in the history
  • Loading branch information
rnmitchell committed Jul 8, 2024
1 parent 23e1cd5 commit 3133bae
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 18 deletions.
29 changes: 19 additions & 10 deletions lusSTR/tests/test_filters.py
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,7 @@ def test_EFMoutput_format(outputdir, datatype, software, tmp_path):
"--str-type",
datatype,
"--input",
"WD",
str(inputfile),
]
lusSTR.cli.main(lusSTR.cli.get_parser().parse_args(arglist))
shutil.copyfile(inputfile, os.path.join(str_path, "test_output.csv"))
Expand All @@ -208,7 +208,7 @@ def test_STRmixoutput_format(outputdir, datatype, tmp_path):
"-w",
str_path,
"--input",
"WD",
str(inputfile),
"-o",
"STRmix_Files",
"--str-type",
Expand All @@ -230,7 +230,16 @@ def test_STRmixoutput_customranges(tmp_path):
exp_info_out = data_file("NGS_stutter_test/custom/test_stutter_sequence_info.csv")
obs_out = str(tmp_path / f"WD/test_stutter/Sample1_evidence_ngs.csv")
obs_info_out = str(tmp_path / f"WD/test_stutter/test_stutter_sequence_info.csv")
arglist = ["config", "-w", str_path, "--input", "WD", "-o", "test_stutter", "--custom"]
arglist = [
"config",
"-w",
str_path,
"--input",
str(inputfile),
"-o",
"test_stutter",
"--custom",
]
lusSTR.cli.main(lusSTR.cli.get_parser().parse_args(arglist))
shutil.copyfile(inputfile, os.path.join(str_path, "test_stutter.csv"))
shutil.copyfile(inputfile, os.path.join(str_path, "test_stutter.txt"))
Expand All @@ -247,7 +256,7 @@ def test_nofilters(tmp_path):
inputfile = data_file("test_stutter.txt")
exp_out = data_file("NGS_stutter_test/Sample1_nofilter.csv")
obs_out = str(tmp_path / "WD/lusstr_output/Sample1_evidence_ngs.csv")
arglist = ["config", "-w", str_path, "--input", "WD", "--nofilter"]
arglist = ["config", "-w", str_path, "--input", str(inputfile), "--nofilter"]
lusSTR.cli.main(lusSTR.cli.get_parser().parse_args(arglist))
shutil.copyfile(inputfile, os.path.join(str_path, "lusstr_output.csv"))
shutil.copyfile(inputfile, os.path.join(str_path, "lusstr_output.txt"))
Expand All @@ -261,7 +270,7 @@ def test_flags(tmp_path):
inputfile = data_file("test_stutter.txt")
exp_out = data_file("RU_stutter_test/Flagged_Loci.csv")
obs_out = str(tmp_path / "WD/lusstr_output/lusstr_output_Flagged_Loci.csv")
arglist = ["config", "-w", str_path, "--input", "WD"]
arglist = ["config", "-w", str_path, "--input", str(inputfile)]
lusSTR.cli.main(lusSTR.cli.get_parser().parse_args(arglist))
shutil.copyfile(inputfile, os.path.join(str_path, "lusstr_output.csv"))
shutil.copyfile(inputfile, os.path.join(str_path, "lusstr_output.txt"))
Expand All @@ -288,7 +297,7 @@ def test_efm_reference(outputdir, datatype, software, tmp_path):
"-w",
str_path,
"--input",
"WD",
str(inputfile),
"--software",
software,
"--reference",
Expand Down Expand Up @@ -316,7 +325,7 @@ def test_strmix_reference(outputdir, datatype, tmp_path):
"-w",
str_path,
"--input",
"WD",
str(inputfile),
"-o",
"STRmix_Files",
"--reference",
Expand All @@ -336,7 +345,7 @@ def test_D7(tmp_path):
inputfile = data_file("test_D7.txt")
exp_out = data_file("D7_microvariant_flagged.csv")
obs_out = str(tmp_path / "WD/test/test_Flagged_Loci.csv")
arglist = ["config", "-w", str_path, "--input", "WD", "-o", "test"]
arglist = ["config", "-w", str_path, "--input", str(inputfile), "-o", "test"]
lusSTR.cli.main(lusSTR.cli.get_parser().parse_args(arglist))
shutil.copyfile(inputfile, os.path.join(str_path, "test.csv"))
shutil.copyfile(inputfile, os.path.join(str_path, "test.txt"))
Expand Down Expand Up @@ -392,7 +401,7 @@ def test_forward_strand_orientation(tmp_path):
"-w",
str_path,
"--input",
"WD",
str(inputfile),
"-o",
"STRmix_Files",
"--strand",
Expand All @@ -416,7 +425,7 @@ def test_lusplus_sequence_info(tmp_path):
"-w",
str_path,
"--input",
"WD",
str(inputfile),
"-o",
"LUSPlus",
"--strand",
Expand Down
16 changes: 8 additions & 8 deletions lusSTR/tests/test_suite.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ def test_convert_full_nocombine(
"-o",
infile,
"--input",
"WD",
str(inputfile),
]
else:
arglist = [
Expand All @@ -78,7 +78,7 @@ def test_convert_full_nocombine(
"-o",
infile,
"--input",
"WD",
str(inputfile),
"--powerseq",
]
lusSTR.cli.main(lusSTR.cli.get_parser().parse_args(arglist))
Expand Down Expand Up @@ -110,7 +110,7 @@ def test_flanks(tmp_path):
"--analysis-software",
"straitrazor",
"--input",
"WD",
str(inputfile),
]
lusSTR.cli.main(lusSTR.cli.get_parser().parse_args(arglist))
shutil.copyfile(inputfile, os.path.join(str_path, "testflanks.csv"))
Expand All @@ -135,7 +135,7 @@ def test_convert_combine(input, exp_length, tmp_path):
"--analysis-software",
"straitrazor",
"--input",
"WD",
str(inputfile),
]
lusSTR.cli.main(lusSTR.cli.get_parser().parse_args(arglist))
shutil.copyfile(inputfile, os.path.join(str_path, "testflanks.csv"))
Expand Down Expand Up @@ -183,7 +183,7 @@ def test_powerseq_flanks(tmp_path):
"--analysis-software",
"straitrazor",
"--input",
"WD",
str(inputfile),
"--powerseq",
]
lusSTR.cli.main(lusSTR.cli.get_parser().parse_args(arglist))
Expand All @@ -199,7 +199,7 @@ def test_convert_uas_sexloci(tmp_path):
inputfile_sex = data_file("testformat_uas_sexloci.csv")
exp_sex_out = data_file("testformat_uas_sexloci.txt")
obs_sex_out = str(tmp_path / "WD/testformatuas_sexloci.txt")
arglist = ["config", "-w", str_path, "-o", "testformatuas", "--sex", "--input", "WD"]
arglist = ["config", "-w", str_path, "-o", "testformatuas", "--sex", "--input", str(inputfile)]
lusSTR.cli.main(lusSTR.cli.get_parser().parse_args(arglist))
shutil.copyfile(inputfile_sex, os.path.join(str_path, "testformatuas_sexloci.csv"))
shutil.copyfile(inputfile, os.path.join(str_path, "testformatuas.csv"))
Expand Down Expand Up @@ -242,7 +242,7 @@ def test_convert_sr_sexloci(input, testoutput, flank_output, kit, tmp_path):
"testformatsr",
"--sex",
"--input",
"WD",
str(inputfile),
"--analysis-software",
"straitrazor",
]
Expand All @@ -255,7 +255,7 @@ def test_convert_sr_sexloci(input, testoutput, flank_output, kit, tmp_path):
"testformatsr",
"--sex",
"--input",
"WD",
str(inputfile),
"--analysis-software",
"straitrazor",
"--powerseq",
Expand Down

0 comments on commit 3133bae

Please sign in to comment.