Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: enable filter_hrun with beagle file in dumpSTR #225

Merged
merged 1 commit into from
Aug 14, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading