Question: Undefined variable error in linux
0
gravatar for karthick.n
4 weeks ago by
karthick.n10
karthick.n10 wrote:

Hi,

I am running the following command in Linux for variant filteration:

gatk VariantFiltration -R hg19.fa -V NA12878.gatk.raw.vcf -O NA12878.gatk.raw.flag.vcf -filter “DP < 10.0” --filter-name “LowDP” -filter “QD < 2.0” --filter-name “QD” -filter “MQ < 40.0” --filter-name “MQD” -filter “FS > 60.0” --filter-name “FSsnp” -filter “FS > 200.0” --filter-name “FSindel”

I'm getting the below error for that command:

14:51:41.836 WARN JexlEngine - ![0,2]: 'DP < 10.0;' undefined variable DP 14:51:44.273 WARN JexlEngine - ![0,2]: 'DP < 10.0;' undefined variable DP 14:51:44.569 WARN JexlEngine - ![0,2]: 'DP < 10.0;' undefined variable DP 14:51:45.322 INFO ProgressMeter - chr11:67440041 0.2 362000 2169830.2 14:51:46.801 WARN JexlEngine - ![0,2]: 'DP < 10.0;' undefined variable DP 14:51:48.077 WARN JexlEngine - ![0,2]: 'DP < 10.0;' undefined variable DP 14:51:49.353 WARN JexlEngine - ![0,2]: 'DP < 10.0;' undefined variable DP

The command also generating the output file (filtered vcf file), but has the same number of variants in the input file.

I really don't know what is going wrong. Is that correct syntax for that command? Can anyone of you help me out ?

Thanks in advance!

gatk linux seq sequencing • 121 views
ADD COMMENTlink modified 4 weeks ago by Pierre Lindenbaum124k • written 4 weeks ago by karthick.n10
1
gravatar for Pierre Lindenbaum
4 weeks ago by
France/Nantes/Institut du Thorax - INSERM UMR1087
Pierre Lindenbaum124k wrote:

check if some variants are missing the DP attribute

grep -v ";DP=" NA12878.gatk.raw.vcf | grep -v "#" | head

if any, it means that your JEXL expression DP < 10.0 will fail because there is no such attribue DP.

ADD COMMENTlink written 4 weeks ago by Pierre Lindenbaum124k

Thanks a lot Mr.Pierre.

Yes. Few of the variants don't have that attribute. Is it because of the improper variant calling? Should I need to do variant calling again? Also, how to remove those variants from the vcf file. Kindly provide your answer.

Thanks in advance! :) Have a great day

ADD REPLYlink written 4 weeks ago by karthick.n10

hard to answer without knowing how the variants were called.

ADD REPLYlink written 4 weeks ago by Pierre Lindenbaum124k

Hi Sir,

This is the command for variant calling:

gatk HaplotypeCaller -R hg19.fa -I NA12878.sort.mkdup.bam -O NA12878.gatk.raw.vcf --max-alternate-alleles 1

ADD REPLYlink written 4 weeks ago by karthick.n10

This is the answer. If the INFO attribute is not present for a variant position it will return a WARN it's not an error though. From the gatk forums a staff member said:

The WARN statements simply let you know that the annotation is missing at the site. There is no need to to worry about them, as sometimes an annotation cannot be calculated for a site. As for passing sites without the requested annotation, we do not fail sites unless the annotation values fail the filters. However, you can add this argument to fail those sites :smile:

ADD REPLYlink modified 29 days ago • written 29 days ago by Amar620
0
gravatar for Amar
4 weeks ago by
Amar620
Amar620 wrote:

What gatk version are you using? There's a few mistakes but it all depends on the version you're using. The first one I notice is that you might need double dashes for filter eg --filter. The second is that in the latest version of gatk it's actually --filter-name and --filter-expression.

https://software.broadinstitute.org/gatk/documentation/tooldocs/current/org_broadinstitute_hellbender_tools_walkers_filters_VariantFiltration.php

ADD COMMENTlink written 4 weeks ago by Amar620

Hi Amar,

Thanks a lot for your quick response!

I'm using the latest version of gatk (v4.1.4.0) only. Also modified the command based on your input, but still the system throwing the same error. :( . This is the modified command.

gatk VariantFiltration -R hg19.fa -V NA12878.gatk.raw.vcf -O NA12878.gatk.raw.flag.vcf --filter-name "LowDP" --filter-expression "DP < 10.0" --filter-name "QD" --filter-expression "QD < 2.0" --filter-name "MQD" --filter-expression "MQ < 40.0" --filter-name "FSsnp" --filter-expression "FS > 60.0" --filter-name "FSindel" --filter-expression "FS > 200.0"^C

ADD REPLYlink written 4 weeks ago by karthick.n10

I found the issue. Pierre is correct. We all should read the "error" messages returned!

If you look closely it's not an error but a warning. Look closely at the error:

14:51:41.836 WARN JexlEngine - ![0,2]: 'DP < 10.0;' undefined variable DP 
14:51:44.273 WARN JexlEngine - ![0,2]: 'DP < 10.0;' undefined variable DP 
14:51:44.569 WARN JexlEngine - ![0,2]: 'DP < 10.0;' undefined variable DP 
14:51:45.322 INFO ProgressMeter - chr11:67440041 0.2 362000 2169830.2 
14:51:46.801 WARN JexlEngine - ![0,2]: 'DP < 10.0;' undefined variable DP 
14:51:48.077 WARN JexlEngine - ![0,2]: 'DP < 10.0;' undefined variable DP 
14:51:49.353 WARN JexlEngine - ![0,2]: 'DP < 10.0;' undefined variable DP

You will notice that it's warning you at certain positions within the genome/VCF file the DP INFO is not present. This is normal. In the latest gatk it will warn you if the a filtered INFO value is not present it will return a warning but NOT an error. Your filtering is working fine.

ADD REPLYlink written 29 days ago by Amar620
1

Thanks a lot Amar :) For your responses!

ADD REPLYlink written 29 days ago by karthick.n10
Please log in to add an answer.

Help
Access

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 2.3.0
Traffic: 992 users visited in the last hour