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

GATK 4.6. SelectVariants not applying --select filters #9060

Open
FLsandell opened this issue Dec 9, 2024 · 1 comment
Open

GATK 4.6. SelectVariants not applying --select filters #9060

FLsandell opened this issue Dec 9, 2024 · 1 comment

Comments

@FLsandell
Copy link

Bug Report

Affected tool(s) or class(es)

gatk SelectVariants

Affected version(s)

gatk 4.6.0. (not tested on 4.6.1.)

Description

select statements are ignored.

When using the following filter settings:

##GATKCommandLine=<ID=SelectVariants,CommandLine="SelectVariants --output output --select AC > 6 --select MQ > 40.0 --select DP < 25260 --select SOR < 3.0 --select QD > 2.0 --select FS < 60.0 --select MQRankSum > -12.5 --select ReadPosRankSum > -8.0 --select BaseQRankSum > -12.5 --restrict-alleles-to BIALLELIC

gatk filters only for "--restrict-alleles-to BIALLELIC", completely ignoring every --select statement. This results in cases where variants that fail all set --select filters still appear in the output. E.g:

AC=1;AF=5.453e-04;AN=1834;BaseQRankSum=-6.740e-01;DP=4543;ExcessHet=0.0000;FS=0.000;InbreedingCoeff=-0.0203;MLEAC=2;MLEAF=1.091e-03;MQ=41.22;MQRankSum=0.00;QD=5.98;ReadPosRankSum=-1.282e+00;SOR=0.495 GT:AD:DP:GQ:PGT:PID:PL:PS

Steps to reproduce

Calculations were tested on RHEL 8 AlmaLinux 8.10 and CentOS 7 nodes (7.9.2009 (CORE)).

gatk_4.6.0.0 SelectVariants --variant variant --reference /project/cultibv/fwasch/CultiBeet_3/RefBeet_3/RefBeet-3.0.fa --output output --select "AC > 6" --restrict-alleles-to BIALLELIC --select "MQ > 40.0" --select "DP < 25260" --select "SOR < 3.0" --select "QD > 2.0" --select "FS < 60.0" -select "MQRankSum > -12.5" --select "ReadPosRankSum > -8.0" --select "BaseQRankSum > -12.5"'&> filter_vcfs.error &

Importantly the same command works without any problems on older versions. E.g. SelectVariants with GATK 4.2. on the same raw input file with the same command works as expected (intended) and filters all variants that do not meet the criteria set with --select statements.

Expected behavior

Variants like this:

AC=1;AF=5.453e-04;AN=1834;BaseQRankSum=-6.740e-01;DP=4543;ExcessHet=0.0000;FS=0.000;InbreedingCoeff=-0.0203;MLEAC=2;MLEAF=1.091e-03;MQ=41.22;MQRankSum=0.00;QD=5.98;ReadPosRankSum=-1.282e+00;SOR=0.495 GT:AD:DP:GQ:PGT:PID:PL:PS

should not be in the output.

Thanks already for your help!

Copy link
Contributor

Hi. Each select parameter is acting independently in your case and that is expected. You need to compile all cases in a single select parameter with ANDs ORs or parantheses. And and Or statements need to be used as in programming style such as || &&.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants