Skip to content

Commit

Permalink
add AP field check
Browse files Browse the repository at this point in the history
  • Loading branch information
nicholema committed Jul 25, 2024
1 parent 92a258c commit 2d367dd
Show file tree
Hide file tree
Showing 2 changed files with 3,448 additions and 1 deletion.
14 changes: 13 additions & 1 deletion trtools/mergeSTR/tests/test_mergeSTR.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
from trtools.testsupport.utils import assert_same_vcf



# Set up base argparser
@pytest.fixture
def args(tmpdir):
Expand Down Expand Up @@ -115,7 +116,7 @@ def test_hipSTRRightFile(args, mrgvcfdir):
args.verbose = True
assert main(args)==0

# Test right files or directory - hipstr with FORMAT field
# Test right files or directory - hipstr with FORMAT AP field
def test_hipSTRRightFile_AP(args, mrgvcfdir):
fname1 = os.path.join(mrgvcfdir, "hipstr_imputed_merge1.vcf.gz")
fname2 = os.path.join(mrgvcfdir, "hipstr_imputed_merge2.vcf.gz")
Expand All @@ -129,6 +130,7 @@ def test_hipSTRRightFile_AP(args, mrgvcfdir):
args.verbose = True
assert main(args)==0


# Test right files or directory - ExpansionHunter
def test_ExpansionHunterRightFile(args, mrgvcfdir):
fname1 = os.path.join(mrgvcfdir, "test_file_eh1.vcf.gz")
Expand Down Expand Up @@ -365,6 +367,16 @@ def test_hipstr_output(args, mrgvcfdir):
assert main(args) == 0
assert_same_vcf(args.out + '.vcf', mrgvcfdir + "/hipstr_merged.vcf")

#test if AP field exist
def test_hipstr_output_AP(args, mrgvcfdir):
fname1 = os.path.join(mrgvcfdir, "hipstr_imputed_merge1.vcf.gz")
fname2 = os.path.join(mrgvcfdir, "hipstr_imputed_merge2.vcf.gz")
args.vcftype = "hipstr"
args.vcfs = fname1 + "," + fname2

assert main(args) == 0
assert_same_vcf(args.out + '.vcf', mrgvcfdir + "/hipstr_imputed_merged.vcf")

def test_hipstr_output_flanking_pb_harmonization(args, mrgvcfdir):
fname1 = os.path.join(mrgvcfdir, "hipstr-harmonized-merge-contains-flanking.vcf.gz")
fname2 = os.path.join(mrgvcfdir, "hipstr-harmonized-merge-no-flanking.vcf.gz")
Expand Down
Loading

0 comments on commit 2d367dd

Please sign in to comment.