Skip to content

Commit

Permalink
Delete filter_hrun warning with beagle file (#225)
Browse files Browse the repository at this point in the history
  • Loading branch information
Buuxx authored Aug 14, 2024
1 parent a1a3a39 commit be63e79
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 4 deletions.
3 changes: 0 additions & 3 deletions trtools/dumpSTR/dumpSTR.py
Original file line number Diff line number Diff line change
Expand Up @@ -89,9 +89,6 @@ def CheckLocusFilters(args, vcftype, is_beagle: bool):
common.WARNING("--use-length is only meaningful for HipSTR, which reports sequence level differences.")
if args.filter_hrun and vcftype not in [trh.VcfTypes["hipstr"]]:
common.WARNING("--filter-hrun only relevant to HipSTR files. This filter will have no effect.")
if args.filter_hrun and is_beagle:
common.WARNING("--filter-hrun cannot be applied to Beagle imputed files")
return False
if args.filter_regions is not None:
if args.filter_regions_names is not None:
filter_region_files = args.filter_regions.split(",")
Expand Down
2 changes: 1 addition & 1 deletion trtools/dumpSTR/tests/test_dumpSTR.py
Original file line number Diff line number Diff line change
Expand Up @@ -514,7 +514,7 @@ def test_beagle_disallowed_locus_filters(tmpdir, vcfdir):
args_obj = args(tmpdir)
args_obj.vcf = os.path.join(vcfdir, 'beagle/hipstr_imputed.vcf.gz')
args_obj.filter_hrun = True
assert main(args_obj) == 1
assert main(args_obj) == 0

def test_beagle_disallowed_call_filters(tmpdir, vcfdir):
args_obj = args(tmpdir)
Expand Down

0 comments on commit be63e79

Please sign in to comment.