diff --git a/lusSTR/tests/data/test_indels.csv b/lusSTR/tests/data/test_indels.csv new file mode 100644 index 0000000..ca2a19e --- /dev/null +++ b/lusSTR/tests/data/test_indels.csv @@ -0,0 +1,4 @@ +Locus,Total_Reads,Sequence,SampleID,Project,Analysis +PentaD,44,GAGCCATGATCACACCACTACACTCCAGCCTAGGTGACAGAGCAAGACACCATCTCAAGAAAGAAAAAAAGAAAGAAAAGAAAAGAAAAGAAAAGAAAAAACGAAGGGGAAAAAAAGAGAATCATAAACATAAATGTAAAATTTCTCAAAAAAATCGTTA,A01,test,test +vWA,36,GATAGATGGATAGATAGATAGATAGATAGATAGATAGATAGACAGACAGACAGACAGATAGATCAATCCAAGTCACATACTGATTATTCTTATCATCCACTAGGGCTTTCACATCTCAGCCAAGTCAACTTGGATCCTCTAGACCTGTTTCTTCTTCTGGAA,A01,test,test +D7S820,109,AGAATTGCACCACATATTGGTAATTAAATGTTTACTATAGACTATTTAGTGAGATAAAAAAAACTATCAATCTGTCTATCTATCTATCTATCTATCTATCTATCTATCGTTAGTTCGTTCTAAACTATGACAAGTGTTCTATCATACCCTTTATATATATTAACCTTAAAATAACTC,A01,test,test \ No newline at end of file diff --git a/lusSTR/tests/data/test_indels.txt b/lusSTR/tests/data/test_indels.txt new file mode 100644 index 0000000..fed8cc7 --- /dev/null +++ b/lusSTR/tests/data/test_indels.txt @@ -0,0 +1,4 @@ +SampleID Project Analysis Locus UAS_Output_Sequence Forward_Strand_Sequence UAS_Output_Bracketed_Notation Forward_Strand_Bracketed_Notation CE_Allele LUS LUS_Plus Reads +A01 test test VWA TCTATCTGTCTGTCTGTCTGTCTATCTATCTATCTATCTATCTATCTATCTATCCATCTA TAGATGGATAGATAGATAGATAGATAGATAGATAGATAGACAGACAGACAGACAGATAGA TCTA [TCTG]4 [TCTA]8 TCCA TCTA TAGA TGGA [TAGA]8 [CAGA]4 TAGA 13 13_8 13_8_4_1 36 +A01 test test PENTA D AAAAGAAAGAAAAGAAAAGAAAAGAAAAGA AAAAGAAAGAAAAGAAAAGAAAAGAAAAGA AAAAG [AAAGA]5 AAAAG [AAAGA]5 5 5_5 5_5 44 +A01 test test D7S820 GATAGATAGATAGATAGATAGATAGATAGATAGACAGATTGATAGTTT AAACTATCAATCTGTCTATCTATCTATCTATCTATCTATCTATCTATC [GATA]8 GACA GATT GATA GTTT AAAC TATC AATC TGTC [TATC]8 8 8_8 8_8_1_0 109 diff --git a/lusSTR/tests/test_suite.py b/lusSTR/tests/test_suite.py index 25632b7..fd57e4a 100644 --- a/lusSTR/tests/test_suite.py +++ b/lusSTR/tests/test_suite.py @@ -357,3 +357,26 @@ def test_genemarker(tmp_path): print(exp_output) obs_output = str(tmp_path / f"genemarker_test{ext}") assert filecmp.cmp(exp_output, obs_output) is True + + +def test_deletions(tmp_path): + input = data_file("test_indels.csv") + exp_output = data_file("test_indels.txt") + obs_output = str(tmp_path / "test_indels.txt") + arglist = [ + "config", + "-w", + str(tmp_path), + "--out", + "test_indels", + "--input", + str(input), + "--analysis-software", + "genemarker", + "--powerseq", + ] + lusSTR.cli.main(lusSTR.cli.get_parser().parse_args(arglist)) + shutil.copyfile(input, os.path.join(str(tmp_path), "test_indels.csv")) + snakemake_arglist = ["strs", "convert", "-w", str(tmp_path)] + lusSTR.cli.main(lusSTR.cli.get_parser().parse_args(snakemake_arglist)) + assert filecmp.cmp(exp_output, obs_output) is True