Skip to content

Commit

Permalink
added test to assert VCF same when reading from filelist
Browse files Browse the repository at this point in the history
  • Loading branch information
gymreklab committed Jan 4, 2024
1 parent f07a99d commit 77cba23
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions trtools/mergeSTR/tests/test_mergeSTR.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,17 @@ def test_FileList(args, mrgvcfdir, tmpdir):
fname1 = os.path.join(mrgvcfdir, "test_file_gangstr1.vcf.gz")
fname2 = os.path.join(mrgvcfdir, "test_file_gangstr2.vcf.gz")
args.vcftype = "gangstr"

# Run with files input to vcfs
nolist_outfile = str(tmpdir / "test-gangstr")
args.out = nolist_outfile
args.vcfs = fname1 + "," + fname2
args.vcfs_list = None
assert main(args)==0

# Run with files input as list
list_outfile = str(tmpdir / "test-gangstr-list")
args.out = list_outfile
listfile = str(tmpdir / "test.list")
f = open(listfile, "w")
f.write(fname1+"\n")
Expand All @@ -60,6 +71,7 @@ def test_FileList(args, mrgvcfdir, tmpdir):
args.vcfs_list = listfile
args.vcfs = None
assert main(args)==0
assert_same_vcf(nolist_outfile + ".vcf", list_outfile + ".vcf")

# Test right files or directory - GangSTR
def test_GangSTRRightFile(args, mrgvcfdir):
Expand Down

0 comments on commit 77cba23

Please sign in to comment.