From 1ce0c4d38d389178534a25af21b66ceb734c4a8e Mon Sep 17 00:00:00 2001 From: Buuxx Date: Fri, 9 Aug 2024 23:56:18 +0800 Subject: [PATCH] Delete filter_hrun warning with beagle file --- trtools/dumpSTR/dumpSTR.py | 3 --- trtools/dumpSTR/tests/test_dumpSTR.py | 2 +- 2 files changed, 1 insertion(+), 4 deletions(-) diff --git a/trtools/dumpSTR/dumpSTR.py b/trtools/dumpSTR/dumpSTR.py index 17b9ac21..f1d709aa 100644 --- a/trtools/dumpSTR/dumpSTR.py +++ b/trtools/dumpSTR/dumpSTR.py @@ -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(",") diff --git a/trtools/dumpSTR/tests/test_dumpSTR.py b/trtools/dumpSTR/tests/test_dumpSTR.py index 057a13e0..9051c4a3 100644 --- a/trtools/dumpSTR/tests/test_dumpSTR.py +++ b/trtools/dumpSTR/tests/test_dumpSTR.py @@ -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)