Skip to content

Commit

Permalink
added test for deletions
Browse files Browse the repository at this point in the history
  • Loading branch information
rnmitchell committed Jan 16, 2024
1 parent 12e5ce9 commit fc928b2
Show file tree
Hide file tree
Showing 3 changed files with 31 additions and 0 deletions.
4 changes: 4 additions & 0 deletions lusSTR/tests/data/test_indels.csv
Original file line number Diff line number Diff line change
@@ -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
4 changes: 4 additions & 0 deletions lusSTR/tests/data/test_indels.txt
Original file line number Diff line number Diff line change
@@ -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
23 changes: 23 additions & 0 deletions lusSTR/tests/test_suite.py
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit fc928b2

Please sign in to comment.