This is a test version of Biostars. For the public version, visit https://www.biostars.org.
GATK VariantFiltration invalid expression

Hi all!

I'm trying to apply filtering with GATK on my set of SNPs but I am having a problem with filtering expression: it seems like JEXL syntax is not correct. However I don't understand what the issue is - I've been going through GATK documentation but I don't see any obvious mistake in my filter. If anyone could give me a hint what can be wrong, I'd appreciate.

My filter expression is as follows:

gatk -T VariantFiltration \
-R reference.fasta \
-V variants.vcf \
--filterExpression \
"(vc.hasAttribute('QD')&&QD<2.0)||FS>60.0||MQ<40.0||(vc.hasAttribute('ReadPosRankSum')&&ReadPosRankSum<-8.0)||(vc.hasAttribute'MappingQualityRankSum')&&MappingQualityRankSum<-12.5)" \
--filterName "my_filter" \
-o variantsFiltered.vcf

All the best, Agata

ngs gatk variants filtration

1 answer

Hello,

there is a ( missing in your last hasAttribute statement.

fin swimmer

Log in to answer this question.