Entering edit mode
4.4 years ago
chloe.girard
•
0
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é
Hello all, I tried to put 0 as a value to bypass the problem
And now the error is :
I am at a loss to explain this error message. Thanks for your help
replace
gatk VariantFiltration
withecho 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:
but
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
And I still get the same error!
As for the echo
only returns: