diff --git a/lusSTR/tests/test_filters.py b/lusSTR/tests/test_filters.py index b1095e0..adb82b3 100644 --- a/lusSTR/tests/test_filters.py +++ b/lusSTR/tests/test_filters.py @@ -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")) @@ -208,7 +208,7 @@ def test_STRmixoutput_format(outputdir, datatype, tmp_path): "-w", str_path, "--input", - "WD", + str(inputfile), "-o", "STRmix_Files", "--str-type", @@ -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")) @@ -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")) @@ -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")) @@ -288,7 +297,7 @@ def test_efm_reference(outputdir, datatype, software, tmp_path): "-w", str_path, "--input", - "WD", + str(inputfile), "--software", software, "--reference", @@ -316,7 +325,7 @@ def test_strmix_reference(outputdir, datatype, tmp_path): "-w", str_path, "--input", - "WD", + str(inputfile), "-o", "STRmix_Files", "--reference", @@ -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")) @@ -392,7 +401,7 @@ def test_forward_strand_orientation(tmp_path): "-w", str_path, "--input", - "WD", + str(inputfile), "-o", "STRmix_Files", "--strand", @@ -416,7 +425,7 @@ def test_lusplus_sequence_info(tmp_path): "-w", str_path, "--input", - "WD", + str(inputfile), "-o", "LUSPlus", "--strand", diff --git a/lusSTR/tests/test_suite.py b/lusSTR/tests/test_suite.py index 650b796..8dde4d6 100644 --- a/lusSTR/tests/test_suite.py +++ b/lusSTR/tests/test_suite.py @@ -64,7 +64,7 @@ def test_convert_full_nocombine( "-o", infile, "--input", - "WD", + str(inputfile), ] else: arglist = [ @@ -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)) @@ -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")) @@ -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")) @@ -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)) @@ -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")) @@ -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", ] @@ -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",