GATK VariantFiltration error "-12.5 is not a recognized option"
0
0
Entering edit mode
4.4 years ago

Dear all,

I'm going nuts. It's been two days and I can't find what I'm doing wrong. I am trying to filter variants from a VCF files generated through HaplotypeCaller (output: gvcf) and then GenotypeGVCF (output: vcf), using GATK v4.1.9.0.

Then I want to perform hard filtering on my variants, using either SelectVariant or VariantFiltering. In all cases I want MQRankSum to be < -12.5

gatk VariantFiltration \
   -R  ~/Genomes/TAIR10_chr_all.fasta \
   -V ~/RIL_seq/$sample1.vcf.gz \
   -O ~/RIL_seq/$sample1$addon.vcf.gz \
   --filter-expression "QD < 2" \
   --filter-expression "FS > 60" \
   --filter-expression "MQ < 40" \
   --filter-expression "MQRankSum < -12.5" \
   --filter-expression "ReadPostRankSum < -8" \
   --filter-expression "GT == 0/1"

Same happens with

gatk SelectVariants \
   -R  ~/Genomes/TAIR10_chr_all.fasta \
   -V ~/RIL_seq/$sample1.vcf.gz \
   -I ~/RIL_seq/$sample1.bam \
   -O ~/RIL_seq/$sample1$addon1.vcf.gz \
   -select "GT == 0/1 || QD < 2 || FS > 60 || MQ < 40 || MQRankSum < -12.5 || ReadPostRankSum < -8" \
   --exclude-filtered true

Both times I get the error message:

A USER ERROR has occurred: -12.5 is not a recognized option

Thanks for your help, Best Chloé

GATK VariantFiltration SelectVariant • 1.8k views
ADD COMMENT
0
Entering edit mode

Hello all, I tried to put 0 as a value to bypass the problem

gatk VariantFiltration \
    -V ~/RIL_seq/$sample1.vcf.gz \
    -filter "QD < 2.0" --filter-name "QD2" \
    -filter "QUAL < 30.0" --filter-name "QUAL30" \
    -filter "SOR > 3.0" --filter-name "SOR3" \
    -filter "FS > 60.0" --filter-name "FS60" \
    -filter "MQ < 40.0" --filter-name "MQ40" \
    -filter "MQRankSum < 0" --filter-name "MQRankSum0" \
    -filter "ReadPosRankSum < 0" --filter-name "ReadPosRankSum0" \
    -O ~/RIL_seq/$sample1$addon4.vcf.gz

And now the error is :

A USER ERROR has occurred: Illegal argument value: Positional arguments were provided ',<{2.0{<{30.0{>{3.0{>{60.0{<{40.0{<{0{<{0}' but no positional argument is defined for this tool.

I am at a loss to explain this error message. Thanks for your help

ADD REPLY
0
Entering edit mode

replace gatk VariantFiltration with echo gatk VariantFiltration and show us the output. I f you hany space in those shell variables it will mess-up the command. Furthermore, protect your argument by quoting them.

not:

-V ~/RIL_seq/$sample1.vcf.gz \

but

-V "${HOME}/RIL_seq/$sample1.vcf.gz" \
ADD REPLY
0
Entering edit mode

Hello Pierre, Thanks for your reply and sorry about the delay. I checked for typos and extra spaces, doesn't seem to be any (my terminal highlights extra spaces)

Following some rules from GATK website, my code now reads

export WRKPATH=/home/cg
export BINPATH=$WKRPATH/bin
export JOBPATH=$WRKPATH/RIL_seq
cd $JOBPATH

### Name variables
sample1=7R
addon1=_recalibrated
addon2=_filtered

/opt/singularity/calls_gatk/gatk VariantFiltration \
   -R "$WRKPATH/Genomes/TAIR10_chr_all.fasta" \
   -V "$JOBPATH/$sample1$addon1.vcf.gz" \
   -O "$JOBPATH/$sample1$addon1$addon2.vcf.gz" \
   --filter-name "QD2" \
   --filter-expression "QD < 2.0" \
   --filter-name "QUAL30" \
   --filter-expression "QUAL < 30.0" \
   --filter-name "SOR3" \
   --filter-expression "SOR > 3.0" \
   --filter-name "FS60" \
   --filter-expression "FS > 60.0" \
   --filter-name "MQ40" \
   --filter-expression "MQ < 40.0" \
   --filter-name "MQRS-12.5" \
   --filter-expression "MQRankSum < 0" \
   --filter-name "RPRS-8" \
   --filter-expression "ReadPosRankSum < 0"\
   --genotype-filter-name "HOM" \
   --genotype-filter-expression "isHomVar==1" \
   --genotype-filter-name "HET" \
   --genotype-filter-expression "isHet==1"

And I still get the same error!

A USER ERROR has occurred: Illegal argument value: Positional arguments were provided ',<{2.0{<{30.0??{>{3.0{>{60.0{<{40.0{<{0{<{0}' but no positional argument is defined for this tool.

As for the echo

echo /opt/singularity/calls_gatk/gatk VariantFiltration

only returns:

/opt/singularity/calls_gatk/gatk VariantFiltration
ADD REPLY

Login before adding your answer.

Traffic: 4640 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6